Integrate Hipocap security and Laminar observability

Add Hipocap security middleware for prompt and tool call analysis, integrates Laminar observability for tracing and token usage, and introduces a Hipocap management tool.

Updates configuration schemas, onboarding wizard, and system prompt

Enhances agent run and reply flows with security checks and observability spans.
This commit is contained in:
Ayaan Zaidi authored and Professor committed 2026-01-30 15:52:40 +05:30
1 parent f760aa302c
commit f8de618bc7
27 files changed
+2122 -337

No files matched your search

+27 -21
View File
@@ -17,6 +17,7 @@ export const CONFIGURE_WIZARD_SECTIONS = [
"channels",
"skills",
"health",
"hipocap",
] as const;
export type WizardSection = (typeof CONFIGURE_WIZARD_SECTIONS)[number];
@@ -33,27 +34,32 @@ export const CONFIGURE_SECTION_OPTIONS: Array<{
label: string;
hint: string;
}> = [
{ value: "workspace", label: "Workspace", hint: "Set workspace + sessions" },
{ value: "model", label: "Model", hint: "Pick provider + credentials" },
{ value: "web", label: "Web tools", hint: "Configure Brave search + fetch" },
{ value: "gateway", label: "Gateway", hint: "Port, bind, auth, tailscale" },
{
value: "daemon",
label: "Daemon",
hint: "Install/manage the background service",
},
{
value: "channels",
label: "Channels",
hint: "Link WhatsApp/Telegram/etc and defaults",
},
{ value: "skills", label: "Skills", hint: "Install/enable workspace skills" },
{
value: "health",
label: "Health check",
hint: "Run gateway + channel checks",
},
];
{ value: "workspace", label: "Workspace", hint: "Set workspace + sessions" },
{ value: "model", label: "Model", hint: "Pick provider + credentials" },
{ value: "web", label: "Web tools", hint: "Configure Brave search + fetch" },
{ value: "gateway", label: "Gateway", hint: "Port, bind, auth, tailscale" },
{
value: "daemon",
label: "Daemon",
hint: "Install/manage the background service",
},
{
value: "channels",
label: "Channels",
hint: "Link WhatsApp/Telegram/etc and defaults",
},
{ value: "skills", label: "Skills", hint: "Install/enable workspace skills" },
{
value: "health",
label: "Health check",
hint: "Run gateway + channel checks",
},
{
value: "hipocap",
label: "Hipocap Security",
hint: "AI Security Policy and Observability",
},
];
export const intro = (message: string) => clackIntro(stylePromptTitle(message) ?? message);
export const outro = (message: string) => clackOutro(stylePromptTitle(message) ?? message);
+13 -3
View File
@@ -42,6 +42,7 @@ import {
} from "./onboard-helpers.js";
import { promptRemoteGatewayConfig } from "./onboard-remote.js";
import { setupSkills } from "./onboard-skills.js";
import { setupHipocap } from "../wizard/onboarding.hipocap.js";
type ConfigureSectionChoice = WizardSection | "__continue";
@@ -212,9 +213,9 @@ export async function runConfigureWizard(
const remoteUrl = baseConfig.gateway?.remote?.url?.trim() ?? "";
const remoteProbe = remoteUrl
? await probeGatewayReachable({
url: remoteUrl,
token: baseConfig.gateway?.remote?.token,
})
url: remoteUrl,
token: baseConfig.gateway?.remote?.token,
})
: null;
const mode = guardCancel(
@@ -349,6 +350,10 @@ export async function runConfigureWizard(
nextConfig = await setupSkills(nextConfig, wsDir, runtime, prompter);
}
if (selected.includes("hipocap")) {
nextConfig = await setupHipocap(nextConfig, runtime, prompter);
}
await persistConfig();
if (selected.includes("daemon")) {
@@ -473,6 +478,11 @@ export async function runConfigureWizard(
await persistConfig();
}
if (choice === "hipocap") {
nextConfig = await setupHipocap(nextConfig, runtime, prompter);
await persistConfig();
}
if (choice === "daemon") {
if (!didConfigureGateway) {
const portInput = guardCancel(