feat(coder,server): audit engine — session audit, guideline compliance, user correction tracking
Implements audit-harness-inspired session lifecycle: audit session creation/end/recover/report-daily with JSONL buffer and graded context recovery (L0-L4). Guideline service for behavioral compliance rules (condition/action model with criticality). Correction service for persistent user correction tracking across agent sessions. 8 supporting skills: audit-start/end/report-daily/recover + command variants for slash-command integration.
This commit is contained in:
68
apps/server/src/services/audit/index.ts
Normal file
68
apps/server/src/services/audit/index.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
export {
|
||||
findRunsDir,
|
||||
ensureRunsDir,
|
||||
readCurrentSession,
|
||||
writeCurrentSession,
|
||||
clearCurrentSession,
|
||||
readIndex,
|
||||
writeIndex,
|
||||
updateIndexEntry,
|
||||
findInProgressSessions,
|
||||
INDEX_SCHEMA_VERSION,
|
||||
GITIGNORE_CONTENT,
|
||||
} from './runs-dir.js';
|
||||
export type { IndexEntry, IndexFile } from './runs-dir.js';
|
||||
|
||||
export {
|
||||
generateSessionId,
|
||||
isoNow,
|
||||
createSession,
|
||||
getSessionDir,
|
||||
getActiveSession,
|
||||
readSession,
|
||||
updateSession,
|
||||
endSession,
|
||||
appendToTrail,
|
||||
readTrail,
|
||||
recoverContext,
|
||||
checkUnfinishedSessions,
|
||||
generateSessionSummary,
|
||||
} from './session-manager.js';
|
||||
export type { SessionJson, RecoverySummary } from './session-manager.js';
|
||||
|
||||
export {
|
||||
createCorrection,
|
||||
findCorrections,
|
||||
checkCorrectionConflict,
|
||||
} from './corrections.js';
|
||||
export type { UserCorrectionRecord } from './corrections.js';
|
||||
|
||||
export {
|
||||
GuidelineDocumentStore,
|
||||
} from './guideline-store.js';
|
||||
export type {
|
||||
GuidelineId,
|
||||
GuidelineContent,
|
||||
Guideline,
|
||||
Criticality,
|
||||
GuidelineUpdateParams,
|
||||
GuidelineDocument,
|
||||
} from './guideline-store.js';
|
||||
|
||||
export {
|
||||
JourneyStore,
|
||||
} from './journey-store.js';
|
||||
export type {
|
||||
JourneyId,
|
||||
JourneyNodeId,
|
||||
JourneyEdgeId,
|
||||
Journey,
|
||||
JourneyNode,
|
||||
JourneyEdge,
|
||||
} from './journey-store.js';
|
||||
|
||||
export {
|
||||
projectJourneyToGuidelines,
|
||||
detectJourneyBacktrack,
|
||||
} from './journey-projection.js';
|
||||
export type { ProjectedGuideline, BacktrackCheck } from './journey-projection.js';
|
||||
Reference in New Issue
Block a user