openryoko 2026.9.1 → 2026.9.2

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.
Files changed (57) hide show
  1. package/dist/package.json +4 -2
  2. package/dist/web/404.html +1 -1
  3. package/dist/web/__next.__PAGE__.txt +1 -1
  4. package/dist/web/__next._full.txt +1 -1
  5. package/dist/web/__next._tree.txt +1 -1
  6. package/dist/web/_not-found/__next._full.txt +1 -1
  7. package/dist/web/_not-found/__next._not-found.__PAGE__.txt +1 -1
  8. package/dist/web/_not-found/__next._tree.txt +1 -1
  9. package/dist/web/_not-found.html +1 -1
  10. package/dist/web/_not-found.txt +1 -1
  11. package/dist/web/chat/__next._full.txt +1 -1
  12. package/dist/web/chat/__next._tree.txt +1 -1
  13. package/dist/web/chat/__next.chat.__PAGE__.txt +1 -1
  14. package/dist/web/chat.html +1 -1
  15. package/dist/web/chat.txt +1 -1
  16. package/dist/web/cron/__next._full.txt +1 -1
  17. package/dist/web/cron/__next._tree.txt +1 -1
  18. package/dist/web/cron/__next.cron.__PAGE__.txt +1 -1
  19. package/dist/web/cron.html +1 -1
  20. package/dist/web/cron.txt +1 -1
  21. package/dist/web/index.html +1 -1
  22. package/dist/web/index.txt +1 -1
  23. package/dist/web/kanban/__next._full.txt +1 -1
  24. package/dist/web/kanban/__next._tree.txt +1 -1
  25. package/dist/web/kanban/__next.kanban.__PAGE__.txt +1 -1
  26. package/dist/web/kanban.html +1 -1
  27. package/dist/web/kanban.txt +1 -1
  28. package/dist/web/logs/__next._full.txt +1 -1
  29. package/dist/web/logs/__next._tree.txt +1 -1
  30. package/dist/web/logs/__next.logs.__PAGE__.txt +1 -1
  31. package/dist/web/logs.html +1 -1
  32. package/dist/web/logs.txt +1 -1
  33. package/dist/web/org/__next._full.txt +1 -1
  34. package/dist/web/org/__next._tree.txt +1 -1
  35. package/dist/web/org/__next.org.__PAGE__.txt +1 -1
  36. package/dist/web/org.html +1 -1
  37. package/dist/web/org.txt +1 -1
  38. package/dist/web/sessions/__next._full.txt +1 -1
  39. package/dist/web/sessions/__next._tree.txt +1 -1
  40. package/dist/web/sessions/__next.sessions.__PAGE__.txt +1 -1
  41. package/dist/web/sessions.html +1 -1
  42. package/dist/web/sessions.txt +1 -1
  43. package/dist/web/settings/__next._full.txt +1 -1
  44. package/dist/web/settings/__next._tree.txt +1 -1
  45. package/dist/web/settings/__next.settings.__PAGE__.txt +1 -1
  46. package/dist/web/settings.html +1 -1
  47. package/dist/web/settings.txt +1 -1
  48. package/dist/web/skills/__next._full.txt +1 -1
  49. package/dist/web/skills/__next._tree.txt +1 -1
  50. package/dist/web/skills/__next.skills.__PAGE__.txt +1 -1
  51. package/dist/web/skills.html +1 -1
  52. package/dist/web/skills.txt +1 -1
  53. package/package.json +4 -2
  54. package/scripts/fix-prebuild-permissions.mjs +122 -0
  55. /package/dist/web/_next/static/{x20rg4epOhTIyIGLY92KV → Kudq_QcLnSoz7UYDmluYu}/_buildManifest.js +0 -0
  56. /package/dist/web/_next/static/{x20rg4epOhTIyIGLY92KV → Kudq_QcLnSoz7UYDmluYu}/_clientMiddlewareManifest.js +0 -0
  57. /package/dist/web/_next/static/{x20rg4epOhTIyIGLY92KV → Kudq_QcLnSoz7UYDmluYu}/_ssgManifest.js +0 -0
@@ -0,0 +1,122 @@
1
+ // Restore the executable bit on node-pty's spawn-helper after install.
2
+ //
3
+ // node-pty ships prebuilds/<platform>/spawn-helper with mode 0644 in its npm
4
+ // tarball, and neither npm nor pnpm nor node-pty's own install scripts turn
5
+ // it back into an executable. On macOS the native module then fails at the
6
+ // first PTY start (posix_spawnp EACCES) — i.e. the gateway crashes the first
7
+ // time a chat session starts an engine.
8
+ //
9
+ // This runs as the `postinstall` of the published package, so it covers both
10
+ // layouts:
11
+ // - npm: <this package>/node_modules/node-pty (also hoisted / global)
12
+ // - pnpm: <workspace>/node_modules/.pnpm/node-pty@*/node_modules/node-pty
13
+ // It resolves node-pty the way Node would (so hoisting and symlinks are
14
+ // followed) and additionally scans any pnpm store found walking up from the
15
+ // package directory. Everything is non-fatal: an install must never break
16
+ // because a chmod could not be applied.
17
+ import { chmod, readdir, realpath, stat } from "node:fs/promises";
18
+ import { createRequire } from "node:module";
19
+ import path from "node:path";
20
+
21
+ const MAX_WALK_UP = 6;
22
+ const verbose = process.env.npm_config_loglevel === "verbose" || process.env.FIX_PREBUILD_VERBOSE === "1";
23
+
24
+ function log(message) {
25
+ if (verbose) process.stdout.write(`fix-prebuild-permissions: ${message}\n`);
26
+ }
27
+
28
+ async function directories(target) {
29
+ try {
30
+ const entries = await readdir(target, { withFileTypes: true });
31
+ return entries.filter((entry) => entry.isDirectory() || entry.isSymbolicLink()).map((entry) => entry.name);
32
+ } catch {
33
+ return [];
34
+ }
35
+ }
36
+
37
+ // Where Node would load node-pty from, seen from `base` — covers the npm
38
+ // layout (nested, hoisted, or `npm install -g`) and a linked pnpm dependency.
39
+ async function resolvedNodePty(base) {
40
+ const require = createRequire(path.join(base, "package.json"));
41
+ try {
42
+ return path.dirname(await realpath(require.resolve("node-pty/package.json")));
43
+ } catch {
44
+ // An "exports" map may hide package.json; resolve the entry point instead
45
+ // and walk up to the package root.
46
+ }
47
+ try {
48
+ let dir = path.dirname(await realpath(require.resolve("node-pty")));
49
+ for (let depth = 0; depth < MAX_WALK_UP; depth += 1) {
50
+ if (path.basename(dir) === "node-pty") return dir;
51
+ const parent = path.dirname(dir);
52
+ if (parent === dir) break;
53
+ dir = parent;
54
+ }
55
+ } catch {
56
+ // not installed here — the pnpm store scan may still find it
57
+ }
58
+ return null;
59
+ }
60
+
61
+ // Every node-pty version in a pnpm store found walking up from `base` — for a
62
+ // workspace install where the dependency may not (yet) be linked into this
63
+ // package's own node_modules.
64
+ async function pnpmStoreNodePtys(base) {
65
+ const found = [];
66
+ let dir = base;
67
+ for (let depth = 0; depth < MAX_WALK_UP; depth += 1) {
68
+ const store = path.join(dir, "node_modules", ".pnpm");
69
+ for (const entry of await directories(store)) {
70
+ if (!entry.startsWith("node-pty@")) continue;
71
+ const candidate = path.join(store, entry, "node_modules", "node-pty");
72
+ try {
73
+ found.push(await realpath(candidate));
74
+ } catch {
75
+ // dangling entry — not ours to fix
76
+ }
77
+ }
78
+ const parent = path.dirname(dir);
79
+ if (parent === dir) break;
80
+ dir = parent;
81
+ }
82
+ return found;
83
+ }
84
+
85
+ async function makeExecutable(file) {
86
+ try {
87
+ const info = await stat(file);
88
+ if (!info.isFile()) return false;
89
+ if ((info.mode & 0o111) === 0o111) return false; // already fine
90
+ await chmod(file, 0o755);
91
+ return true;
92
+ } catch {
93
+ // No spawn-helper for this prebuild, or no permission to change it.
94
+ return false;
95
+ }
96
+ }
97
+
98
+ async function main() {
99
+ if (process.platform === "win32") return; // no executable bit to restore
100
+
101
+ const base = process.cwd(); // npm and pnpm run lifecycle scripts inside the package directory
102
+ const candidates = new Set();
103
+ const resolved = await resolvedNodePty(base);
104
+ if (resolved) candidates.add(resolved);
105
+ for (const dir of await pnpmStoreNodePtys(base)) candidates.add(dir);
106
+
107
+ let fixed = 0;
108
+ let seen = 0;
109
+ for (const dir of candidates) {
110
+ const prebuilds = path.join(dir, "prebuilds");
111
+ for (const platform of await directories(prebuilds)) {
112
+ seen += 1;
113
+ if (await makeExecutable(path.join(prebuilds, platform, "spawn-helper"))) fixed += 1;
114
+ }
115
+ }
116
+ log(`${candidates.size} node-pty location(s), ${seen} prebuild dir(s), ${fixed} spawn-helper(s) made executable`);
117
+ }
118
+
119
+ main().catch((error) => {
120
+ // Never fail an install over this.
121
+ log(`skipped: ${error instanceof Error ? error.message : String(error)}`);
122
+ });