chore: auto-commit (11 archivos)

- app.md
- call_monitor
- db.go
- main.go
- operations.db
- operations.db-shm
- operations.db-wal
- migrations/006_function_sequences.sql
- migrations/007_calls_command_snippet.sql
- sequences.go
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-14 02:06:45 +02:00
parent c4f08bc0c3
commit 134d8cf59e
12 changed files with 735 additions and 6 deletions
+18
View File
@@ -0,0 +1,18 @@
-- function_sequences: secuencias A→B(→C) repetidas de calls del agente.
-- Issue 0087 parte B. Candidatas a promoverse a pipeline one-shot.
-- Aditivo. Idempotente. Aplicado via embed.FS al abrir operations.db.
CREATE TABLE IF NOT EXISTS function_sequences (
seq_hash TEXT PRIMARY KEY,
function_ids TEXT NOT NULL, -- JSON array ["fn_a","fn_b"] o ["fn_a","fn_b","fn_c"]
length INTEGER NOT NULL,
occurrences INTEGER NOT NULL DEFAULT 0,
sessions_count INTEGER NOT NULL DEFAULT 0,
success_count INTEGER NOT NULL DEFAULT 0,
last_seen INTEGER NOT NULL,
first_seen INTEGER NOT NULL
);
CREATE INDEX IF NOT EXISTS idx_function_sequences_occurrences ON function_sequences(occurrences);
CREATE INDEX IF NOT EXISTS idx_function_sequences_last_seen ON function_sequences(last_seen);
CREATE INDEX IF NOT EXISTS idx_function_sequences_length ON function_sequences(length);
+13
View File
@@ -0,0 +1,13 @@
-- 007_calls_command_snippet.sql — issue 0087
--
-- Anade columna command_snippet a `calls` para guardar un fragmento del
-- comando/heredoc original cuando NO golpea una funcion del registry
-- (function_id == ''). Sirve al Monitor tab del registry_dashboard para
-- mostrar "que codigo lanzo Claude" en filas que no son llamadas registry.
--
-- - Solo se rellena cuando function_id IS empty (politica del hook PostToolUse).
-- - Truncado a 200 chars maximo. Redactado: args sensibles (paths privados,
-- tokens, passwords) se reemplazan por <REDACTED> antes de persistir.
-- - Aditivo, idempotente. SQLite < 3.35 no soporta DROP COLUMN, asi que
-- esta columna se queda para siempre — perfecto, es nuestra intencion.
ALTER TABLE calls ADD COLUMN command_snippet TEXT NOT NULL DEFAULT '';