facult 2.7.4 → 2.7.7
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 +3 -2
- package/package.json +1 -1
- package/src/adapters/codex.ts +1 -1
- package/src/ai.ts +34 -3
- package/src/doctor.ts +81 -6
- package/src/index.ts +116 -21
- package/src/manage.ts +724 -71
- package/src/project-sync.ts +15 -2
- package/src/scan.ts +5 -1
package/src/project-sync.ts
CHANGED
|
@@ -2,12 +2,17 @@ import { mkdir } from "node:fs/promises";
|
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { projectRootFromAiRoot } from "./paths";
|
|
4
4
|
|
|
5
|
-
type ProjectSyncNamedSurface =
|
|
5
|
+
type ProjectSyncNamedSurface =
|
|
6
|
+
| "skills"
|
|
7
|
+
| "agents"
|
|
8
|
+
| "automations"
|
|
9
|
+
| "mcpServers";
|
|
6
10
|
type ProjectSyncToolSurface = "globalDocs" | "toolRules" | "toolConfig";
|
|
7
11
|
|
|
8
12
|
interface ProjectSyncToolPolicy {
|
|
9
13
|
skills: string[];
|
|
10
14
|
agents: string[];
|
|
15
|
+
automations: string[];
|
|
11
16
|
mcpServers: string[];
|
|
12
17
|
globalDocs: boolean;
|
|
13
18
|
toolRules: boolean;
|
|
@@ -69,6 +74,7 @@ function projectSyncToolPolicyFromObject(
|
|
|
69
74
|
return {
|
|
70
75
|
skills: parseStringList(table.skills),
|
|
71
76
|
agents: parseStringList(table.agents),
|
|
77
|
+
automations: parseStringList(table.automations ?? table.automation),
|
|
72
78
|
mcpServers: parseStringList(table.mcp_servers ?? table.mcp),
|
|
73
79
|
globalDocs: parseBoolean(table.global_docs ?? table.docs),
|
|
74
80
|
toolRules: parseBoolean(table.tool_rules ?? table.rules),
|
|
@@ -104,6 +110,7 @@ function emptyPolicy(): ProjectSyncToolPolicy {
|
|
|
104
110
|
return {
|
|
105
111
|
skills: [],
|
|
106
112
|
agents: [],
|
|
113
|
+
automations: [],
|
|
107
114
|
mcpServers: [],
|
|
108
115
|
globalDocs: false,
|
|
109
116
|
toolRules: false,
|
|
@@ -150,7 +157,9 @@ export async function projectSyncAllowsNamedAsset(args: {
|
|
|
150
157
|
? policy.skills
|
|
151
158
|
: args.surface === "agents"
|
|
152
159
|
? policy.agents
|
|
153
|
-
:
|
|
160
|
+
: args.surface === "automations"
|
|
161
|
+
? policy.automations
|
|
162
|
+
: policy.mcpServers;
|
|
154
163
|
return includesExplicitName(allowed, args.name);
|
|
155
164
|
}
|
|
156
165
|
|
|
@@ -256,6 +265,9 @@ export async function writeProjectSyncPolicy(args: {
|
|
|
256
265
|
const mergedPolicy: ProjectSyncToolPolicy = {
|
|
257
266
|
skills: parseStringList(partialPolicy.skills ?? previousPolicy.skills),
|
|
258
267
|
agents: parseStringList(partialPolicy.agents ?? previousPolicy.agents),
|
|
268
|
+
automations: parseStringList(
|
|
269
|
+
partialPolicy.automations ?? previousPolicy.automations
|
|
270
|
+
),
|
|
259
271
|
mcpServers: parseStringList(
|
|
260
272
|
partialPolicy.mcpServers ?? previousPolicy.mcpServers
|
|
261
273
|
),
|
|
@@ -267,6 +279,7 @@ export async function writeProjectSyncPolicy(args: {
|
|
|
267
279
|
projectSync[tool] = {
|
|
268
280
|
skills: mergedPolicy.skills,
|
|
269
281
|
agents: mergedPolicy.agents,
|
|
282
|
+
automations: mergedPolicy.automations,
|
|
270
283
|
mcp_servers: mergedPolicy.mcpServers,
|
|
271
284
|
global_docs: mergedPolicy.globalDocs,
|
|
272
285
|
tool_rules: mergedPolicy.toolRules,
|
package/src/scan.ts
CHANGED
|
@@ -2268,6 +2268,7 @@ Notes:
|
|
|
2268
2268
|
|
|
2269
2269
|
Options:
|
|
2270
2270
|
--json Print full JSON (ScanResult)
|
|
2271
|
+
--persist Persist scan state when using --json
|
|
2271
2272
|
--show-duplicates Print duplicates for skills, MCP servers, and hook assets
|
|
2272
2273
|
--tui Render scan output in an interactive TUI (skills list)
|
|
2273
2274
|
--no-config-from Disable default scan roots from ~/.ai/.facult/config.json (scanFrom)
|
|
@@ -2287,6 +2288,7 @@ export async function scanCommand(argv: string[]) {
|
|
|
2287
2288
|
}
|
|
2288
2289
|
|
|
2289
2290
|
const json = argv.includes("--json");
|
|
2291
|
+
const persist = argv.includes("--persist") || !json;
|
|
2290
2292
|
const showDuplicates = argv.includes("--show-duplicates");
|
|
2291
2293
|
const tui = argv.includes("--tui");
|
|
2292
2294
|
const noConfigFrom = argv.includes("--no-config-from");
|
|
@@ -2427,7 +2429,9 @@ export async function scanCommand(argv: string[]) {
|
|
|
2427
2429
|
maxResults: fromMaxResults,
|
|
2428
2430
|
},
|
|
2429
2431
|
});
|
|
2430
|
-
|
|
2432
|
+
if (persist) {
|
|
2433
|
+
await writeState(res);
|
|
2434
|
+
}
|
|
2431
2435
|
|
|
2432
2436
|
if (json) {
|
|
2433
2437
|
if (tui) {
|