mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-07-10 01:39:25 +00:00
feat(server)!: rename daemon to server with service management
- rename workspace package `@moonshot-ai/daemon` to `@moonshot-ai/server`\n- rename `@moonshot-ai/daemon-e2e` to `@moonshot-ai/server-e2e`\n- replace `kimi daemon` and `kimi web` with `kimi server run`\n- keep `kimi web` as alias for `kimi server run --open`\n- add `kimi server install/uninstall/start/stop/restart/status`\n for launchd (darwin), systemd (linux), and schtasks (win32)\n- update dev scripts, kimi-web stub, documentation, and service naming checks\n\nBREAKING CHANGE: the `kimi daemon` command and `@moonshot-ai/daemon`\npackage are removed; use `kimi server` and `@moonshot-ai/server`.
This commit is contained in:
parent
fca2abe4b1
commit
9770f22c93
180 changed files with 4305 additions and 2352 deletions
|
|
@ -4,7 +4,7 @@
|
|||
* Phase 5 of the 2026.06.07 services-alignment plan:
|
||||
*
|
||||
* - packages/services/src/<domain>/<domain>.ts (+ <domain>Service.ts)
|
||||
* - packages/daemon/src/services/<domain>.ts (+ <domain>Service.ts)
|
||||
* - packages/server/src/services/<domain>.ts (+ <domain>Service.ts)
|
||||
*
|
||||
* Domain dirs and service-related .ts files must be camelCase — never
|
||||
* kebab-case (no `-` in the name). Anything outside these two roots is
|
||||
|
|
@ -18,7 +18,7 @@ import { resolve, join, relative } from "node:path";
|
|||
|
||||
const ROOT = resolve(import.meta.dirname, "..");
|
||||
const SERVICES_SRC = join(ROOT, "packages/services/src");
|
||||
const DAEMON_SERVICES_SRC = join(ROOT, "packages/daemon/src/services");
|
||||
const SERVER_SERVICES_SRC = join(ROOT, "packages/server/src/services");
|
||||
|
||||
/** @type {Array<{ kind: string, path: string }>} */
|
||||
const violations = [];
|
||||
|
|
@ -54,19 +54,19 @@ function scanServicesSrc() {
|
|||
}
|
||||
|
||||
/**
|
||||
* packages/daemon/src/services is a flat directory of <domain>.ts and
|
||||
* packages/server/src/services is a flat directory of <domain>.ts and
|
||||
* <domain>Service.ts modules (plus serviceCollection.ts wiring).
|
||||
*/
|
||||
function scanDaemonServicesSrc() {
|
||||
if (!existsSync(DAEMON_SERVICES_SRC)) return;
|
||||
for (const f of readdirSync(DAEMON_SERVICES_SRC)) {
|
||||
function scanServerServicesSrc() {
|
||||
if (!existsSync(SERVER_SERVICES_SRC)) return;
|
||||
for (const f of readdirSync(SERVER_SERVICES_SRC)) {
|
||||
if (!f.endsWith(".ts")) continue;
|
||||
if (isKebab(f)) report("kebab-file", join(DAEMON_SERVICES_SRC, f));
|
||||
if (isKebab(f)) report("kebab-file", join(SERVER_SERVICES_SRC, f));
|
||||
}
|
||||
}
|
||||
|
||||
scanServicesSrc();
|
||||
scanDaemonServicesSrc();
|
||||
scanServerServicesSrc();
|
||||
|
||||
if (violations.length > 0) {
|
||||
console.error(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue