@phren/cli 0.1.32 → 0.1.33
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/dist/capabilities/cli.js +2 -2
- package/dist/cli/config-access.d.ts +1 -0
- package/dist/cli/config-access.js +59 -0
- package/dist/cli/config-llm.d.ts +1 -0
- package/dist/cli/config-llm.js +60 -0
- package/dist/cli/config-policy.d.ts +11 -0
- package/dist/cli/config-policy.js +328 -0
- package/dist/cli/config-proactivity.d.ts +15 -0
- package/dist/cli/config-proactivity.js +129 -0
- package/dist/cli/config-shared.d.ts +6 -0
- package/dist/cli/config-shared.js +23 -0
- package/dist/cli/config-synonyms.d.ts +1 -0
- package/dist/cli/config-synonyms.js +60 -0
- package/dist/cli/config.d.ts +6 -24
- package/dist/cli/config.js +13 -670
- package/dist/finding-graph-id.d.ts +15 -0
- package/dist/finding-graph-id.js +58 -0
- package/dist/generated/memory-ui-graph.browser.js +15 -15
- package/dist/governance/activity.d.ts +36 -0
- package/dist/governance/activity.js +83 -0
- package/dist/governance/rbac.d.ts +17 -0
- package/dist/governance/rbac.js +37 -1
- package/dist/memory-ui-graph.runtime.js +15 -15
- package/dist/phren-paths.d.ts +6 -0
- package/dist/phren-paths.js +8 -0
- package/dist/shared/governance.d.ts +1 -0
- package/dist/shared/governance.js +1 -0
- package/dist/shared.d.ts +1 -1
- package/dist/shared.js +1 -1
- package/dist/tools/config.js +39 -2
- package/dist/tools/search.js +28 -1
- package/dist/ui/data.d.ts +2 -0
- package/dist/ui/data.js +8 -3
- package/dist/ui/graph.js +2 -0
- package/dist/ui/page.js +45 -2
- package/dist/ui/scripts.d.ts +13 -0
- package/dist/ui/scripts.js +229 -2
- package/dist/ui/server.js +165 -1
- package/dist/ui/styles.d.ts +1 -0
- package/dist/ui/styles.js +38 -0
- package/package.json +1 -1
- package/dist/cli-hooks-prompt.d.ts +0 -18
- package/dist/cli-hooks-prompt.js +0 -359
- package/dist/cli-hooks-session-handlers.d.ts +0 -3
- package/dist/cli-hooks-session-handlers.js +0 -356
- package/dist/cli-hooks-stop.d.ts +0 -11
- package/dist/cli-hooks-stop.js +0 -584
- package/dist/init-bootstrap.d.ts +0 -5
- package/dist/init-bootstrap.js +0 -21
- package/dist/init-detect.d.ts +0 -8
- package/dist/init-detect.js +0 -38
- package/dist/init-env.d.ts +0 -6
- package/dist/init-env.js +0 -114
- package/dist/init-fresh.d.ts +0 -10
- package/dist/init-fresh.js +0 -234
- package/dist/init-hooks.d.ts +0 -5
- package/dist/init-hooks.js +0 -26
- package/dist/init-mcp.d.ts +0 -8
- package/dist/init-mcp.js +0 -65
- package/dist/init-modes.d.ts +0 -4
- package/dist/init-modes.js +0 -135
- package/dist/init-npm.d.ts +0 -10
- package/dist/init-npm.js +0 -37
- package/dist/init-project-local.d.ts +0 -2
- package/dist/init-project-local.js +0 -99
- package/dist/init-semantic.d.ts +0 -4
- package/dist/init-semantic.js +0 -48
- package/dist/init-types.d.ts +0 -59
- package/dist/init-types.js +0 -1
- package/dist/init-update.d.ts +0 -10
- package/dist/init-update.js +0 -96
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { getPhrenPath } from "../shared.js";
|
|
2
|
+
import { isValidProjectName, learnedSynonymsPath, learnSynonym, loadLearnedSynonyms, removeLearnedSynonym, } from "../utils.js";
|
|
3
|
+
// ── Synonyms ─────────────────────────────────────────────────────────────────
|
|
4
|
+
function printSynonymsUsage() {
|
|
5
|
+
console.error("Usage: phren config synonyms list <project>");
|
|
6
|
+
console.error(" phren config synonyms add <project> <term> <syn1,syn2,...>");
|
|
7
|
+
console.error(" phren config synonyms remove <project> <term> [syn1,syn2,...]");
|
|
8
|
+
}
|
|
9
|
+
function parseSynonymItems(raw) {
|
|
10
|
+
if (!raw)
|
|
11
|
+
return [];
|
|
12
|
+
return raw
|
|
13
|
+
.split(",")
|
|
14
|
+
.map((item) => item.trim())
|
|
15
|
+
.filter(Boolean);
|
|
16
|
+
}
|
|
17
|
+
export function handleConfigSynonyms(args) {
|
|
18
|
+
const phrenPath = getPhrenPath();
|
|
19
|
+
let action = args[0] || "list";
|
|
20
|
+
let project = args[1];
|
|
21
|
+
if (action !== "list" && action !== "add" && action !== "remove" && isValidProjectName(action)) {
|
|
22
|
+
project = action;
|
|
23
|
+
action = "list";
|
|
24
|
+
}
|
|
25
|
+
if (!project || !isValidProjectName(project)) {
|
|
26
|
+
printSynonymsUsage();
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
if (action === "list") {
|
|
30
|
+
console.log(JSON.stringify({
|
|
31
|
+
project,
|
|
32
|
+
path: learnedSynonymsPath(phrenPath, project),
|
|
33
|
+
synonyms: loadLearnedSynonyms(project, phrenPath),
|
|
34
|
+
}, null, 2));
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (action === "add") {
|
|
38
|
+
const term = args[2];
|
|
39
|
+
const synonyms = parseSynonymItems(args[3]);
|
|
40
|
+
if (!term || synonyms.length === 0) {
|
|
41
|
+
printSynonymsUsage();
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
const updated = learnSynonym(phrenPath, project, term, synonyms);
|
|
45
|
+
console.log(JSON.stringify({ project, term, synonyms: updated[term.toLowerCase()] ?? [], updated }, null, 2));
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (action === "remove") {
|
|
49
|
+
const term = args[2];
|
|
50
|
+
if (!term) {
|
|
51
|
+
printSynonymsUsage();
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
const updated = removeLearnedSynonym(phrenPath, project, term, parseSynonymItems(args[3]));
|
|
55
|
+
console.log(JSON.stringify({ project, term: term.toLowerCase(), updated }, null, 2));
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
printSynonymsUsage();
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
package/dist/cli/config.d.ts
CHANGED
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
proactivityFindings: "high" | "medium" | "low" | null;
|
|
8
|
-
proactivityTask: "high" | "medium" | "low" | null;
|
|
9
|
-
};
|
|
10
|
-
effective: {
|
|
11
|
-
proactivity: "high" | "medium" | "low";
|
|
12
|
-
proactivityFindings: "high" | "medium" | "low";
|
|
13
|
-
proactivityTask: "high" | "medium" | "low";
|
|
14
|
-
};
|
|
15
|
-
};
|
|
1
|
+
import { checkProjectInProfile } from "./config-shared.js";
|
|
2
|
+
import { handleIndexPolicy, handleRetentionPolicy, handleWorkflowPolicy } from "./config-policy.js";
|
|
3
|
+
import { handleConfigAccess } from "./config-access.js";
|
|
4
|
+
export { checkProjectInProfile, handleIndexPolicy, handleRetentionPolicy, handleWorkflowPolicy, handleConfigAccess };
|
|
5
|
+
export { buildProactivitySnapshot } from "./config-proactivity.js";
|
|
6
|
+
export { FINDING_SENSITIVITY_CONFIG } from "./config-policy.js";
|
|
16
7
|
export declare function handleConfig(args: string[]): Promise<void>;
|
|
17
|
-
export declare const FINDING_SENSITIVITY_CONFIG: Record<FindingSensitivityLevel, {
|
|
18
|
-
sessionCap: number;
|
|
19
|
-
proactivityFindings: string;
|
|
20
|
-
agentInstruction: string;
|
|
21
|
-
}>;
|
|
22
|
-
export declare function handleIndexPolicy(args: string[]): Promise<void>;
|
|
23
|
-
export declare function handleRetentionPolicy(args: string[]): Promise<void>;
|
|
24
|
-
export declare function handleWorkflowPolicy(args: string[]): Promise<void>;
|
|
25
|
-
export declare function handleConfigAccess(args: string[]): void;
|