kimi-code/package.json
haozhe.yang 4e7209394c feat(server-v2): add minimal server wired to agent-core-v2 DI
Add `packages/server-v2`, a minimal Fastify server bootstrapped through the
`agent-core-v2` DI engine (`bootstrap()` -> Core `Scope`), speaking the same
`/api/v1` interface as the v1 server. Route handlers resolve Core services
via `core.accessor.get(IXxx)`.

- Serve healthz, meta, auth, oauth (login poll/start/cancel/logout) and
  shutdown with the standard `{code, msg, data, request_id}` envelope.
- Re-point root `pnpm dev:server` to server-v2 and add a `src/main.ts`
  foreground entry.
- Add `build/hash-imports-loader.mjs` so tsx resolves `agent-core-v2`'s `#/`
  array-fallback subpath imports.
- `agent-core-v2` Phase 0 fixes so it compiles and boots: add the `event`
  domain (`IEventService`), fix `gateway` `event.subscribe` -> `event.on`, fix
  the `wireRecord` fallback `BlobStoreService` construction, export the
  `provider` barrel, and fix a `tooldedup` test import casing.
2026-06-28 17:26:39 +08:00

63 lines
2.4 KiB
JSON

{
"name": "@moonshot-ai/monorepo",
"version": "0.1.1",
"private": true,
"license": "MIT",
"type": "module",
"scripts": {
"postinstall": "node scripts/fix-node-pty-perms.mjs",
"build": "pnpm -r run build",
"build:packages": "pnpm -r --filter './packages/*' run build",
"dev:cli": "pnpm -C apps/kimi-code run dev",
"dev:web": "pnpm -C apps/kimi-web run dev",
"dev:server": "pnpm -C packages/server-v2 run dev",
"build:plugin-marketplace": "pnpm -C apps/kimi-code run build:plugin-marketplace",
"vis": "pnpm -C apps/vis run dev",
"dev:docs": "pnpm -C docs install --ignore-workspace && pnpm -C docs run dev",
"typecheck": "pnpm run build:packages && pnpm -r --filter './packages/*' run typecheck && pnpm --filter @moonshot-ai/kimi-code run typecheck && pnpm --filter @moonshot-ai/kimi-web run typecheck && pnpm --filter @moonshot-ai/vis-server run typecheck && pnpm --filter @moonshot-ai/vis-web run typecheck",
"lint": "oxlint --type-aware",
"lint:fix": "pnpm run lint --fix",
"lint:pkg": "pnpm --filter @moonshot-ai/kimi-code exec publint && npm_config_cache=${TMPDIR:-/tmp}/kimi-code-npm-cache pnpm --filter @moonshot-ai/kimi-code exec attw --pack . --profile node16",
"sherif": "sherif",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"clean": "pnpm -r run clean",
"changeset": "changeset",
"version": "changeset version",
"version:release": "changeset version",
"publish": "pnpm run typecheck && pnpm run lint && pnpm run sherif && pnpm run test && pnpm run build && pnpm run lint:pkg && changeset publish",
"prepare": "simple-git-hooks"
},
"devDependencies": {
"@arethetypeswrong/cli": "0.18.2",
"@changesets/changelog-github": "0.7.0",
"@changesets/cli": "2.30.0",
"@microsoft/api-extractor": "7.58.7",
"@types/node": "^22.15.3",
"@vitest/coverage-v8": "4.1.4",
"lint-staged": "16.4.0",
"oxlint": "1.59.0",
"oxlint-tsgolint": "0.20.0",
"pkg-pr-new": "0.0.75",
"publint": "0.3.18",
"sherif": "1.11.1",
"simple-git-hooks": "2.13.1",
"tsdown": "0.22.0",
"tsx": "^4.21.0",
"typescript": "6.0.2",
"vitest": "4.1.4"
},
"simple-git-hooks": {
},
"lint-staged": {
"*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}": [
"oxlint --fix --quiet",
"oxlint --type-aware --quiet"
]
},
"engines": {
"node": ">=24.15.0"
},
"packageManager": "pnpm@10.33.0"
}