Add explicit ownerDisplaySecret for owner ID hash obfuscation (#22520)

* feat(config): add owner display secret setting

* feat(prompt): add explicit owner hash secret to obfuscation path

* test(prompt): assert owner hash secret mode behavior

* Update src/agents/system-prompt.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Vincent Koc
2026-02-21 03:13:56 -05:00
committed by GitHub
parent fe609c0c77
commit 9abab6a2c9
10 changed files with 107 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ import { parseByteSize } from "../cli/parse-bytes.js";
import { parseDurationMs } from "../cli/parse-duration.js";
import { ElevatedAllowFromSchema } from "./zod-schema.agent-runtime.js";
import { createAllowDenyChannelRulesSchema } from "./zod-schema.allowdeny.js";
import { sensitive } from "./zod-schema.sensitive.js";
import {
GroupChatSchema,
InboundDebounceSchema,
@@ -161,6 +162,8 @@ export const CommandsSchema = z
restart: z.boolean().optional().default(true),
useAccessGroups: z.boolean().optional(),
ownerAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
ownerDisplay: z.enum(["raw", "hash"]).optional().default("raw"),
ownerDisplaySecret: z.string().optional().register(sensitive),
allowFrom: ElevatedAllowFromSchema.optional(),
})
.strict()