@cortask/core 0.2.20 → 0.2.22

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/dist/index.js CHANGED
@@ -1,3 +1,10 @@
1
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined") return require.apply(this, arguments);
5
+ throw Error('Dynamic require of "' + x + '" is not supported');
6
+ });
7
+
1
8
  // src/providers/openai-compatible.ts
2
9
  import OpenAI from "openai";
3
10
 
@@ -2985,9 +2992,16 @@ function getNativeBinName() {
2985
2992
  return null;
2986
2993
  }
2987
2994
  function resolveCmd() {
2995
+ const nativeBin = getNativeBinName();
2996
+ const resourcesPath = process.resourcesPath;
2997
+ if (resourcesPath && nativeBin) {
2998
+ const path18 = __require("path");
2999
+ const fs20 = __require("fs");
3000
+ const candidate = path18.join(resourcesPath, "agent-browser", nativeBin);
3001
+ if (fs20.existsSync(candidate)) return candidate;
3002
+ }
2988
3003
  try {
2989
3004
  const require2 = createRequire(import.meta.url);
2990
- const nativeBin = getNativeBinName();
2991
3005
  if (nativeBin) {
2992
3006
  try {
2993
3007
  return require2.resolve(`agent-browser/bin/${nativeBin}`);