facult 1.0.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/LICENSE +21 -0
- package/README.md +383 -0
- package/bin/facult.cjs +302 -0
- package/package.json +78 -0
- package/src/adapters/claude-cli.ts +18 -0
- package/src/adapters/claude-desktop.ts +15 -0
- package/src/adapters/clawdbot.ts +18 -0
- package/src/adapters/codex.ts +19 -0
- package/src/adapters/cursor.ts +18 -0
- package/src/adapters/index.ts +69 -0
- package/src/adapters/mcp.ts +270 -0
- package/src/adapters/reference.ts +9 -0
- package/src/adapters/skills.ts +47 -0
- package/src/adapters/types.ts +42 -0
- package/src/adapters/version.ts +18 -0
- package/src/audit/agent.ts +1071 -0
- package/src/audit/index.ts +74 -0
- package/src/audit/static.ts +1130 -0
- package/src/audit/tui.ts +704 -0
- package/src/audit/types.ts +68 -0
- package/src/audit/update-index.ts +115 -0
- package/src/conflicts.ts +135 -0
- package/src/consolidate-conflict-action.ts +57 -0
- package/src/consolidate.ts +1637 -0
- package/src/enable-disable.ts +349 -0
- package/src/index-builder.ts +562 -0
- package/src/index.ts +589 -0
- package/src/manage.ts +894 -0
- package/src/migrate.ts +272 -0
- package/src/paths.ts +238 -0
- package/src/quarantine.ts +217 -0
- package/src/query.ts +186 -0
- package/src/remote-manifest-integrity.ts +367 -0
- package/src/remote-providers.ts +905 -0
- package/src/remote-source-policy.ts +237 -0
- package/src/remote-sources.ts +162 -0
- package/src/remote-types.ts +136 -0
- package/src/remote.ts +1970 -0
- package/src/scan.ts +2427 -0
- package/src/schema.ts +39 -0
- package/src/self-update.ts +408 -0
- package/src/snippets-cli.ts +293 -0
- package/src/snippets.ts +706 -0
- package/src/source-trust.ts +203 -0
- package/src/trust-list.ts +232 -0
- package/src/trust.ts +170 -0
- package/src/tui.ts +118 -0
- package/src/util/codex-toml.ts +126 -0
- package/src/util/json.ts +32 -0
- package/src/util/skills.ts +55 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { agentAuditCommand } from "./agent";
|
|
2
|
+
import { staticAuditCommand } from "./static";
|
|
3
|
+
import { auditTuiCommand } from "./tui";
|
|
4
|
+
|
|
5
|
+
function printHelp() {
|
|
6
|
+
console.log(`facult audit — security audit for local agent assets
|
|
7
|
+
|
|
8
|
+
Usage:
|
|
9
|
+
facult audit [--from <path>] [--no-config-from]
|
|
10
|
+
facult audit --non-interactive [name|mcp:<name>] [--severity <level>] [--rules <path>] [--from <path>] [--json]
|
|
11
|
+
facult audit --non-interactive [name|mcp:<name>] --with <claude|codex> [--from <path>] [--max-items <n|all>] [--json]
|
|
12
|
+
|
|
13
|
+
Legacy (still supported; prefer --non-interactive):
|
|
14
|
+
facult audit static ...
|
|
15
|
+
facult audit agent ...
|
|
16
|
+
facult audit tui
|
|
17
|
+
`);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export async function auditCommand(argv: string[]) {
|
|
21
|
+
if (argv.includes("--help") || argv.includes("-h") || argv[0] === "help") {
|
|
22
|
+
printHelp();
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const nonInteractive = argv.includes("--non-interactive");
|
|
27
|
+
const firstPositional = argv.find((a) => a && !a.startsWith("-")) ?? null;
|
|
28
|
+
|
|
29
|
+
const rest = argv.filter((a) => a !== "--non-interactive");
|
|
30
|
+
|
|
31
|
+
if (nonInteractive) {
|
|
32
|
+
// Optional: allow `facult audit --non-interactive static ...` / `... agent ...`
|
|
33
|
+
const sub = firstPositional;
|
|
34
|
+
const subArgs =
|
|
35
|
+
sub === "static" || sub === "agent" || sub === "tui" || sub === "wizard"
|
|
36
|
+
? rest.slice(1)
|
|
37
|
+
: rest;
|
|
38
|
+
|
|
39
|
+
const hasWith =
|
|
40
|
+
subArgs.includes("--with") ||
|
|
41
|
+
subArgs.some((a) => a.startsWith("--with="));
|
|
42
|
+
|
|
43
|
+
if (sub === "agent" || hasWith) {
|
|
44
|
+
await agentAuditCommand(subArgs);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
await staticAuditCommand(subArgs);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Back-compat: keep subcommands working, but steer usage to the new default.
|
|
52
|
+
if (firstPositional === "static") {
|
|
53
|
+
console.error(
|
|
54
|
+
'Deprecated: use "facult audit --non-interactive ..." instead of "facult audit static ...".'
|
|
55
|
+
);
|
|
56
|
+
await staticAuditCommand(argv.slice(1));
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (firstPositional === "agent") {
|
|
60
|
+
console.error(
|
|
61
|
+
'Deprecated: use "facult audit --non-interactive --with claude|codex ..." instead of "facult audit agent ...".'
|
|
62
|
+
);
|
|
63
|
+
await agentAuditCommand(argv.slice(1));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (firstPositional === "tui" || firstPositional === "wizard") {
|
|
67
|
+
console.error('Tip: "facult audit" is now interactive by default.');
|
|
68
|
+
await auditTuiCommand(argv.slice(1));
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Default: interactive wizard.
|
|
73
|
+
await auditTuiCommand(argv);
|
|
74
|
+
}
|