refactor(auto-reply): normalize inbound text once (#113179)

* refactor(auto-reply): canonicalize inbound text once

* chore(plugin-sdk): refresh API baseline

* refactor(auto-reply): narrow finalized template context

* test(auto-reply): keep runner fixtures structurally compatible

* fix(auto-reply): guard optional post-command agent text

* fix(auto-reply): finalize intercepted gateway context

* fix(ci): register iOS release planner entries
This commit is contained in:
Peter Steinberger
2026-07-23 17:39:01 -07:00
committed by GitHub
parent 7915c44773
commit 0dd9dcda2f
52 changed files with 609 additions and 228 deletions
+2 -4
View File
@@ -1,5 +1,5 @@
import { describe, expect, it } from "vitest";
import { isStringOption, readStringAlias, readTrimmedStringAlias } from "./string-readers.js";
import { isStringOption, readTrimmedStringAlias } from "./string-readers.js";
describe("string readers", () => {
it("checks caller-owned string options from arrays and sets", () => {
@@ -12,7 +12,7 @@ describe("string readers", () => {
expect(isStringOption(1, modes)).toBe(false);
});
it("reads aliases with explicit raw and trimmed contracts", () => {
it("reads trimmed aliases", () => {
const record = {
empty: "",
spaced: " value ",
@@ -20,8 +20,6 @@ describe("string readers", () => {
invalid: 1,
};
expect(readStringAlias(record, ["invalid", "empty", "fallback"])).toBe("");
expect(readStringAlias(record, ["spaced"])).toBe(" value ");
expect(readTrimmedStringAlias(record, ["invalid", "empty", "spaced", "fallback"])).toBe(
"value",
);
+1 -17
View File
@@ -1,7 +1,4 @@
import {
normalizeOptionalString,
readStringValue,
} from "@openclaw/normalization-core/string-coerce";
import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce";
type StringOptions<T extends string> = readonly T[] | ReadonlySet<T>;
@@ -17,19 +14,6 @@ export function isStringOption<T extends string>(
);
}
export function readStringAlias(
record: Readonly<Record<string, unknown>>,
keys: readonly string[],
): string | undefined {
for (const key of keys) {
const value = readStringValue(record[key]);
if (value !== undefined) {
return value;
}
}
return undefined;
}
export function readTrimmedStringAlias(
record: Readonly<Record<string, unknown>>,
keys: readonly string[],