feat: implement tier 1 quick wins (tool groups, typing, pruning, verbose, think)
Five additive features with no breaking changes: - Tool groups: group:fs, group:runtime, group:web, group:memory syntactic sugar for allow/deny lists in tool policy config - Typing indicators: Discord sendTyping() and WhatsApp sendStateTyping() on message receipt for better UX feedback - Session pruning: TTL-based auto-cleanup via sessions.ttl config with hourly daemon timer and SQLite GROUP BY pruning - /verbose command: TUI command parser toggle for raw streaming display - !!think prefix: per-message extended thinking mode wired through Anthropic (budget_tokens), OpenAI/GitHub (reasoning_effort), and Gemini (thinkingConfig) providers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,18 @@ const modelConfigSchema = modelConfigBaseSchema.extend({
|
||||
fallback: modelConfigBaseSchema.optional(),
|
||||
});
|
||||
|
||||
const thinkingSchema = z.object({
|
||||
anthropic: z.object({
|
||||
budgetTokens: z.number().default(4096),
|
||||
}).default({}),
|
||||
openai: z.object({
|
||||
reasoningEffort: z.enum(['low', 'medium', 'high']).default('medium'),
|
||||
}).default({}),
|
||||
gemini: z.object({
|
||||
budgetTokens: z.number().default(4096),
|
||||
}).default({}),
|
||||
}).default({});
|
||||
|
||||
const modelsSchema = z.object({
|
||||
local: modelConfigSchema.optional(),
|
||||
fast: modelConfigSchema.optional(),
|
||||
@@ -40,6 +52,7 @@ const modelsSchema = z.object({
|
||||
complex: modelConfigSchema.optional(),
|
||||
fallback_chain: z.array(z.string()).default(['anthropic']),
|
||||
local_providers: z.record(z.string(), modelConfigSchema).optional(),
|
||||
thinking: thinkingSchema,
|
||||
});
|
||||
|
||||
const backendsSchema = z.object({
|
||||
@@ -250,6 +263,10 @@ const promptSchema = z.object({
|
||||
})).default([]),
|
||||
}).default({});
|
||||
|
||||
const sessionsSchema = z.object({
|
||||
ttl: z.string().default('30d'),
|
||||
}).default({});
|
||||
|
||||
export const configSchema = z.object({
|
||||
telegram: telegramSchema,
|
||||
discord: discordSchema,
|
||||
@@ -275,6 +292,7 @@ export const configSchema = z.object({
|
||||
sandbox: sandboxSchema,
|
||||
agent_configs: agentConfigsSchema,
|
||||
routing: routingSchema,
|
||||
sessions: sessionsSchema,
|
||||
});
|
||||
|
||||
export type Config = z.infer<typeof configSchema>;
|
||||
@@ -300,3 +318,5 @@ export type SandboxConfig = z.infer<typeof sandboxSchema>;
|
||||
export type AgentConfigEntry = z.infer<typeof agentConfigEntrySchema>;
|
||||
export type RoutingConfig = z.infer<typeof routingSchema>;
|
||||
export type ServerConfig = z.infer<typeof serverSchema>;
|
||||
export type SessionsConfig = z.infer<typeof sessionsSchema>;
|
||||
export type ThinkingConfig = z.infer<typeof thinkingSchema>;
|
||||
|
||||
Reference in New Issue
Block a user