cuelo 0.6.8 → 0.7.0

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 (66) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +14 -14
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/required-server-files.js +2 -2
  6. package/.next/required-server-files.json +2 -2
  7. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/_not-found.html +1 -1
  18. package/.next/server/app/_not-found.rsc +2 -2
  19. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  20. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  21. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  22. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  24. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  25. package/.next/server/app/api/sessions/search/route.js +1 -1
  26. package/.next/server/app/api/updates/route.js +1 -1
  27. package/.next/server/app/index.html +1 -1
  28. package/.next/server/app/index.rsc +4 -4
  29. package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  30. package/.next/server/app/index.segments/_full.segment.rsc +4 -4
  31. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  32. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  33. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  34. package/.next/server/app/page.js +6 -6
  35. package/.next/server/app/page_client-reference-manifest.js +1 -1
  36. package/.next/server/app/recover/page_client-reference-manifest.js +1 -1
  37. package/.next/server/app/recover.html +1 -1
  38. package/.next/server/app/recover.rsc +2 -2
  39. package/.next/server/app/recover.segments/_full.segment.rsc +2 -2
  40. package/.next/server/app/recover.segments/_head.segment.rsc +1 -1
  41. package/.next/server/app/recover.segments/_index.segment.rsc +2 -2
  42. package/.next/server/app/recover.segments/_tree.segment.rsc +1 -1
  43. package/.next/server/app/recover.segments/recover/__PAGE__.segment.rsc +1 -1
  44. package/.next/server/app/recover.segments/recover.segment.rsc +1 -1
  45. package/.next/server/app-paths-manifest.json +14 -14
  46. package/.next/server/chunks/6429.js +2 -2
  47. package/.next/server/middleware-build-manifest.js +1 -1
  48. package/.next/server/pages/404.html +1 -1
  49. package/.next/server/pages/500.html +1 -1
  50. package/.next/server/server-reference-manifest.json +1 -1
  51. package/.next/static/chunks/app/{layout-50d78c1f0e021377.js → layout-89b7963cbc4da94d.js} +1 -1
  52. package/.next/static/chunks/app/page-042cc56cc090bf73.js +22 -0
  53. package/.next/trace +105 -105
  54. package/.next/trace-build +1 -1
  55. package/README.md +12 -7
  56. package/Tools/CUELO_Setup/files/native-runtime-patch.js +5 -5
  57. package/Tools/OMP_Global_Config/agent/extensions/jev-runtime.ts +55 -13
  58. package/Tools/OMP_Global_Config/agent/extensions/lib/maker-routing.ts +57 -12
  59. package/Tools/OMP_Global_Config/agent/extensions/lib/routing-ledger.ts +36 -7
  60. package/Tools/OMP_Global_Config/patches/apply-core-patch.mjs +504 -54
  61. package/bin/prepare-runtime.js +37 -6
  62. package/install.mjs +3 -1
  63. package/package.json +8 -7
  64. package/.next/static/chunks/app/page-4c2544dfbb3d1f9a.js +0 -22
  65. /package/.next/static/{hPKzLPSEaHxrT4rE0H1XO → JfkwRK2BKBsxwumh964am}/_buildManifest.js +0 -0
  66. /package/.next/static/{hPKzLPSEaHxrT4rE0H1XO → JfkwRK2BKBsxwumh964am}/_ssgManifest.js +0 -0
@@ -10,14 +10,16 @@ const { spawnSync } = require("node:child_process");
10
10
 
11
11
  const pkgDir = path.resolve(__dirname, "..");
12
12
  const isCheck = process.argv.length === 3 && process.argv[2] === "--check";
13
- if (process.argv.length > (isCheck ? 3 : 2)) {
14
- console.error("Usage: node bin/prepare-runtime.js [--check]");
13
+ // --source: a source checkout's own node_modules, prepared before typecheck/test/build.
14
+ const isSource = process.argv.length === 3 && process.argv[2] === "--source";
15
+ if (process.argv.length > (isCheck || isSource ? 3 : 2)) {
16
+ console.error("Usage: node bin/prepare-runtime.js [--check|--source]");
15
17
  process.exit(1);
16
18
  }
17
19
 
18
20
  // 소스 체크아웃의 npm postinstall은 작업 중인 node_modules를 수정하지 않는다.
19
21
  // 서버 준비 검사는 bun.lock을 추가해도 이 소스 분기를 사용하지 않는다.
20
- if (!isCheck &&
22
+ if (!isCheck && !isSource &&
21
23
  fs.existsSync(path.join(pkgDir, "bun.lock")) &&
22
24
  fs.existsSync(path.join(pkgDir, "app", "layout.tsx"))) {
23
25
  console.log("CUELO source install: runtime patch preparation is handled by the source release path.");
@@ -25,7 +27,7 @@ if (!isCheck &&
25
27
  }
26
28
 
27
29
  const buildId = path.join(pkgDir, ".next", "BUILD_ID");
28
- if (!fs.existsSync(buildId)) {
30
+ if (!isSource && !fs.existsSync(buildId)) {
29
31
  console.error("CUELO npm package has no production build (.next/BUILD_ID). Install a prepared tarball.");
30
32
  process.exit(1);
31
33
  }
@@ -51,13 +53,40 @@ for (const name of corePackages) {
51
53
  }
52
54
  }
53
55
 
56
+ // Bun's default install links package files to its shared cache (nlink > 1), and the patches
57
+ // rewrite files in place, which would change the cached copy for every project. Give the
58
+ // package-owned @oh-my-pi files their own bytes first. Symlinks are never followed.
59
+ function detachLinkedFiles(dir) {
60
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
61
+ const file = path.join(dir, entry.name);
62
+ if (entry.isDirectory()) {
63
+ detachLinkedFiles(file);
64
+ } else if (entry.isFile() && fs.lstatSync(file).nlink > 1) {
65
+ const copy = `${file}.detach-${process.pid}`;
66
+ try {
67
+ fs.copyFileSync(file, copy);
68
+ fs.renameSync(copy, file);
69
+ } catch (error) {
70
+ fs.rmSync(copy, { force: true });
71
+ throw error;
72
+ }
73
+ }
74
+ }
75
+ }
76
+ if (isSource) {
77
+ for (const entry of fs.readdirSync(coreRoot, { withFileTypes: true })) {
78
+ if (entry.isDirectory()) detachLinkedFiles(path.join(coreRoot, entry.name));
79
+ }
80
+ }
81
+
54
82
  const sdk = path.join(coreRoot, "pi-coding-agent");
55
83
  const home = path.join(pkgDir, ".runtime-patch-home");
56
84
  if (!isCheck) fs.mkdirSync(home, { recursive: true });
57
85
  const env = { ...process.env, OMP_CORE_PATCH_TARGET: sdk, HOME: home, USERPROFILE: home };
58
86
  const mode = isCheck ? ["--check"] : [];
59
87
  const commands = [
60
- [path.join(pkgDir, "Tools", "CUELO_Setup", "files", "native-runtime-patch.js"), ["--target", pkgDir, ...mode]],
88
+ // The native patch edits the production build, which a source preparation does not have yet.
89
+ ...(isSource ? [] : [[path.join(pkgDir, "Tools", "CUELO_Setup", "files", "native-runtime-patch.js"), ["--target", pkgDir, ...mode]]]),
61
90
  [path.join(pkgDir, "Tools", "OMP_Global_Config", "patches", "apply-core-patch.mjs"), mode],
62
91
  [path.join(pkgDir, "Tools", "OMP_Global_Config", "patches", "apply-notices.mjs"), mode],
63
92
  ];
@@ -78,4 +107,6 @@ for (const [script, args] of commands) {
78
107
  process.exit(1);
79
108
  }
80
109
  }
81
- if (!isCheck) console.log("CUELO npm runtime patches applied and verified inside this package.");
110
+ if (!isCheck) console.log(isSource
111
+ ? "CUELO source SDK core patches applied inside this checkout."
112
+ : "CUELO npm runtime patches applied and verified inside this package.");
package/install.mjs CHANGED
@@ -246,7 +246,9 @@ function prepareRuntime() {
246
246
  NEXT_TELEMETRY_DISABLED: "1",
247
247
  };
248
248
  const bun = bunPath();
249
- run(bun, ["install", "--frozen-lockfile"], { cwd: ROOT, env: buildEnv });
249
+ run(bun, ["install", "--frozen-lockfile", "--backend=copyfile"], { cwd: ROOT, env: buildEnv });
250
+ // The unpatched SDK cannot be imported by the build; apply its core patches first.
251
+ run(node, [path.join(ROOT, "bin", "prepare-runtime.js"), "--source"], { cwd: ROOT, env: buildEnv });
250
252
  // The native runtime patch edits the production server chunks, so it runs after the build.
251
253
  run(bun, ["run", "build"], { cwd: ROOT, env: buildEnv });
252
254
  const env = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cuelo",
3
- "version": "0.6.8",
3
+ "version": "0.7.0",
4
4
  "description": "CUELO — open-source AI coding agent workspace and harness for omp (oh-my-pi)",
5
5
  "homepage": "https://github.com/gim47656-ship-it/CUELO#readme",
6
6
  "repository": {
@@ -30,7 +30,7 @@
30
30
  "license": "MIT",
31
31
  "cueloBuild": {
32
32
  "distribution": "cuelo",
33
- "coreVersion": "18.4.4"
33
+ "coreVersion": "18.4.6"
34
34
  },
35
35
  "engines": {
36
36
  "node": ">=22.19.0",
@@ -75,6 +75,7 @@
75
75
  "scripts": {
76
76
  "postinstall": "node bin/prepare-runtime.js",
77
77
  "prepare:runtime": "node bin/prepare-runtime.js",
78
+ "prepare:source": "node bin/prepare-runtime.js --source",
78
79
  "dev": "bun --bun next dev --webpack -H 127.0.0.1 -p 30141",
79
80
  "dev:lan": "bun --bun next dev --webpack -H 0.0.0.0 -p 30141",
80
81
  "dev:verify": "CUELO_DIST_DIR=.next-verify NODE_ENV=development bun --bun next dev --webpack -H 127.0.0.1 -p 30163",
@@ -87,11 +88,11 @@
87
88
  "test:coverage": "bun test --coverage ./app ./components ./hooks ./lib ./public ./bin ./install.test.mjs"
88
89
  },
89
90
  "dependencies": {
90
- "@oh-my-pi/pi-agent-core": "18.4.4",
91
- "@oh-my-pi/pi-ai": "18.4.4",
92
- "@oh-my-pi/pi-coding-agent": "18.4.4",
93
- "@oh-my-pi/pi-tui": "18.4.4",
94
- "@oh-my-pi/pi-utils": "18.4.4",
91
+ "@oh-my-pi/pi-agent-core": "18.4.6",
92
+ "@oh-my-pi/pi-ai": "18.4.6",
93
+ "@oh-my-pi/pi-coding-agent": "18.4.6",
94
+ "@oh-my-pi/pi-tui": "18.4.6",
95
+ "@oh-my-pi/pi-utils": "18.4.6",
95
96
  "@seed-design/css": "2.8.0",
96
97
  "@seed-design/react": "2.4.1",
97
98
  "@seed-design/tailwind4-theme": "2.4.0",