- Add intelligent-router.sh hook for automatic agent routing - Add AUTO-TRIGGER-SUMMARY.md documentation - Add FINAL-INTEGRATION-SUMMARY.md documentation - Complete Prometheus integration (6 commands + 4 tools) - Complete Dexto integration (12 commands + 5 tools) - Enhanced Ralph with access to all agents - Fix /clawd command (removed disable-model-invocation) - Update hooks.json to v5 with intelligent routing - 291 total skills now available - All 21 commands with automatic routing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
23 lines
910 B
TypeScript
23 lines
910 B
TypeScript
import { prettyJSON } from 'hono/pretty-json';
|
|
import type { MiddlewareHandler } from 'hono';
|
|
import { redactSensitiveData } from '@dexto/core';
|
|
|
|
export const prettyJsonMiddleware = prettyJSON();
|
|
|
|
export const redactionMiddleware: MiddlewareHandler = async (ctx, next) => {
|
|
// TODO: tighten types once Hono exposes typed overrides for ctx.json/ctx.body
|
|
const originalJson = ctx.json.bind(ctx) as any;
|
|
ctx.json = ((data: any, status?: any, headers?: any) => {
|
|
const redacted = redactSensitiveData(data);
|
|
return originalJson(redacted, status, headers);
|
|
}) as typeof ctx.json;
|
|
|
|
const originalBody = ctx.body.bind(ctx) as any;
|
|
ctx.body = ((data: any, status?: any, headers?: any) => {
|
|
const payload = typeof data === 'string' ? redactSensitiveData(data) : data;
|
|
return originalBody(payload, status, headers);
|
|
}) as typeof ctx.body;
|
|
|
|
await next();
|
|
};
|