summaryrefslogtreecommitdiff
path: root/Omni/Agent/Paths.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-12-17 22:05:40 -0500
committerBen Sima <ben@bensima.com>2025-12-17 22:05:40 -0500
commite2ea8308d74582d5651ed933dea9428ce8982d25 (patch)
treee19662b502f1dedb5396673032be39ebc31a99f3 /Omni/Agent/Paths.hs
parentb384667997140a5e561572e41fe924d10ea7a660 (diff)
feat(ava): subagent hardening with audit logging
Based on Anthropic's effective harnesses research. New modules: - Omni/Agent/AuditLog.hs: JSONL audit logging with SubagentId linking - Omni/Agent/Tools/AvaLogs.hs: Tool for Ava to query her own logs - Omni/Agent/Subagent/HARDENING.md: Design documentation Key features: - SubagentHandle with TVar status for async execution and polling - spawnSubagentAsync, querySubagentStatus, waitSubagent, cancelSubagent - User confirmation: spawn_subagent requires confirmed=true after approval - Audit logs stored in $AVA_DATA_ROOT/logs/{ava,subagents}/ - CLI: ava logs [--last=N] [<subagent_id>] - read_ava_logs tool for Ava self-diagnosis Tasks: t-267, t-268, t-269, t-270, t-271
Diffstat (limited to 'Omni/Agent/Paths.hs')
-rw-r--r--Omni/Agent/Paths.hs21
1 files changed, 17 insertions, 4 deletions
diff --git a/Omni/Agent/Paths.hs b/Omni/Agent/Paths.hs
index 6facdc6..6df6991 100644
--- a/Omni/Agent/Paths.hs
+++ b/Omni/Agent/Paths.hs
@@ -1,5 +1,5 @@
-{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE NoImplicitPrelude #-}
-- | Configurable paths for Ava data directories.
--
@@ -11,6 +11,9 @@ module Omni.Agent.Paths
outreachDir,
userScratchRoot,
userScratchDir,
+ logsDir,
+ avaLogsDir,
+ subagentLogsDir,
)
where
@@ -21,9 +24,10 @@ import System.FilePath ((</>))
import System.IO.Unsafe (unsafePerformIO)
avaDataRoot :: FilePath
-avaDataRoot = unsafePerformIO <| do
- m <- lookupEnv "AVA_DATA_ROOT"
- pure (fromMaybe "_/var/ava" m)
+avaDataRoot =
+ unsafePerformIO <| do
+ m <- lookupEnv "AVA_DATA_ROOT"
+ pure (fromMaybe "_/var/ava" m)
{-# NOINLINE avaDataRoot #-}
skillsDir :: FilePath
@@ -37,3 +41,12 @@ userScratchRoot = avaDataRoot </> "users"
userScratchDir :: Text -> FilePath
userScratchDir user = userScratchRoot </> Text.unpack user
+
+logsDir :: FilePath
+logsDir = avaDataRoot </> "logs"
+
+avaLogsDir :: FilePath
+avaLogsDir = logsDir </> "ava"
+
+subagentLogsDir :: FilePath
+subagentLogsDir = logsDir </> "subagents"