globalThis.__honeycomb_tuning__ ??= {};

// src/shared/constants.ts
var DAEMON_PORT = 3850;
var DAEMON_HOST = "127.0.0.1";
var HONEYCOMB_VERSION = true ? "0.5.8" : "0.0.0-dev";

// src/daemon-client/index.ts
function createDaemonClient(endpoint) {
  const resolved = {
    host: endpoint?.host ?? DAEMON_HOST,
    port: endpoint?.port ?? DAEMON_PORT
  };
  return {
    endpoint: resolved,
    async ping() {
      return false;
    }
  };
}

// src/daemon-client/harness.ts
function bootHarness(harness) {
  return { harness, client: createDaemonClient() };
}

// harnesses/openclaw/src/index.ts
var honeycombVersion = HONEYCOMB_VERSION;
var FORBIDDEN_TUNING_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
function applyOpenclawTuning(config) {
  const tuning = config?.tuning;
  if (!tuning) return;
  const target = globalThis.__honeycomb_tuning__ ??= {};
  for (const [key, value] of Object.entries(tuning)) {
    if (FORBIDDEN_TUNING_KEYS.has(key)) continue;
    target[key] = value;
  }
}
function register(pluginApi) {
  applyOpenclawTuning(pluginApi.pluginConfig);
  return bootHarness("openclaw");
}
function readDebugKnob() {
  return globalThis.__honeycomb_tuning__.HONEYCOMB_DEBUG;
}
function activate() {
  return bootHarness("openclaw");
}
export {
  activate,
  applyOpenclawTuning,
  honeycombVersion,
  readDebugKnob,
  register
};
