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/README.md +145 -337
- package/package.json +1 -1
- package/src/adapters/codex.ts +1 -1
- package/src/audit/agent.ts +26 -24
- package/src/audit/fix.ts +875 -0
- package/src/audit/index.ts +51 -2
- package/src/audit/safe.ts +596 -0
- package/src/audit/static.ts +151 -34
- package/src/audit/status.ts +21 -0
- package/src/audit/suppressions.ts +266 -0
- package/src/audit/tui.ts +784 -174
- package/src/audit/update-index.ts +4 -17
- package/src/builtin.ts +7 -1
- package/src/cli-ui.ts +375 -0
- package/src/consolidate.ts +151 -55
- package/src/doctor.ts +327 -0
- package/src/global-docs.ts +43 -2
- package/src/index.ts +571 -292
- package/src/manage.ts +931 -88
- package/src/mcp-config.ts +132 -0
- package/src/project-sync.ts +288 -0
- package/src/remote.ts +387 -117
- package/src/trust.ts +119 -11
- package/src/util/git.ts +95 -0
package/package.json
CHANGED
package/src/adapters/codex.ts
CHANGED
|
@@ -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
|
}),
|
package/src/audit/agent.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
977
|
-
|
|
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(
|