agent-web-os 0.1.17 → 0.1.19

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.cjs CHANGED
@@ -42362,12 +42362,16 @@ async function readPathState(fs, path2) {
42362
42362
  entryType: "file"
42363
42363
  };
42364
42364
  }
42365
- const stat = await fs.lstat(path2);
42366
- const entryType = stat.isDirectory ? "directory" : stat.isSymbolicLink ? "symlink" : "file";
42367
- return {
42368
- exists: true,
42369
- entryType
42370
- };
42365
+ try {
42366
+ const stat = await fs.lstat(path2);
42367
+ const entryType = stat.isDirectory ? "directory" : stat.isSymbolicLink ? "symlink" : "file";
42368
+ return {
42369
+ exists: true,
42370
+ entryType
42371
+ };
42372
+ } catch {
42373
+ return { exists: false };
42374
+ }
42371
42375
  }
42372
42376
  function mapAddEvent(entryType) {
42373
42377
  return entryType === "directory" ? "addDir" : "add";
@@ -62094,6 +62098,17 @@ ${packages.map(([name, version4]) => `+-- ${name}@${version4}`).join("\n")}
62094
62098
  stdoutAny.columns = this._terminalColumns;
62095
62099
  stdoutAny.rows = this._terminalRows;
62096
62100
  stdoutAny.getWindowSize = () => [this._terminalColumns, this._terminalRows];
62101
+ let rawModeRequested = false;
62102
+ if (process4.stdin) {
62103
+ const originalSetRawMode = process4.stdin.setRawMode;
62104
+ process4.stdin.setRawMode = (mode) => {
62105
+ rawModeRequested = rawModeRequested || mode;
62106
+ if (typeof originalSetRawMode === "function") {
62107
+ return originalSetRawMode.call(process4.stdin, mode);
62108
+ }
62109
+ return process4.stdin;
62110
+ };
62111
+ }
62097
62112
  this._stdinHandler = process4.stdin ? (data2) => {
62098
62113
  process4.stdin.emit("data", data2);
62099
62114
  } : null;
@@ -62137,6 +62152,13 @@ ${packages.map(([name, version4]) => `+-- ${name}@${version4}`).join("\n")}
62137
62152
  process4.argv = invocation.argv;
62138
62153
  process4.argv0 = "node";
62139
62154
  process4.execPath = NODE_EXEC_PATH;
62155
+ if (process4.pid == null) {
62156
+ process4.pid = 1;
62157
+ }
62158
+ if (typeof process4.kill !== "function") {
62159
+ process4.kill = () => {
62160
+ };
62161
+ }
62140
62162
  const rejectionHandler = (event) => {
62141
62163
  const reason = event.reason;
62142
62164
  if (reason instanceof Error && reason.message.startsWith("Process exited with code")) {
@@ -62154,8 +62176,11 @@ ${packages.map(([name, version4]) => `+-- ${name}@${version4}`).join("\n")}
62154
62176
  runtime.runFile(invocation.scriptPath);
62155
62177
  }
62156
62178
  syncExecution = false;
62157
- await new Promise((r10) => setTimeout(r10, 0));
62158
- const isInteractive = process4.stdin && (process4.stdin.listenerCount("data") > 0 || process4.stdin.listenerCount("keypress") > 0);
62179
+ await new Promise((resolve5) => {
62180
+ setTimeout(resolve5, 0);
62181
+ });
62182
+ const hasStdinListeners = process4.stdin && (process4.stdin.listenerCount("data") > 0 || process4.stdin.listenerCount("keypress") > 0);
62183
+ const isInteractive = hasStdinListeners || rawModeRequested;
62159
62184
  const asyncExitCode = isInteractive ? await exitPromise : await Promise.race([
62160
62185
  exitPromise,
62161
62186
  new Promise((resolve5) => {
@@ -62869,7 +62894,7 @@ async function executeBrowserBash(session, command, options2 = {}) {
62869
62894
  }
62870
62895
 
62871
62896
  // src/index.ts
62872
- var AGENT_WEB_OS_VERSION = "0.1.17";
62897
+ var AGENT_WEB_OS_VERSION = "0.1.19";
62873
62898
  console.log(`[agent-web-os] v${AGENT_WEB_OS_VERSION}`);
62874
62899
  var getServerBridge2 = getServerBridge;
62875
62900
  var resetServerBridge2 = resetServerBridge;