@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
package/electron/main.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
const { app, BrowserWindow } = require("electron");
|
|
2
|
+
const { fork, execSync } = require("child_process");
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const http = require("http");
|
|
5
|
+
|
|
6
|
+
let mainWindow;
|
|
7
|
+
let nextProcess;
|
|
8
|
+
const PORT = 3030;
|
|
9
|
+
|
|
10
|
+
function getShellEnv() {
|
|
11
|
+
if (process.platform === "win32") {
|
|
12
|
+
return process.env;
|
|
13
|
+
}
|
|
14
|
+
try {
|
|
15
|
+
const shell = process.env.SHELL || "/bin/zsh";
|
|
16
|
+
const output = execSync(`${shell} -lic 'node -e "console.log(JSON.stringify(process.env))"'`, {
|
|
17
|
+
encoding: "utf8",
|
|
18
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
19
|
+
timeout: 3000
|
|
20
|
+
});
|
|
21
|
+
return { ...process.env, ...JSON.parse(output) };
|
|
22
|
+
} catch (e) {
|
|
23
|
+
console.error("[Shell Env Capture Error]:", e);
|
|
24
|
+
return process.env;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function startNextServer() {
|
|
29
|
+
if (app.isPackaged) {
|
|
30
|
+
try {
|
|
31
|
+
const serverPath = path.join(__dirname, "server-worker.js");
|
|
32
|
+
const env = getShellEnv();
|
|
33
|
+
|
|
34
|
+
// Fork Next.js server as a separate child process (Electron Helper)
|
|
35
|
+
nextProcess = fork(serverPath, [], {
|
|
36
|
+
env: {
|
|
37
|
+
...env,
|
|
38
|
+
PORT,
|
|
39
|
+
NODE_ENV: "production",
|
|
40
|
+
PI_CODING_AGENT_DIR: path.join(require("os").homedir(), ".ink", "agent")
|
|
41
|
+
},
|
|
42
|
+
stdio: "inherit"
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
nextProcess.on("exit", (code) => {
|
|
46
|
+
console.log(`[Next.js Server Worker] exited with code ${code}`);
|
|
47
|
+
});
|
|
48
|
+
} catch (e) {
|
|
49
|
+
console.error("[Next.js Spawn Error]:", e);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function checkServerReady(callback) {
|
|
55
|
+
const req = http.get(`http://localhost:${PORT}/api/models`, (res) => {
|
|
56
|
+
if (res.statusCode === 200) {
|
|
57
|
+
callback();
|
|
58
|
+
} else {
|
|
59
|
+
setTimeout(() => checkServerReady(callback), 250);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
req.on("error", () => {
|
|
63
|
+
setTimeout(() => checkServerReady(callback), 250);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function createWindow() {
|
|
68
|
+
mainWindow = new BrowserWindow({
|
|
69
|
+
width: 1280,
|
|
70
|
+
height: 800,
|
|
71
|
+
title: "ink-xY Novel Studio",
|
|
72
|
+
icon: path.join(__dirname, "../public/icon.png"),
|
|
73
|
+
webPreferences: {
|
|
74
|
+
nodeIntegration: false,
|
|
75
|
+
contextIsolation: true,
|
|
76
|
+
},
|
|
77
|
+
autoHideMenuBar: true, // Hide top menu bar for premium native feel
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// Register F12 / Ctrl+Shift+I to toggle DevTools, and F5 / Ctrl+R to reload
|
|
81
|
+
mainWindow.webContents.on("before-input-event", (event, input) => {
|
|
82
|
+
if (input.key === "F12" || (input.control && input.shift && input.key.toLowerCase() === "i")) {
|
|
83
|
+
mainWindow.webContents.toggleDevTools();
|
|
84
|
+
event.preventDefault();
|
|
85
|
+
}
|
|
86
|
+
if (input.key === "F5" || (input.control && input.key.toLowerCase() === "r")) {
|
|
87
|
+
mainWindow.webContents.reload();
|
|
88
|
+
event.preventDefault();
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
const url = `http://localhost:${PORT}`;
|
|
93
|
+
if (app.isPackaged) {
|
|
94
|
+
checkServerReady(() => {
|
|
95
|
+
mainWindow.loadURL(url);
|
|
96
|
+
});
|
|
97
|
+
} else {
|
|
98
|
+
// In dev environment, we assume concurrently started the Next.js dev server already
|
|
99
|
+
mainWindow.loadURL(url);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
mainWindow.on("closed", () => {
|
|
103
|
+
mainWindow = null;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
app.whenReady().then(() => {
|
|
108
|
+
startNextServer();
|
|
109
|
+
createWindow();
|
|
110
|
+
|
|
111
|
+
app.on("activate", () => {
|
|
112
|
+
if (BrowserWindow.getAllWindows().length === 0) createWindow();
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
app.on("window-all-closed", () => {
|
|
117
|
+
if (process.platform !== "darwin") {
|
|
118
|
+
app.quit();
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
// Clean up background Next.js server before quit
|
|
123
|
+
app.on("will-quit", () => {
|
|
124
|
+
if (nextProcess) {
|
|
125
|
+
nextProcess.kill();
|
|
126
|
+
}
|
|
127
|
+
});
|
package/next.config.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { NextConfig } from "next";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import os from "os";
|
|
4
|
+
|
|
5
|
+
// Fully isolate all session histories, settings, and model configs under ~/.ink/agent/
|
|
6
|
+
process.env.PI_CODING_AGENT_DIR = path.join(os.homedir(), ".ink", "agent");
|
|
7
|
+
|
|
8
|
+
const nextConfig: NextConfig = {
|
|
9
|
+
serverExternalPackages: ["@earendil-works/pi-coding-agent", "@earendil-works/pi-ai"],
|
|
10
|
+
allowedDevOrigins: ['192.168.*.*'],
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default nextConfig;
|
package/package.json
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zwbigi/ink-xy",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"author": "demon820308",
|
|
5
|
+
"description": "ink-xY Novel Studio - Professional Intelligent Collaborative Novel Editor",
|
|
6
|
+
"main": "electron/main.js",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/demon820308/ink-xy.git"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"pi-agent-xy": "bin/pi-web.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"bin",
|
|
16
|
+
".next",
|
|
17
|
+
"!.next/cache",
|
|
18
|
+
"!.next/dev",
|
|
19
|
+
"!.next/**/*.js.map",
|
|
20
|
+
"public",
|
|
21
|
+
"next.config.ts",
|
|
22
|
+
"package.json"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "next dev -p 30143 --webpack",
|
|
26
|
+
"build": "next build --webpack",
|
|
27
|
+
"start": "next start -p 30143",
|
|
28
|
+
"lint": "eslint .",
|
|
29
|
+
"release": "npm version patch --no-git-tag-version && npm run build && npm publish --registry https://registry.npmjs.org --access public",
|
|
30
|
+
"electron:dev": "concurrently \"next dev -p 3030 --webpack\" \"wait-on http://localhost:3030 && electron .\"",
|
|
31
|
+
"electron:build": "npm run build && electron-builder"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@earendil-works/pi-ai": "^0.75.5",
|
|
35
|
+
"@earendil-works/pi-coding-agent": "^0.75.5",
|
|
36
|
+
"@lobehub/icons": "^5.6.0",
|
|
37
|
+
"@types/react-syntax-highlighter": "^15.5.13",
|
|
38
|
+
"chart.js": "^4.5.1",
|
|
39
|
+
"jszip": "^3.10.1",
|
|
40
|
+
"next": "16.2.1",
|
|
41
|
+
"pptxviewjs": "^1.1.9",
|
|
42
|
+
"react": "^19.2.4",
|
|
43
|
+
"react-dom": "^19.2.4",
|
|
44
|
+
"react-markdown": "^10.1.0",
|
|
45
|
+
"react-syntax-highlighter": "^16.1.1",
|
|
46
|
+
"remark-gfm": "^4.0.1"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@tailwindcss/postcss": "^4.2.2",
|
|
50
|
+
"@types/node": "^25",
|
|
51
|
+
"@types/react": "^19",
|
|
52
|
+
"@types/react-dom": "^19",
|
|
53
|
+
"concurrently": "^10.0.0",
|
|
54
|
+
"electron": "^42.3.0",
|
|
55
|
+
"electron-builder": "^26.8.1",
|
|
56
|
+
"eslint": "^9",
|
|
57
|
+
"eslint-config-next": "16.2.1",
|
|
58
|
+
"postcss": "^8",
|
|
59
|
+
"pptxgenjs": "^3.12.0",
|
|
60
|
+
"tailwindcss": "^4.2.2",
|
|
61
|
+
"typescript": "5.9.3",
|
|
62
|
+
"wait-on": "^9.0.10"
|
|
63
|
+
},
|
|
64
|
+
"build": {
|
|
65
|
+
"appId": "com.ink.novel.xy",
|
|
66
|
+
"productName": "ink-xY Novel Studio",
|
|
67
|
+
"directories": {
|
|
68
|
+
"output": "dist"
|
|
69
|
+
},
|
|
70
|
+
"win": {
|
|
71
|
+
"target": "nsis",
|
|
72
|
+
"icon": "public/icon.png"
|
|
73
|
+
},
|
|
74
|
+
"nsis": {
|
|
75
|
+
"oneClick": false,
|
|
76
|
+
"allowToChangeInstallationDirectory": true,
|
|
77
|
+
"createDesktopShortcut": true,
|
|
78
|
+
"createStartMenuShortcut": true
|
|
79
|
+
},
|
|
80
|
+
"mac": {
|
|
81
|
+
"target": [
|
|
82
|
+
"dmg",
|
|
83
|
+
"zip"
|
|
84
|
+
],
|
|
85
|
+
"icon": "public/icon.png",
|
|
86
|
+
"identity": null
|
|
87
|
+
},
|
|
88
|
+
"dmg": {
|
|
89
|
+
"iconSize": 100,
|
|
90
|
+
"contents": [
|
|
91
|
+
{
|
|
92
|
+
"x": 130,
|
|
93
|
+
"y": 220
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"x": 410,
|
|
97
|
+
"y": 220,
|
|
98
|
+
"type": "link",
|
|
99
|
+
"path": "/Applications"
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"files": [
|
|
104
|
+
"electron/**/*",
|
|
105
|
+
"package.json",
|
|
106
|
+
"node_modules/**/*",
|
|
107
|
+
".next/**/*",
|
|
108
|
+
"!.next/cache/**/*",
|
|
109
|
+
"bin/**/*",
|
|
110
|
+
"public/**/*",
|
|
111
|
+
"inkos/**/*",
|
|
112
|
+
"!inkos/**/node_modules/.cache/**/*",
|
|
113
|
+
"!inkos/node_modules/.cache/**/*"
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
Binary file
|
package/public/file.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 13.5V5.41a1 1 0 0 0-.3-.7L9.8.29A1 1 0 0 0 9.08 0H1.5v13.5A2.5 2.5 0 0 0 4 16h8a2.5 2.5 0 0 0 2.5-2.5m-1.5 0v-7H8v-5H3v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1M9.5 5V2.12L12.38 5zM5.13 5h-.62v1.25h2.12V5zm-.62 3h7.12v1.25H4.5zm.62 3h-.62v1.25h7.12V11z" clip-rule="evenodd" fill="#666" fill-rule="evenodd"/></svg>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Generate a simple favicon for Pi Agent xY"""
|
|
3
|
+
from PIL import Image, ImageDraw, ImageFont
|
|
4
|
+
import os
|
|
5
|
+
|
|
6
|
+
def create_favicon():
|
|
7
|
+
size = 64
|
|
8
|
+
img = Image.new('RGBA', (size, size), (0, 0, 0, 0))
|
|
9
|
+
draw = ImageDraw.Draw(img)
|
|
10
|
+
|
|
11
|
+
# Draw rounded rectangle background
|
|
12
|
+
padding = 4
|
|
13
|
+
draw.rounded_rectangle(
|
|
14
|
+
[padding, padding, size - padding, size - padding],
|
|
15
|
+
radius=12,
|
|
16
|
+
fill=(59, 130, 246) # Blue
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
# Draw "xY" text
|
|
20
|
+
try:
|
|
21
|
+
font = ImageFont.truetype("arial.ttf", 28)
|
|
22
|
+
except:
|
|
23
|
+
font = ImageFont.load_default()
|
|
24
|
+
|
|
25
|
+
text = "xY"
|
|
26
|
+
bbox = draw.textbbox((0, 0), text, font=font)
|
|
27
|
+
text_width = bbox[2] - bbox[0]
|
|
28
|
+
text_height = bbox[3] - bbox[1]
|
|
29
|
+
x = (size - text_width) // 2
|
|
30
|
+
y = (size - text_height) // 2 - 2
|
|
31
|
+
draw.text((x, y), text, fill='white', font=font)
|
|
32
|
+
|
|
33
|
+
# Save as ICO with multiple sizes
|
|
34
|
+
img.save('D:/Pi-Web/pi-web-src/public/favicon.ico', format='ICO', sizes=[(32, 32), (16, 16)])
|
|
35
|
+
print("favicon.ico created!")
|
|
36
|
+
|
|
37
|
+
if __name__ == "__main__":
|
|
38
|
+
create_favicon()
|
package/public/globe.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.27 14.1a6.5 6.5 0 0 0 3.67-3.45q-1.24.21-2.7.34-.31 1.83-.97 3.1M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.48-1.52a7 7 0 0 1-.96 0H7.5a4 4 0 0 1-.84-1.32q-.38-.89-.63-2.08a40 40 0 0 0 3.92 0q-.25 1.2-.63 2.08a4 4 0 0 1-.84 1.31zm2.94-4.76q1.66-.15 2.95-.43a7 7 0 0 0 0-2.58q-1.3-.27-2.95-.43a18 18 0 0 1 0 3.44m-1.27-3.54a17 17 0 0 1 0 3.64 39 39 0 0 1-4.3 0 17 17 0 0 1 0-3.64 39 39 0 0 1 4.3 0m1.1-1.17q1.45.13 2.69.34a6.5 6.5 0 0 0-3.67-3.44q.65 1.26.98 3.1M8.48 1.5l.01.02q.41.37.84 1.31.38.89.63 2.08a40 40 0 0 0-3.92 0q.25-1.2.63-2.08a4 4 0 0 1 .85-1.32 7 7 0 0 1 .96 0m-2.75.4a6.5 6.5 0 0 0-3.67 3.44 29 29 0 0 1 2.7-.34q.31-1.83.97-3.1M4.58 6.28q-1.66.16-2.95.43a7 7 0 0 0 0 2.58q1.3.27 2.95.43a18 18 0 0 1 0-3.44m.17 4.71q-1.45-.12-2.69-.34a6.5 6.5 0 0 0 3.67 3.44q-.65-1.27-.98-3.1" fill="#666"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>
|
package/public/icon.png
ADDED
|
Binary file
|
package/public/next.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1155 1000"><path d="m577.3 0 577.4 1000H0z" fill="#fff"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 2.5h13v10a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1zM0 1h16v11.5a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 12.5zm3.75 4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M7 4.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m1.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5" fill="#666"/></svg>
|