feat: make inbound envelopes configurable
Co-authored-by: Shiva Prasad <shiv19@users.noreply.github.com>
This commit is contained in:
@@ -172,6 +172,9 @@ const FIELD_LABELS: Record<string, string> = {
|
||||
"skills.load.watchDebounceMs": "Skills Watch Debounce (ms)",
|
||||
"agents.defaults.workspace": "Workspace",
|
||||
"agents.defaults.bootstrapMaxChars": "Bootstrap Max Chars",
|
||||
"agents.defaults.envelopeTimezone": "Envelope Timezone",
|
||||
"agents.defaults.envelopeTimestamp": "Envelope Timestamp",
|
||||
"agents.defaults.envelopeElapsed": "Envelope Elapsed",
|
||||
"agents.defaults.memorySearch": "Memory Search",
|
||||
"agents.defaults.memorySearch.enabled": "Enable Memory Search",
|
||||
"agents.defaults.memorySearch.sources": "Memory Search Sources",
|
||||
@@ -371,6 +374,12 @@ const FIELD_HELP: Record<string, string> = {
|
||||
"auth.cooldowns.failureWindowHours": "Failure window (hours) for backoff counters (default: 24).",
|
||||
"agents.defaults.bootstrapMaxChars":
|
||||
"Max characters of each workspace bootstrap file injected into the system prompt before truncation (default: 20000).",
|
||||
"agents.defaults.envelopeTimezone":
|
||||
'Timezone for message envelopes ("utc", "local", "user", or an IANA timezone string).',
|
||||
"agents.defaults.envelopeTimestamp":
|
||||
'Include absolute timestamps in message envelopes ("on" or "off").',
|
||||
"agents.defaults.envelopeElapsed":
|
||||
'Include elapsed time in message envelopes ("on" or "off").',
|
||||
"agents.defaults.models": "Configured model catalog (keys are full provider/model IDs).",
|
||||
"agents.defaults.memorySearch":
|
||||
"Vector search over MEMORY.md and memory/*.md (per-agent overrides supported).",
|
||||
|
||||
@@ -155,6 +155,18 @@ export function loadSessionStore(
|
||||
return structuredClone(store);
|
||||
}
|
||||
|
||||
export function readSessionUpdatedAt(params: {
|
||||
storePath: string;
|
||||
sessionKey: string;
|
||||
}): number | undefined {
|
||||
try {
|
||||
const store = loadSessionStore(params.storePath);
|
||||
return store[params.sessionKey]?.updatedAt;
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
async function saveSessionStoreUnlocked(
|
||||
storePath: string,
|
||||
store: Record<string, SessionEntry>,
|
||||
|
||||
@@ -105,6 +105,18 @@ export type AgentDefaultsConfig = {
|
||||
userTimezone?: string;
|
||||
/** Time format in system prompt: auto (OS preference), 12-hour, or 24-hour. */
|
||||
timeFormat?: "auto" | "12" | "24";
|
||||
/**
|
||||
* Envelope timestamp timezone: "utc" (default), "local", "user", or an IANA timezone string.
|
||||
*/
|
||||
envelopeTimezone?: string;
|
||||
/**
|
||||
* Include absolute timestamps in message envelopes ("on" | "off", default: "on").
|
||||
*/
|
||||
envelopeTimestamp?: "on" | "off";
|
||||
/**
|
||||
* Include elapsed time in message envelopes ("on" | "off", default: "on").
|
||||
*/
|
||||
envelopeElapsed?: "on" | "off";
|
||||
/** Optional display-only context window override (used for % in status UIs). */
|
||||
contextTokens?: number;
|
||||
/** Optional CLI backends for text-only fallback (claude-cli, etc.). */
|
||||
|
||||
@@ -42,6 +42,9 @@ export const AgentDefaultsSchema = z
|
||||
bootstrapMaxChars: z.number().int().positive().optional(),
|
||||
userTimezone: z.string().optional(),
|
||||
timeFormat: z.union([z.literal("auto"), z.literal("12"), z.literal("24")]).optional(),
|
||||
envelopeTimezone: z.string().optional(),
|
||||
envelopeTimestamp: z.union([z.literal("on"), z.literal("off")]).optional(),
|
||||
envelopeElapsed: z.union([z.literal("on"), z.literal("off")]).optional(),
|
||||
contextTokens: z.number().int().positive().optional(),
|
||||
cliBackends: z.record(z.string(), CliBackendSchema).optional(),
|
||||
memorySearch: MemorySearchSchema,
|
||||
|
||||
Reference in New Issue
Block a user