@zwbigi/ink-xy 0.1.1
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/.next/BUILD_ID +1 -0
- package/.next/app-path-routes-manifest.json +33 -0
- package/.next/build-manifest.json +20 -0
- package/.next/diagnostics/build-diagnostics.json +6 -0
- package/.next/diagnostics/framework.json +1 -0
- package/.next/export-marker.json +6 -0
- package/.next/images-manifest.json +68 -0
- package/.next/next-minimal-server.js.nft.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +114 -0
- package/.next/react-loadable-manifest.json +1993 -0
- package/.next/required-server-files.js +341 -0
- package/.next/required-server-files.json +341 -0
- package/.next/routes-manifest.json +252 -0
- package/.next/server/app/_global-error/page.js +32 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +16 -0
- package/.next/server/app/_global-error.rsc +14 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +14 -0
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_head.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/.next/server/app/_not-found/page.js +2 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +16 -0
- package/.next/server/app/_not-found.rsc +16 -0
- package/.next/server/app/_not-found.segments/_full.segment.rsc +16 -0
- package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
- package/.next/server/app/_not-found.segments/_index.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/api/agent/[id]/events/route.js +3 -0
- package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -0
- package/.next/server/app/api/agent/[id]/events/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agent/[id]/route.js +1 -0
- package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/agent/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agent/describe-image/route.js +15 -0
- package/.next/server/app/api/agent/describe-image/route.js.nft.json +1 -0
- package/.next/server/app/api/agent/describe-image/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agent/new/route.js +8 -0
- package/.next/server/app/api/agent/new/route.js.nft.json +1 -0
- package/.next/server/app/api/agent/new/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/all-providers/route.js +1 -0
- package/.next/server/app/api/auth/all-providers/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/all-providers/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -0
- package/.next/server/app/api/auth/api-key/[provider]/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/api-key/[provider]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/login/[provider]/route.js +3 -0
- package/.next/server/app/api/auth/login/[provider]/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/login/[provider]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -0
- package/.next/server/app/api/auth/logout/[provider]/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/logout/[provider]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/providers/route.js +1 -0
- package/.next/server/app/api/auth/providers/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/providers/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/default-cwd/route.js +1 -0
- package/.next/server/app/api/default-cwd/route.js.nft.json +1 -0
- package/.next/server/app/api/default-cwd/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/files/[...path]/route.js +6 -0
- package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -0
- package/.next/server/app/api/files/[...path]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/gem-xy/[id]/route.js +1 -0
- package/.next/server/app/api/gem-xy/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/gem-xy/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/gem-xy/route.js +1 -0
- package/.next/server/app/api/gem-xy/route.js.nft.json +1 -0
- package/.next/server/app/api/gem-xy/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/home/route.js +1 -0
- package/.next/server/app/api/home/route.js.nft.json +1 -0
- package/.next/server/app/api/home/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/inkos/route.js +13 -0
- package/.next/server/app/api/inkos/route.js.nft.json +1 -0
- package/.next/server/app/api/inkos/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models/route.js +1 -0
- package/.next/server/app/api/models/route.js.nft.json +1 -0
- package/.next/server/app/api/models/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models-config/route.js +1 -0
- package/.next/server/app/api/models-config/route.js.nft.json +1 -0
- package/.next/server/app/api/models-config/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/register-cwd/route.js +1 -0
- package/.next/server/app/api/register-cwd/route.js.nft.json +1 -0
- package/.next/server/app/api/register-cwd/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/context/route.js +3 -0
- package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/[id]/context/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/lock/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/lock/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/[id]/lock/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/new/route.js +1 -0
- package/.next/server/app/api/sessions/new/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/new/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/route.js +3 -0
- package/.next/server/app/api/sessions/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/install/route.js +1 -0
- package/.next/server/app/api/skills/install/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/route.js +6 -0
- package/.next/server/app/api/skills/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/search/route.js +1 -0
- package/.next/server/app/api/skills/search/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/tts/synthesize/route.js +1 -0
- package/.next/server/app/api/tts/synthesize/route.js.nft.json +1 -0
- package/.next/server/app/api/tts/synthesize/route_client-reference-manifest.js +1 -0
- package/.next/server/app/favicon.ico/route.js +1 -0
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -0
- package/.next/server/app/favicon.ico.body +0 -0
- package/.next/server/app/favicon.ico.meta +1 -0
- package/.next/server/app/index.html +1 -0
- package/.next/server/app/index.meta +14 -0
- package/.next/server/app/index.rsc +15 -0
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +6 -0
- package/.next/server/app/index.segments/_full.segment.rsc +15 -0
- package/.next/server/app/index.segments/_head.segment.rsc +6 -0
- package/.next/server/app/index.segments/_index.segment.rsc +5 -0
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -0
- package/.next/server/app/page.js +162 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +1 -0
- package/.next/server/app-paths-manifest.json +33 -0
- package/.next/server/chunks/162.js +1 -0
- package/.next/server/chunks/433.js +6 -0
- package/.next/server/chunks/601.js +27 -0
- package/.next/server/chunks/63.js +45 -0
- package/.next/server/chunks/632.js +1 -0
- package/.next/server/chunks/65.js +1 -0
- package/.next/server/chunks/741.js +18 -0
- package/.next/server/chunks/813.js +1 -0
- package/.next/server/functions-config-manifest.json +4 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +1 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages-manifest.json +4 -0
- package/.next/server/prefetch-hints.json +1 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +1 -0
- package/.next/server/webpack-runtime.js +1 -0
- package/.next/static/BvG0z8aA5rKvDREWCzBf_/_buildManifest.js +1 -0
- package/.next/static/BvG0z8aA5rKvDREWCzBf_/_ssgManifest.js +1 -0
- package/.next/static/chunks/1966.1560d0f43ac9a41a.js +1 -0
- package/.next/static/chunks/2479.43f5228b4208e28b.js +1 -0
- package/.next/static/chunks/3794-fa2c7d47374be211.js +32 -0
- package/.next/static/chunks/3899.cf10152d8085e352.js +1 -0
- package/.next/static/chunks/4bd1b696-c2f6e0877b6c10aa.js +1 -0
- package/.next/static/chunks/5f4842b5.50bf54b97ff395f3.js +1 -0
- package/.next/static/chunks/7547-9d656d23f0b75f2a.js +1 -0
- package/.next/static/chunks/7918f2c1.3a26cf7b64cb2eff.js +6 -0
- package/.next/static/chunks/8451.cfb7d6db11fbfb19.js +1 -0
- package/.next/static/chunks/app/_global-error/page-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/_not-found/page-cba500a03cba1d1e.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/agent/describe-image/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/gem-xy/[id]/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/gem-xy/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/home/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/inkos/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/models/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/register-cwd/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/lock/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/sessions/new/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/skills/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/api/tts/synthesize/route-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/app/layout-6c9568b1e18484e3.js +1 -0
- package/.next/static/chunks/app/page-0e8b420d9a738e0f.js +161 -0
- package/.next/static/chunks/ca377847.a378e365b1b60c48.js +1 -0
- package/.next/static/chunks/framework-3052651e402fc2ca.js +1 -0
- package/.next/static/chunks/main-268a9d5ff935d846.js +5 -0
- package/.next/static/chunks/main-app-a115908f58a6cf38.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-2c0ae34a7b36f2f6.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-7f5e7bebe7a745ed.js +1 -0
- package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/.next/static/chunks/webpack-a98a562c28a00d6f.js +1 -0
- package/.next/static/css/cb335cfd27b5f824.css +3 -0
- package/.next/static/media/15605e25b523335c-s.woff2 +0 -0
- package/.next/static/media/1a3dce5cfb5f7760-s.woff2 +0 -0
- package/.next/static/media/1cdd02902f937a18-s.woff2 +0 -0
- package/.next/static/media/4c4b3b30b6bcb2be-s.woff2 +0 -0
- package/.next/static/media/641a7b8a5800ee0e-s.woff2 +0 -0
- package/.next/static/media/7deddc85b7ffd1dc-s.p.woff2 +0 -0
- package/.next/static/media/ec14413c594b3356-s.p.woff2 +0 -0
- package/.next/trace +4 -0
- package/.next/trace-build +1 -0
- package/.next/types/app/api/agent/[id]/events/route.ts +351 -0
- package/.next/types/app/api/agent/[id]/route.ts +351 -0
- package/.next/types/app/api/agent/describe-image/route.ts +351 -0
- package/.next/types/app/api/agent/new/route.ts +351 -0
- package/.next/types/app/api/auth/all-providers/route.ts +351 -0
- package/.next/types/app/api/auth/api-key/[provider]/route.ts +351 -0
- package/.next/types/app/api/auth/login/[provider]/route.ts +351 -0
- package/.next/types/app/api/auth/logout/[provider]/route.ts +351 -0
- package/.next/types/app/api/auth/providers/route.ts +351 -0
- package/.next/types/app/api/default-cwd/route.ts +351 -0
- package/.next/types/app/api/files/[...path]/route.ts +351 -0
- package/.next/types/app/api/gem-xy/[id]/route.ts +351 -0
- package/.next/types/app/api/gem-xy/route.ts +351 -0
- package/.next/types/app/api/home/route.ts +351 -0
- package/.next/types/app/api/inkos/route.ts +351 -0
- package/.next/types/app/api/models/route.ts +351 -0
- package/.next/types/app/api/models-config/route.ts +351 -0
- package/.next/types/app/api/register-cwd/route.ts +351 -0
- package/.next/types/app/api/sessions/[id]/context/route.ts +351 -0
- package/.next/types/app/api/sessions/[id]/lock/route.ts +351 -0
- package/.next/types/app/api/sessions/[id]/route.ts +351 -0
- package/.next/types/app/api/sessions/new/route.ts +351 -0
- package/.next/types/app/api/sessions/route.ts +351 -0
- package/.next/types/app/api/skills/install/route.ts +351 -0
- package/.next/types/app/api/skills/route.ts +351 -0
- package/.next/types/app/api/skills/search/route.ts +351 -0
- package/.next/types/app/api/tts/synthesize/route.ts +351 -0
- package/.next/types/app/layout.ts +87 -0
- package/.next/types/app/page.ts +87 -0
- package/.next/types/package.json +1 -0
- package/.next/types/routes.d.ts +99 -0
- package/.next/types/validator.ts +313 -0
- package/README.md +183 -0
- package/bin/pi-web.js +78 -0
- package/electron/main.js +127 -0
- package/next.config.ts +13 -0
- package/package.json +116 -0
- package/public/favicon.ico +0 -0
- package/public/file.svg +1 -0
- package/public/generate_favicon.py +38 -0
- package/public/globe.svg +1 -0
- package/public/icon.png +0 -0
- package/public/next.svg +1 -0
- package/public/vercel.svg +1 -0
- package/public/window.svg +1 -0
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
// This file is generated automatically by Next.js
|
|
2
|
+
// Do not edit this file manually
|
|
3
|
+
// This file validates that all pages and layouts export the correct types
|
|
4
|
+
|
|
5
|
+
import type { AppRoutes, LayoutRoutes, ParamMap, AppRouteHandlerRoutes } from "./routes.js"
|
|
6
|
+
import type { ResolvingMetadata, ResolvingViewport } from "next/types.js"
|
|
7
|
+
import type { NextRequest } from 'next/server.js'
|
|
8
|
+
|
|
9
|
+
type AppPageConfig<Route extends AppRoutes = AppRoutes> = {
|
|
10
|
+
default: React.ComponentType<{ params: Promise<ParamMap[Route]> } & any> | ((props: { params: Promise<ParamMap[Route]> } & any) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
|
|
11
|
+
generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
|
|
12
|
+
generateMetadata?: (
|
|
13
|
+
props: { params: Promise<ParamMap[Route]> } & any,
|
|
14
|
+
parent: ResolvingMetadata
|
|
15
|
+
) => Promise<any> | any
|
|
16
|
+
generateViewport?: (
|
|
17
|
+
props: { params: Promise<ParamMap[Route]> } & any,
|
|
18
|
+
parent: ResolvingViewport
|
|
19
|
+
) => Promise<any> | any
|
|
20
|
+
metadata?: any
|
|
21
|
+
viewport?: any
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type LayoutConfig<Route extends LayoutRoutes = LayoutRoutes> = {
|
|
25
|
+
default: React.ComponentType<LayoutProps<Route>> | ((props: LayoutProps<Route>) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
|
|
26
|
+
generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
|
|
27
|
+
generateMetadata?: (
|
|
28
|
+
props: { params: Promise<ParamMap[Route]> } & any,
|
|
29
|
+
parent: ResolvingMetadata
|
|
30
|
+
) => Promise<any> | any
|
|
31
|
+
generateViewport?: (
|
|
32
|
+
props: { params: Promise<ParamMap[Route]> } & any,
|
|
33
|
+
parent: ResolvingViewport
|
|
34
|
+
) => Promise<any> | any
|
|
35
|
+
metadata?: any
|
|
36
|
+
viewport?: any
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRoutes> = {
|
|
40
|
+
GET?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
|
41
|
+
POST?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
|
42
|
+
PUT?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
|
43
|
+
PATCH?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
|
44
|
+
DELETE?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
|
45
|
+
HEAD?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
|
46
|
+
OPTIONS?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
// Validate ../../app/page.tsx
|
|
51
|
+
{
|
|
52
|
+
type __IsExpected<Specific extends AppPageConfig<"/">> = Specific
|
|
53
|
+
const handler = {} as typeof import("../../app/page.js")
|
|
54
|
+
type __Check = __IsExpected<typeof handler>
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
type __Unused = __Check
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Validate ../../app/api/agent/[id]/events/route.ts
|
|
60
|
+
{
|
|
61
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/agent/[id]/events">> = Specific
|
|
62
|
+
const handler = {} as typeof import("../../app/api/agent/[id]/events/route.js")
|
|
63
|
+
type __Check = __IsExpected<typeof handler>
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
type __Unused = __Check
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Validate ../../app/api/agent/[id]/route.ts
|
|
69
|
+
{
|
|
70
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/agent/[id]">> = Specific
|
|
71
|
+
const handler = {} as typeof import("../../app/api/agent/[id]/route.js")
|
|
72
|
+
type __Check = __IsExpected<typeof handler>
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
type __Unused = __Check
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Validate ../../app/api/agent/describe-image/route.ts
|
|
78
|
+
{
|
|
79
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/agent/describe-image">> = Specific
|
|
80
|
+
const handler = {} as typeof import("../../app/api/agent/describe-image/route.js")
|
|
81
|
+
type __Check = __IsExpected<typeof handler>
|
|
82
|
+
// @ts-ignore
|
|
83
|
+
type __Unused = __Check
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Validate ../../app/api/agent/new/route.ts
|
|
87
|
+
{
|
|
88
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/agent/new">> = Specific
|
|
89
|
+
const handler = {} as typeof import("../../app/api/agent/new/route.js")
|
|
90
|
+
type __Check = __IsExpected<typeof handler>
|
|
91
|
+
// @ts-ignore
|
|
92
|
+
type __Unused = __Check
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Validate ../../app/api/auth/all-providers/route.ts
|
|
96
|
+
{
|
|
97
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/auth/all-providers">> = Specific
|
|
98
|
+
const handler = {} as typeof import("../../app/api/auth/all-providers/route.js")
|
|
99
|
+
type __Check = __IsExpected<typeof handler>
|
|
100
|
+
// @ts-ignore
|
|
101
|
+
type __Unused = __Check
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Validate ../../app/api/auth/api-key/[provider]/route.ts
|
|
105
|
+
{
|
|
106
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/auth/api-key/[provider]">> = Specific
|
|
107
|
+
const handler = {} as typeof import("../../app/api/auth/api-key/[provider]/route.js")
|
|
108
|
+
type __Check = __IsExpected<typeof handler>
|
|
109
|
+
// @ts-ignore
|
|
110
|
+
type __Unused = __Check
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Validate ../../app/api/auth/login/[provider]/route.ts
|
|
114
|
+
{
|
|
115
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/auth/login/[provider]">> = Specific
|
|
116
|
+
const handler = {} as typeof import("../../app/api/auth/login/[provider]/route.js")
|
|
117
|
+
type __Check = __IsExpected<typeof handler>
|
|
118
|
+
// @ts-ignore
|
|
119
|
+
type __Unused = __Check
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Validate ../../app/api/auth/logout/[provider]/route.ts
|
|
123
|
+
{
|
|
124
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/auth/logout/[provider]">> = Specific
|
|
125
|
+
const handler = {} as typeof import("../../app/api/auth/logout/[provider]/route.js")
|
|
126
|
+
type __Check = __IsExpected<typeof handler>
|
|
127
|
+
// @ts-ignore
|
|
128
|
+
type __Unused = __Check
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Validate ../../app/api/auth/providers/route.ts
|
|
132
|
+
{
|
|
133
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/auth/providers">> = Specific
|
|
134
|
+
const handler = {} as typeof import("../../app/api/auth/providers/route.js")
|
|
135
|
+
type __Check = __IsExpected<typeof handler>
|
|
136
|
+
// @ts-ignore
|
|
137
|
+
type __Unused = __Check
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Validate ../../app/api/default-cwd/route.ts
|
|
141
|
+
{
|
|
142
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/default-cwd">> = Specific
|
|
143
|
+
const handler = {} as typeof import("../../app/api/default-cwd/route.js")
|
|
144
|
+
type __Check = __IsExpected<typeof handler>
|
|
145
|
+
// @ts-ignore
|
|
146
|
+
type __Unused = __Check
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Validate ../../app/api/files/[...path]/route.ts
|
|
150
|
+
{
|
|
151
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/files/[...path]">> = Specific
|
|
152
|
+
const handler = {} as typeof import("../../app/api/files/[...path]/route.js")
|
|
153
|
+
type __Check = __IsExpected<typeof handler>
|
|
154
|
+
// @ts-ignore
|
|
155
|
+
type __Unused = __Check
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Validate ../../app/api/gem-xy/[id]/route.ts
|
|
159
|
+
{
|
|
160
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/gem-xy/[id]">> = Specific
|
|
161
|
+
const handler = {} as typeof import("../../app/api/gem-xy/[id]/route.js")
|
|
162
|
+
type __Check = __IsExpected<typeof handler>
|
|
163
|
+
// @ts-ignore
|
|
164
|
+
type __Unused = __Check
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Validate ../../app/api/gem-xy/route.ts
|
|
168
|
+
{
|
|
169
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/gem-xy">> = Specific
|
|
170
|
+
const handler = {} as typeof import("../../app/api/gem-xy/route.js")
|
|
171
|
+
type __Check = __IsExpected<typeof handler>
|
|
172
|
+
// @ts-ignore
|
|
173
|
+
type __Unused = __Check
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Validate ../../app/api/home/route.ts
|
|
177
|
+
{
|
|
178
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/home">> = Specific
|
|
179
|
+
const handler = {} as typeof import("../../app/api/home/route.js")
|
|
180
|
+
type __Check = __IsExpected<typeof handler>
|
|
181
|
+
// @ts-ignore
|
|
182
|
+
type __Unused = __Check
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Validate ../../app/api/inkos/route.ts
|
|
186
|
+
{
|
|
187
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/inkos">> = Specific
|
|
188
|
+
const handler = {} as typeof import("../../app/api/inkos/route.js")
|
|
189
|
+
type __Check = __IsExpected<typeof handler>
|
|
190
|
+
// @ts-ignore
|
|
191
|
+
type __Unused = __Check
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Validate ../../app/api/models-config/route.ts
|
|
195
|
+
{
|
|
196
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/models-config">> = Specific
|
|
197
|
+
const handler = {} as typeof import("../../app/api/models-config/route.js")
|
|
198
|
+
type __Check = __IsExpected<typeof handler>
|
|
199
|
+
// @ts-ignore
|
|
200
|
+
type __Unused = __Check
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Validate ../../app/api/models/route.ts
|
|
204
|
+
{
|
|
205
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/models">> = Specific
|
|
206
|
+
const handler = {} as typeof import("../../app/api/models/route.js")
|
|
207
|
+
type __Check = __IsExpected<typeof handler>
|
|
208
|
+
// @ts-ignore
|
|
209
|
+
type __Unused = __Check
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Validate ../../app/api/register-cwd/route.ts
|
|
213
|
+
{
|
|
214
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/register-cwd">> = Specific
|
|
215
|
+
const handler = {} as typeof import("../../app/api/register-cwd/route.js")
|
|
216
|
+
type __Check = __IsExpected<typeof handler>
|
|
217
|
+
// @ts-ignore
|
|
218
|
+
type __Unused = __Check
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// Validate ../../app/api/sessions/[id]/context/route.ts
|
|
222
|
+
{
|
|
223
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions/[id]/context">> = Specific
|
|
224
|
+
const handler = {} as typeof import("../../app/api/sessions/[id]/context/route.js")
|
|
225
|
+
type __Check = __IsExpected<typeof handler>
|
|
226
|
+
// @ts-ignore
|
|
227
|
+
type __Unused = __Check
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Validate ../../app/api/sessions/[id]/lock/route.ts
|
|
231
|
+
{
|
|
232
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions/[id]/lock">> = Specific
|
|
233
|
+
const handler = {} as typeof import("../../app/api/sessions/[id]/lock/route.js")
|
|
234
|
+
type __Check = __IsExpected<typeof handler>
|
|
235
|
+
// @ts-ignore
|
|
236
|
+
type __Unused = __Check
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Validate ../../app/api/sessions/[id]/route.ts
|
|
240
|
+
{
|
|
241
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions/[id]">> = Specific
|
|
242
|
+
const handler = {} as typeof import("../../app/api/sessions/[id]/route.js")
|
|
243
|
+
type __Check = __IsExpected<typeof handler>
|
|
244
|
+
// @ts-ignore
|
|
245
|
+
type __Unused = __Check
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Validate ../../app/api/sessions/new/route.ts
|
|
249
|
+
{
|
|
250
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions/new">> = Specific
|
|
251
|
+
const handler = {} as typeof import("../../app/api/sessions/new/route.js")
|
|
252
|
+
type __Check = __IsExpected<typeof handler>
|
|
253
|
+
// @ts-ignore
|
|
254
|
+
type __Unused = __Check
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// Validate ../../app/api/sessions/route.ts
|
|
258
|
+
{
|
|
259
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions">> = Specific
|
|
260
|
+
const handler = {} as typeof import("../../app/api/sessions/route.js")
|
|
261
|
+
type __Check = __IsExpected<typeof handler>
|
|
262
|
+
// @ts-ignore
|
|
263
|
+
type __Unused = __Check
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// Validate ../../app/api/skills/install/route.ts
|
|
267
|
+
{
|
|
268
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/skills/install">> = Specific
|
|
269
|
+
const handler = {} as typeof import("../../app/api/skills/install/route.js")
|
|
270
|
+
type __Check = __IsExpected<typeof handler>
|
|
271
|
+
// @ts-ignore
|
|
272
|
+
type __Unused = __Check
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// Validate ../../app/api/skills/route.ts
|
|
276
|
+
{
|
|
277
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/skills">> = Specific
|
|
278
|
+
const handler = {} as typeof import("../../app/api/skills/route.js")
|
|
279
|
+
type __Check = __IsExpected<typeof handler>
|
|
280
|
+
// @ts-ignore
|
|
281
|
+
type __Unused = __Check
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
// Validate ../../app/api/skills/search/route.ts
|
|
285
|
+
{
|
|
286
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/skills/search">> = Specific
|
|
287
|
+
const handler = {} as typeof import("../../app/api/skills/search/route.js")
|
|
288
|
+
type __Check = __IsExpected<typeof handler>
|
|
289
|
+
// @ts-ignore
|
|
290
|
+
type __Unused = __Check
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// Validate ../../app/api/tts/synthesize/route.ts
|
|
294
|
+
{
|
|
295
|
+
type __IsExpected<Specific extends RouteHandlerConfig<"/api/tts/synthesize">> = Specific
|
|
296
|
+
const handler = {} as typeof import("../../app/api/tts/synthesize/route.js")
|
|
297
|
+
type __Check = __IsExpected<typeof handler>
|
|
298
|
+
// @ts-ignore
|
|
299
|
+
type __Unused = __Check
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
// Validate ../../app/layout.tsx
|
|
307
|
+
{
|
|
308
|
+
type __IsExpected<Specific extends LayoutConfig<"/">> = Specific
|
|
309
|
+
const handler = {} as typeof import("../../app/layout.js")
|
|
310
|
+
type __Check = __IsExpected<typeof handler>
|
|
311
|
+
// @ts-ignore
|
|
312
|
+
type __Unused = __Check
|
|
313
|
+
}
|
package/README.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# 🖋️ ink-xY Novel Studio — 智能协同写作空间
|
|
2
|
+
|
|
3
|
+
[](https://nextjs.org/)
|
|
4
|
+
[](https://www.electronjs.org/)
|
|
5
|
+
[](https://pnpm.io/)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
8
|
+
> 🌌 **ink-xY Novel Studio** 是一款专为网络小说作家、独立编剧以及文学创作者量身定制的 **非线性沉浸式智能协同写作空间 (Literary IDE)**。
|
|
9
|
+
> 基于 Next.js 15 与 Electron 独立桌面客户端完美融合,秉承温润如纸的视觉底色、高雅文学排版、极简非线性大纲管理器,并深度整合了本地多智能体小说协作引擎 **`InkOS`**,实现真正意义上的“人机无缝共创”。
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
+-----------------------------------------------------------------------+
|
|
15
|
+
| ink-xY Literary Studio |
|
|
16
|
+
+--------------------+----------------------------+---------------------+
|
|
17
|
+
| 📁 大纲与设定目录 | 📝 Zen 沉浸创作画布 | 🔮 AI 创作伴侣 (Gems)|
|
|
18
|
+
| - 故事大纲.md | - Outfit/Lora 衬线排版 | - 大纲策划师 |
|
|
19
|
+
| - 角色设定/ | - 1.8倍行距,护眼底色 | - 角色塑造师 |
|
|
20
|
+
| - 世界观设定/ | - [ 🔍 人设防崩审计 ] | - 细节扩写师 |
|
|
21
|
+
| - 章节草稿/ | - [ 📝 规划本章意图 ] | - 纠错校对师 |
|
|
22
|
+
+--------------------+----------------------------+---------------------+
|
|
23
|
+
| [ 🛡️ 真理设定上下文注入防线 ] |
|
|
24
|
+
+-----------------------------------------------------------------------+
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 🎨 视觉与设计哲学 (Zen Aesthetic Mode)
|
|
30
|
+
|
|
31
|
+
* **禅意温润护眼肤色**:默认采用温润纸张黄(Soft Warm Beige)与深邃静心绿(Zen Forest Green)双色主题,有效降低长时间创作的视觉疲劳。
|
|
32
|
+
* **高雅文学衬线排版**:中文字体默认优化为优雅的宋体/楷体排版,英文采用 **Outfit** 与 **Lora** 衬线字体组合,间距宽松(Line-height 1.8),赋予文字以纸质墨水的呼吸感。
|
|
33
|
+
* **极简无干扰画布**:全平台移除所有属于程序员的技术性调试日志与极客控制台,将技术细节安全收纳于后端,把灵感与故事毫无保留地留给写作者。
|
|
34
|
+
* **安全防抖内存保护**:集成了前端 `1500ms` 本地大文件防抖保存(Debounced Save),防止在 AI 写入多达几万字的大纲或章节时产生频繁重绘卡顿,提供行云流水的打字体验。
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 🚀 核心闪光点 (Feature Highlights)
|
|
39
|
+
|
|
40
|
+
### 1. 🤖 深度整合 InkOS 多智能体写作引擎
|
|
41
|
+
内置本地多智能体小说辅助开发引擎 `InkOS`。前端通过极简的 **REST API 桥接层** 调度 `runInkos` 系统 Node 进程包装器,支持在后台快速、异步执行 `init`、`audit`、`plan`、`compose` 等多智能体分析任务。
|
|
42
|
+
|
|
43
|
+
### 2. 📚 15 类中英文小说题材 (Bilingual Genres Support)
|
|
44
|
+
系统预置了 15 类题材,分为**中文网文题材**与**英文原生题材**,不仅提供写作大纲指引,更是智能体进行“数值核对”、“战力分析”与“时代研究”的引擎开关:
|
|
45
|
+
|
|
46
|
+
| 题材 ID | 题材名称 | 默认语言 | 章节类型 (chapterTypes) | 数值系统 (numericalSystem) | 战力等级 (powerScaling) | 时代背景研究 (eraResearch) |
|
|
47
|
+
|---|---|---|---|:---:|:---:|:---:|
|
|
48
|
+
| `xuanhuan` | **玄幻奇幻** (Xuanhuan) | `zh` | 战斗章, 布局章, 过渡章, 回收章 | ✅ | ✅ | ❌ |
|
|
49
|
+
| `xianxia` | **仙侠修真** (Xianxia) | `zh` | 战斗章, 悟道章, 布局章, 过渡章, 回收章 | ✅ | ✅ | ❌ |
|
|
50
|
+
| `urban` | **都市异能** (Urban) | `zh` | 商战章, 社交章, 布局章, 过渡章, 回收章 | ❌ | ❌ | ✅ |
|
|
51
|
+
| `horror` | **悬疑恐怖** (Horror) | `zh` | 氛围章, 事件章, 揭示章, 过渡章, 回收章 | ❌ | ❌ | ❌ |
|
|
52
|
+
| `other` | **其它通用** (Other) | `zh` | 推进章, 布局章, 过渡章, 回收章 | ❌ | ❌ | ❌ |
|
|
53
|
+
| `litrpg` | **数据无限流/系统流** (LitRPG) | `en` | Progression, Setup, Transition, Payoff, Combat | ✅ | ✅ | ❌ |
|
|
54
|
+
| `progression` | **升级流奇幻** (Progression Fantasy) | `en` | Training, Breakthrough, Setup, Transition, Payoff | ❌ | ✅ | ❌ |
|
|
55
|
+
| `cozy` | **温馨奇幻** (Cozy Fantasy) | `en` | Slice-of-Life, Community, Setup, Transition, Payoff | ❌ | ❌ | ❌ |
|
|
56
|
+
| `cultivation` | **英文修真** (English Cultivation) | `en` | Training, Breakthrough, Combat, Setup, Transition, Payoff | ❌ | ✅ | ❌ |
|
|
57
|
+
| `dungeon-core` | **地下城核心流** (Dungeon Core) | `en` | Strategy, Adventurer POV, Setup, Transition, Payoff | ✅ | ❌ | ❌ |
|
|
58
|
+
| `isekai` | **异世界穿梭** (Isekai / Portal Fantasy) | `en` | Exploration, Adaptation, Setup, Transition, Payoff, Combat | ❌ | ✅ | ❌ |
|
|
59
|
+
| `romantasy` | **浪漫奇幻** (Romantasy) | `en` | Romance, Action, Setup, Transition, Payoff | ❌ | ❌ | ❌ |
|
|
60
|
+
| `sci-fi` | **科学幻想** (Science Fiction) | `en` | Exploration, Combat, Setup, Transition, Payoff | ❌ | ❌ | ✅ |
|
|
61
|
+
| `system-apocalypse` | **系统废土流** (System Apocalypse) | `en` | Survival, Combat, Setup, Transition, Payoff | ✅ | ✅ | ❌ |
|
|
62
|
+
| `tower-climber` | **爬塔闯关流** (Tower Climbing) | `en` | Floor Challenge, Progression, Setup, Transition, Payoff | ❌ | ✅ | ❌ |
|
|
63
|
+
|
|
64
|
+
此外,系统支持 **同人创作 (`fanfic`)** 专属初始化流程,支持 `canon` (正典延续)、`au` (平行宇宙)、`ooc` (角色偏离)、`cp` (角色配对) 四种独立模式,可自动解析原著素材文本。
|
|
65
|
+
|
|
66
|
+
### 3. 🔍 章节级“人设防崩审计”与“意图规划”工具带 (File Footer Toolbelt)
|
|
67
|
+
* **实时人设防崩审计**:在编辑章节草稿时,编辑器底部提供 **`🔍 人设防崩审计`** 键。点击后立即运行 `inkos audit` 扫描当前草稿,深度检测逻辑矛盾或人设走形(例如:死亡角色复活、主角性格突变、剧情前后冲突)。
|
|
68
|
+
* **章节写作意图规划**:底部提供 **`📝 规划本章意图`** 键。一键自动为即将动笔的章节预生成场景设定与写作大纲意图,确保每一章的起承转合都在掌控中。
|
|
69
|
+
* **毛玻璃右滑抽屉式报告 panel**:审计报告采用流畅的 CSS Transition 从右侧滑出,配有高雅的 `backdrop-blur: 4px` 毛玻璃遮罩,以衬线排版优雅呈现多智能体审计反馈。
|
|
70
|
+
|
|
71
|
+
### 4. 🛡️ 真理系统“设定上下文防线” (Truth System Context Injector)
|
|
72
|
+
* **动态背景设定提取**:在会话右侧与 AI Gems 写作姬交流时,系统会在后台**静默、深度扫描**当前工作区中 `角色设定/` 和 `世界观设定/` 文件夹下的所有人物卡片与世界背景 Markdown 文件。
|
|
73
|
+
* **智能上下文注入**:将所有的底层设定自动编译,作为最高优先级 Context(Truth Settings)无缝混入每次 AI 对话 turn 中。确保写作姬随时对主角的武器、性格、阵营和背景了如指掌,从源头彻底斩断“人设走样”与“剧情冲突”。
|
|
74
|
+
|
|
75
|
+
### 5. 👥 专属四大预设 Gems 写作姬
|
|
76
|
+
* **🧭 大纲策划师**:辅助宏观骨架搭建,把控章节起承转合与戏剧冲突。
|
|
77
|
+
* **👤 角色塑造师**:包装人物设定,打磨对话口吻,让配角同样立体。
|
|
78
|
+
* **✍️ 细节扩写师**:划词扩写,把动作、情绪、环境描写打磨得极具画面美感。
|
|
79
|
+
* **🔍 纠错校对师**:自动过滤章节中的错别字、病句与逻辑语病。
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 🏗️ 系统架构图 (System Architecture)
|
|
84
|
+
|
|
85
|
+
```mermaid
|
|
86
|
+
graph TD
|
|
87
|
+
subgraph Browser (Electron / Next.js SPA)
|
|
88
|
+
A[Zen Markdown Editor] <-->|自动保存 / 字数统计| B[Frontend State]
|
|
89
|
+
C[Sidebar / Project Explorer] -->|选择工作区| B
|
|
90
|
+
D[AI Co-writers Gems Panel] <-->|SSE 实时流 / 对话分支树| B
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
subgraph Next.js In-Process Server (Port 30142)
|
|
94
|
+
B <-->|1. 接口桥接 POST /api/inkos| E[API Router]
|
|
95
|
+
B <-->|3. SSE 对话 /api/agent/[id]| F[Agent RPC Manager]
|
|
96
|
+
B <-->|读写目录 /api/files| G[File System Bridge]
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
subgraph Local Engine & Workspace
|
|
100
|
+
E <-->|2. 执行 CLI 进程| H[runInkos - CLI Bundle Wrapper]
|
|
101
|
+
F <-->|4. 扫描真理设定| I[compileLoreCards]
|
|
102
|
+
H <-->|初始化 / 审计 / 意图生成| J[(小说本地工作区 CWD)]
|
|
103
|
+
I <-->|提取 角色设定/ & 世界观设定/| J
|
|
104
|
+
G <-->|读写草稿章节| J
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
style J fill:#f9f6f0,stroke:#8c6239,stroke-width:2px;
|
|
108
|
+
style A fill:#e6eed6,stroke:#4a6b53,stroke-width:2px;
|
|
109
|
+
style D fill:#f3e8ff,stroke:#8b5cf6,stroke-width:2px;
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 🧭 快速开始 (Quick Start)
|
|
115
|
+
|
|
116
|
+
### 1. 基础依赖准备
|
|
117
|
+
确保您的开发环境安装了 **Node.js v20+** 与 **pnpm**:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# 全局安装 pnpm (如果尚未安装)
|
|
121
|
+
npm install -g pnpm
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### 2. 编译本地 InkOS 子模块
|
|
125
|
+
`ink-xY` 将 `InkOS` monorepo 仓库作为核心写作算力子包,存放于根目录下的 `inkos/` 中。启动前需要完成子包的本地构建:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# 进入 inkos 文件夹并安装依赖
|
|
129
|
+
cd inkos
|
|
130
|
+
pnpm install
|
|
131
|
+
|
|
132
|
+
# 执行 InkOS 引擎编译
|
|
133
|
+
pnpm build
|
|
134
|
+
cd ..
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### 3. 运行本地开发服务器
|
|
138
|
+
回到 `ink-xY` 项目根目录,安装主项目依赖并启动 Web 开发服务器:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# 安装主项目依赖
|
|
142
|
+
npm install
|
|
143
|
+
|
|
144
|
+
# 启动 Next.js 极速开发服务(本地监听端口 30142)
|
|
145
|
+
npm run dev
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### 4. 运行 Typecheck 与 Lint 校验
|
|
149
|
+
```bash
|
|
150
|
+
# 静态类型安全校验 (忽略 inkos 嵌套干扰)
|
|
151
|
+
node_modules/.bin/tsc --noEmit
|
|
152
|
+
|
|
153
|
+
# 运行代码规范检测
|
|
154
|
+
node_modules/.bin/eslint .
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
> [!WARNING]
|
|
158
|
+
> **绝对不要在开发期间运行 `next build`**。这会污染 `.next/` 生成文件,从而导致 `npm run dev` 运行异常。
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## 🔒 隐私隔离与路径规范 (Privacy & Data Isolation)
|
|
163
|
+
|
|
164
|
+
为确保作家的灵感与创作数据绝对安全:
|
|
165
|
+
|
|
166
|
+
1. **零云端依赖**:所有的写作草稿、人设卡片、设定大纲均作为标准的 `.md` 纯文本存储在您的本地磁盘上。
|
|
167
|
+
2. **应用隔离存盘**:`ink-xY Novel Studio` 的应用主配置文件、Gems 对话历史和模型配置隔离存放在本地:
|
|
168
|
+
* 📁 **`~/.ink/agent/`** (主配置目录)
|
|
169
|
+
* ⚙️ **`~/.ink/agent/settings.json`** (偏好与默认模型设置)
|
|
170
|
+
* 📇 **`~/.ink/agent/models.json`** (模型提供商与 API Key 配置)
|
|
171
|
+
3. **工作区目录建议**:推荐将您的小说工程放置在以 `ink-cwd-<日期或书名>` 命名的本地文件夹中,以自动通过系统的文件路由校验,防止 403 跨域目录访问拦截。
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## 💡 开发建议与踩坑指南 (Key Traps & Tips)
|
|
176
|
+
|
|
177
|
+
### 1. 调试与 API Key 报错排查
|
|
178
|
+
如果右侧 AI 协作对话时弹红色的警告框,请点击侧边栏左下角的 ⚙️ 齿轮图标,检查您的 `models.json` 配置。
|
|
179
|
+
* **Key 的环境注入**:后端 `runInkos` 会自动解析 `models.json` 中的当前模型服务商设置,并实时以环境变量形式注入 CLI 进程(如自动映射出 `OPENAI_API_KEY`, `DEEPSEEK_API_KEY` 等),无需重复在系统中配置环境变量。
|
|
180
|
+
|
|
181
|
+
### 2. 对话分支 Fork 原理
|
|
182
|
+
写到分水岭剧情时点击 **"Fork"** 按钮会生成一个全新的独立 `.jsonl` 历史副本,保存在 `~/.ink/agent/sessions/` 对应的会话哈希树下。
|
|
183
|
+
* **状态清除保护**:为了防止 Next.js 热重载导致的 Agent 会话串线,系统在 Fork 触发时会强行调用销毁机制并重构 session,以确保新故事线绝对纯净。
|
package/bin/pi-web.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
5
|
+
const { spawn } = require("child_process");
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
7
|
+
const path = require("path");
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
9
|
+
const fs = require("fs");
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
11
|
+
const { parseArgs } = require("util");
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
13
|
+
const os = require("os");
|
|
14
|
+
|
|
15
|
+
// Ensure that all writes to settings, sessions and cache are under ~/.ink/agent
|
|
16
|
+
process.env.PI_CODING_AGENT_DIR = process.env.PI_CODING_AGENT_DIR || path.join(os.homedir(), ".ink", "agent");
|
|
17
|
+
|
|
18
|
+
const pkgDir = path.join(__dirname, "..");
|
|
19
|
+
const nextDir = path.join(pkgDir, ".next");
|
|
20
|
+
|
|
21
|
+
// Resolve next's CLI entry directly to avoid relying on .bin symlinks (which
|
|
22
|
+
// may not exist when installed via npx).
|
|
23
|
+
let nextBin;
|
|
24
|
+
try {
|
|
25
|
+
nextBin = require.resolve("next/dist/bin/next", { paths: [pkgDir] });
|
|
26
|
+
} catch {
|
|
27
|
+
// Fallback: locate next package root and derive the bin path manually.
|
|
28
|
+
try {
|
|
29
|
+
const nextPkg = require.resolve("next/package.json", { paths: [pkgDir] });
|
|
30
|
+
nextBin = path.join(path.dirname(nextPkg), "dist", "bin", "next");
|
|
31
|
+
} catch {
|
|
32
|
+
nextBin = path.join(pkgDir, "node_modules", "next", "dist", "bin", "next");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const { values: cliArgs } = parseArgs({
|
|
37
|
+
options: {
|
|
38
|
+
port: { type: "string", short: "p" },
|
|
39
|
+
hostname: { type: "string", short: "H" },
|
|
40
|
+
},
|
|
41
|
+
strict: false,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const port = cliArgs.port ?? process.env.PORT ?? "30142";
|
|
45
|
+
const hostname = cliArgs.hostname ?? process.env.HOSTNAME ?? null;
|
|
46
|
+
|
|
47
|
+
if (!fs.existsSync(nextDir)) {
|
|
48
|
+
console.error("Build artifacts not found. Please report this issue.");
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const nextArgs = ["start", "-p", port];
|
|
53
|
+
if (hostname) nextArgs.push("-H", hostname);
|
|
54
|
+
|
|
55
|
+
// Always run next's JS entry with node directly — avoids .bin symlink issues
|
|
56
|
+
// and path-with-spaces problems on Windows when shell: true is used.
|
|
57
|
+
const child = spawn(process.execPath, [nextBin, ...nextArgs], {
|
|
58
|
+
cwd: pkgDir,
|
|
59
|
+
stdio: ["inherit", "pipe", "inherit"],
|
|
60
|
+
env: { ...process.env },
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
let browserOpened = false;
|
|
64
|
+
const url = `http://${hostname ?? "localhost"}:${port}`;
|
|
65
|
+
|
|
66
|
+
child.stdout.on("data", (chunk) => {
|
|
67
|
+
const text = chunk.toString();
|
|
68
|
+
process.stdout.write(text);
|
|
69
|
+
if (!browserOpened && text.includes("Ready")) {
|
|
70
|
+
browserOpened = true;
|
|
71
|
+
const isWindows = process.platform === "win32";
|
|
72
|
+
const isMac = process.platform === "darwin";
|
|
73
|
+
const openCmd = isWindows ? "start" : isMac ? "open" : "xdg-open";
|
|
74
|
+
spawn(openCmd, [url], { shell: isWindows, stdio: "ignore", detached: true }).unref();
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
child.on("exit", (code) => process.exit(code ?? 0));
|