refactor(auto-reply): centralize command turn context

* refactor(auto-reply): centralize command turn context

* fix(channels): narrow command turn context literals

* fix(auto-reply): preserve command auth on refinalize

* fix(auto-reply): keep command turn context sdk-compatible

* fix(auto-reply): route structured command turns before reply setup

* test(cli): type stale launchd job mock
This commit is contained in:
Peter Steinberger
2026-05-15 08:41:09 +01:00
committed by GitHub
parent f4d90eb36a
commit 64d4f99d26
28 changed files with 690 additions and 38 deletions

View File

@@ -2,6 +2,7 @@ import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { StaleOpenClawUpdateLaunchdJob } from "../../daemon/launchd.js";
import { createMockGatewayService } from "../../daemon/service.test-helpers.js";
import type { GatewayRestartHandoff } from "../../infra/restart-handoff.js";
import { captureEnv } from "../../test-utils/env.js";
@@ -28,7 +29,9 @@ const loadGatewayTlsRuntime = vi.fn(async (_cfg?: unknown) => ({
fingerprintSha256: "sha256:11:22:33:44",
}));
const findExtraGatewayServices = vi.fn(async (_env?: unknown, _opts?: unknown) => []);
const findStaleOpenClawUpdateLaunchdJobs = vi.fn(async () => []);
const findStaleOpenClawUpdateLaunchdJobs = vi.fn<() => Promise<StaleOpenClawUpdateLaunchdJob[]>>(
async () => [],
);
const inspectPortUsage = vi.fn(async (port: number) => ({
port,
status: "free" as const,