facult 2.6.0 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "facult",
3
- "version": "2.6.0",
3
+ "version": "2.7.1",
4
4
  "description": "Manage canonical AI capabilities, sync surfaces, and evolution state.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -10,7 +10,7 @@ export const codexAdapter: ToolAdapter = {
10
10
  detectVersion: detectExplicitVersion,
11
11
  getDefaultPaths: () => ({
12
12
  mcp: "~/.codex/mcp.json",
13
- skills: "~/.codex/skills",
13
+ skills: ["~/.agents/skills", "~/.codex/skills"],
14
14
  agents: "~/.codex/agents",
15
15
  config: "~/.config/openai/codex.json",
16
16
  }),
@@ -9,6 +9,10 @@ import {
9
9
  sanitizeCodexTomlMcpText,
10
10
  } from "../util/codex-toml";
11
11
  import { parseJsonLenient } from "../util/json";
12
+ import {
13
+ applyAuditSuppressionsToAgentReport,
14
+ loadAuditSuppressions,
15
+ } from "./suppressions";
12
16
  import {
13
17
  type AuditFinding,
14
18
  type AuditItemResult,
@@ -926,27 +930,7 @@ export async function runAgentAudit(opts?: {
926
930
  });
927
931
  }
928
932
 
929
- // Summary
930
- const bySeverity: Record<Severity, number> = {
931
- low: 0,
932
- medium: 0,
933
- high: 0,
934
- critical: 0,
935
- };
936
- let totalFindings = 0;
937
- let flaggedItems = 0;
938
-
939
- for (const r of results) {
940
- totalFindings += r.findings.length;
941
- if (!r.passed && r.findings.length > 0) {
942
- flaggedItems += 1;
943
- }
944
- for (const f of r.findings) {
945
- bySeverity[f.severity] += 1;
946
- }
947
- }
948
-
949
- const report: AgentAuditReport = {
933
+ let report: AgentAuditReport = {
950
934
  timestamp: new Date().toISOString(),
951
935
  mode: "agent",
952
936
  agent: { tool, model },
@@ -972,12 +956,30 @@ export async function runAgentAudit(opts?: {
972
956
  }),
973
957
  summary: {
974
958
  totalItems: results.length,
975
- totalFindings,
976
- bySeverity,
977
- flaggedItems,
959
+ totalFindings: results.reduce(
960
+ (sum, result) => sum + result.findings.length,
961
+ 0
962
+ ),
963
+ bySeverity: results.reduce<Record<Severity, number>>(
964
+ (acc, result) => {
965
+ for (const finding of result.findings) {
966
+ acc[finding.severity] += 1;
967
+ }
968
+ return acc;
969
+ },
970
+ { low: 0, medium: 0, high: 0, critical: 0 }
971
+ ),
972
+ flaggedItems: results.filter(
973
+ (result) => !result.passed && result.findings.length > 0
974
+ ).length,
978
975
  },
979
976
  };
980
977
 
978
+ report = applyAuditSuppressionsToAgentReport(
979
+ report,
980
+ await loadAuditSuppressions(home)
981
+ );
982
+
981
983
  const auditDir = join(facultStateDir(home), "audit");
982
984
  await mkdir(auditDir, { recursive: true });
983
985
  await Bun.write(