/**
 * Stub for @sandcode/sandbox-runtime (native sandbox module).
 *
 * The real module provides OS-level sandboxing (macOS seatbelt, Linux landlock).
 * This stub disables sandboxing by reporting the platform as unsupported.
 */

export class SandboxManager {
  constructor() {}

  // Static methods used by sandbox-adapter.ts
  static isSupportedPlatform() { return false; }
  static checkDependencies() { return { errors: ['Sandbox runtime not available (stub)'], warnings: [] }; }
  static wrapWithSandbox(cmd, args, opts) { return { cmd, args, opts }; }
  static async initialize(config, callback) { if (callback) await callback(); }
  static updateConfig(config) {}
  static reset() {}
  static getFsReadConfig() { return {}; }
  static getFsWriteConfig() { return {}; }
  static getNetworkRestrictionConfig() { return {}; }
  static getIgnoreViolations() { return false; }
  static getAllowUnixSockets() { return true; }
  static getAllowLocalBinding() { return true; }
  static getEnableWeakerNestedSandbox() { return false; }
  static getProxyPort() { return null; }
  static getSocksProxyPort() { return null; }
  static getLinuxHttpSocketPath() { return null; }
  static getLinuxSocksSocketPath() { return null; }
  static async waitForNetworkInitialization() {}
  static getSandboxViolationStore() { return new SandboxViolationStore(); }
  static annotateStderrWithSandboxFailures(command, stderr) { return stderr; }
  static cleanupAfterCommand() {}

  // Instance methods
  start() {}
  stop() {}
}

export class SandboxViolationStore {
  constructor() {}
  getViolations() { return []; }
  clear() {}
}

export const SandboxRuntimeConfigSchema = {
  parse: (v) => v,
  safeParse: (v) => ({ success: true, data: v }),
};

export default { SandboxManager, SandboxViolationStore, SandboxRuntimeConfigSchema };
