@phren/cli 0.1.27 → 0.1.28
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/cli/actions.d.ts +1 -1
- package/dist/cli/actions.js +1 -12
- package/dist/cli/namespaces-profile.d.ts +1 -1
- package/dist/cli/namespaces-profile.js +4 -6
- package/dist/cli/namespaces-skills.js +2 -2
- package/dist/cli/namespaces-store.js +1 -2
- package/dist/cli/namespaces-utils.d.ts +0 -1
- package/dist/cli/namespaces-utils.js +0 -7
- package/dist/cli/search.js +0 -12
- package/dist/cli/team.js +1 -23
- package/dist/cli-handlers.d.ts +17 -0
- package/dist/cli-handlers.js +204 -0
- package/dist/cli-help.d.ts +6 -0
- package/dist/cli-help.js +125 -0
- package/dist/cli-registry.d.ts +45 -0
- package/dist/cli-registry.js +715 -0
- package/dist/entrypoint.d.ts +0 -1
- package/dist/entrypoint.js +74 -420
- package/dist/phren-paths.d.ts +1 -0
- package/dist/phren-paths.js +1 -1
- package/dist/proactivity.d.ts +1 -0
- package/dist/proactivity.js +1 -1
- package/dist/shared.d.ts +2 -2
- package/dist/shared.js +2 -2
- package/dist/utils-helpers.d.ts +2 -0
- package/dist/utils-helpers.js +24 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +4 -6
- package/package.json +1 -1
- package/dist/cli/cli.d.ts +0 -3
- package/dist/cli/cli.js +0 -125
package/dist/utils.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
// Barrel re-export
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
// utils-fts.ts — FTS5 sanitization, synonym expansion, keyword extraction, query building
|
|
6
|
-
export { runGitOrThrow, runGit, normalizeExecCommand, resolveExecCommand, errorMessage, isFeatureEnabled, clampInt, } from "./utils-helpers.js";
|
|
1
|
+
// Barrel re-export. Implementations split across utils-helpers.ts (general
|
|
2
|
+
// helpers, argv parsing, exec helpers), utils-paths.ts (path validation),
|
|
3
|
+
// utils-fts.ts (FTS5 query building, synonym/keyword extraction).
|
|
4
|
+
export { runGitOrThrow, runGit, normalizeExecCommand, resolveExecCommand, errorMessage, isFeatureEnabled, clampInt, getOptionValue, getPositionalArgs, } from "./utils-helpers.js";
|
|
7
5
|
export { isValidProjectName, safeProjectPath, queueFilePath, } from "./utils-paths.js";
|
|
8
6
|
export { STOP_WORDS, extractKeywordEntries, extractKeywords, learnedSynonymsPath, loadLearnedSynonyms, loadSynonymMap, learnSynonym, removeLearnedSynonym, sanitizeFts5Query, buildRobustFtsQuery, buildRelaxedFtsQuery, buildFtsQueryVariants, } from "./utils-fts.js";
|
package/package.json
CHANGED
package/dist/cli/cli.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { detectTaskIntent, parseHookInput, applyTrustFilter, rankResults, selectSnippets, buildHookOutput, trackSessionMetrics, filterTaskByPriority, parseCitations, validateCitation, annotateStale, getProjectGlobBoost, clearProjectGlobCache, clearCitationValidCache, filterConversationInsightsForProactivity, extractToolFindings, filterToolFindingsForProactivity, type HookPromptInput, type SelectedSnippet, } from "./hooks.js";
|
|
2
|
-
export { scoreFindingCandidate } from "./extract.js";
|
|
3
|
-
export declare function runCliCommand(command: string, args: string[]): Promise<void | import("./govern.js").GovernanceSummary>;
|
package/dist/cli/cli.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { getPhrenPath } from "../shared.js";
|
|
2
|
-
// Re-export from split modules so existing test imports keep working
|
|
3
|
-
export { detectTaskIntent, parseHookInput, applyTrustFilter, rankResults, selectSnippets, buildHookOutput, trackSessionMetrics, filterTaskByPriority, parseCitations, validateCitation, annotateStale, getProjectGlobBoost, clearProjectGlobCache, clearCitationValidCache, filterConversationInsightsForProactivity, extractToolFindings, filterToolFindingsForProactivity, } from "./hooks.js";
|
|
4
|
-
export { scoreFindingCandidate } from "./extract.js";
|
|
5
|
-
import { handleHookPrompt, handleHookSessionStart, handleHookStop, handleBackgroundSync, handleHookContext, handleHookTool, } from "./hooks.js";
|
|
6
|
-
import { handleExtractMemories } from "./extract.js";
|
|
7
|
-
import { handleGovernMemories, handlePruneMemories, handleConsolidateMemories, handleMaintain, handleBackgroundMaintenance, } from "./govern.js";
|
|
8
|
-
import { handleConfig, handleIndexPolicy, handleRetentionPolicy, handleWorkflowPolicy, } from "./config.js";
|
|
9
|
-
import { parseSearchArgs } from "./search.js";
|
|
10
|
-
import { handleDetectSkills, handleFindingNamespace, handleHooksNamespace, handleProfileNamespace, handleProjectsNamespace, handleSkillsNamespace, handleSkillList, handlePromoteNamespace, handleReviewNamespace, handleStoreNamespace, handleTaskNamespace, } from "./namespaces.js";
|
|
11
|
-
import { handleTeamNamespace } from "./team.js";
|
|
12
|
-
import { handleTaskView, handleSessionsView, handleQuickstart, handleDebugInjection, handleInspectIndex, } from "./ops.js";
|
|
13
|
-
import { handleAddFinding, handleDoctor, handleFragmentSearch, handleMemoryUi, handleTruths, handlePinCanonical, handleQualityFeedback, handleRelatedDocs, handleConsolidationStatus, handleSessionContext, handleSearch, handleShell, handleStatus, handleUpdate, } from "./actions.js";
|
|
14
|
-
import { handleGraphNamespace } from "./graph.js";
|
|
15
|
-
import { resolveRuntimeProfile } from "../runtime-profile.js";
|
|
16
|
-
// ── CLI router ───────────────────────────────────────────────────────────────
|
|
17
|
-
export async function runCliCommand(command, args) {
|
|
18
|
-
const getProfile = () => resolveRuntimeProfile(getPhrenPath());
|
|
19
|
-
switch (command) {
|
|
20
|
-
case "search":
|
|
21
|
-
{
|
|
22
|
-
const opts = parseSearchArgs(getPhrenPath(), args);
|
|
23
|
-
if (!opts)
|
|
24
|
-
return;
|
|
25
|
-
return handleSearch(opts, getProfile());
|
|
26
|
-
}
|
|
27
|
-
case "hook-prompt":
|
|
28
|
-
return handleHookPrompt();
|
|
29
|
-
case "hook-session-start":
|
|
30
|
-
return handleHookSessionStart();
|
|
31
|
-
case "hook-stop":
|
|
32
|
-
return handleHookStop();
|
|
33
|
-
case "background-sync":
|
|
34
|
-
return handleBackgroundSync();
|
|
35
|
-
case "hook-context":
|
|
36
|
-
return handleHookContext();
|
|
37
|
-
case "hook-tool":
|
|
38
|
-
return handleHookTool();
|
|
39
|
-
case "add-finding":
|
|
40
|
-
return handleAddFinding(args[0], args.slice(1).join(" "));
|
|
41
|
-
case "extract-memories":
|
|
42
|
-
return handleExtractMemories(args[0]);
|
|
43
|
-
case "govern-memories":
|
|
44
|
-
return handleGovernMemories(args[0]);
|
|
45
|
-
case "pin":
|
|
46
|
-
return handlePinCanonical(args[0], args.slice(1).join(" "));
|
|
47
|
-
case "doctor":
|
|
48
|
-
return handleDoctor(args);
|
|
49
|
-
case "status":
|
|
50
|
-
return handleStatus();
|
|
51
|
-
case "quality-feedback":
|
|
52
|
-
return handleQualityFeedback(args);
|
|
53
|
-
case "prune-memories":
|
|
54
|
-
return handlePruneMemories(args);
|
|
55
|
-
case "consolidate-memories":
|
|
56
|
-
return handleConsolidateMemories(args);
|
|
57
|
-
case "index-policy":
|
|
58
|
-
return handleIndexPolicy(args);
|
|
59
|
-
case "policy":
|
|
60
|
-
return handleRetentionPolicy(args);
|
|
61
|
-
case "workflow":
|
|
62
|
-
return handleWorkflowPolicy(args);
|
|
63
|
-
case "web-ui":
|
|
64
|
-
return handleMemoryUi(args);
|
|
65
|
-
case "shell":
|
|
66
|
-
return handleShell(args, getProfile());
|
|
67
|
-
case "update":
|
|
68
|
-
return handleUpdate(args);
|
|
69
|
-
case "config":
|
|
70
|
-
return handleConfig(args);
|
|
71
|
-
case "maintain":
|
|
72
|
-
return handleMaintain(args);
|
|
73
|
-
case "skill-list":
|
|
74
|
-
return handleSkillList(getProfile());
|
|
75
|
-
case "skills":
|
|
76
|
-
return handleSkillsNamespace(args, getProfile());
|
|
77
|
-
case "hooks":
|
|
78
|
-
return handleHooksNamespace(args);
|
|
79
|
-
case "tasks":
|
|
80
|
-
return handleTaskView(getProfile());
|
|
81
|
-
case "sessions":
|
|
82
|
-
return await handleSessionsView(args);
|
|
83
|
-
case "task":
|
|
84
|
-
return handleTaskNamespace(args);
|
|
85
|
-
case "finding":
|
|
86
|
-
return handleFindingNamespace(args);
|
|
87
|
-
case "projects":
|
|
88
|
-
return handleProjectsNamespace(args, args[0] === "--help" || args[0] === "-h" ? "" : getProfile());
|
|
89
|
-
case "quickstart":
|
|
90
|
-
return handleQuickstart();
|
|
91
|
-
case "background-maintenance":
|
|
92
|
-
return handleBackgroundMaintenance(args[0]);
|
|
93
|
-
case "debug-injection":
|
|
94
|
-
return handleDebugInjection(args, getProfile());
|
|
95
|
-
case "inspect-index":
|
|
96
|
-
return handleInspectIndex(args, getProfile());
|
|
97
|
-
case "search-fragments":
|
|
98
|
-
return handleFragmentSearch(args, getProfile());
|
|
99
|
-
case "related-docs":
|
|
100
|
-
return handleRelatedDocs(args, getProfile());
|
|
101
|
-
case "detect-skills":
|
|
102
|
-
return handleDetectSkills(args, getProfile());
|
|
103
|
-
case "graph":
|
|
104
|
-
return handleGraphNamespace(args);
|
|
105
|
-
case "review":
|
|
106
|
-
return handleReviewNamespace(args);
|
|
107
|
-
case "consolidation-status":
|
|
108
|
-
return handleConsolidationStatus(args);
|
|
109
|
-
case "session-context":
|
|
110
|
-
return handleSessionContext();
|
|
111
|
-
case "truths":
|
|
112
|
-
return handleTruths(args[0]);
|
|
113
|
-
case "store":
|
|
114
|
-
return handleStoreNamespace(args);
|
|
115
|
-
case "profile":
|
|
116
|
-
return handleProfileNamespace(args);
|
|
117
|
-
case "team":
|
|
118
|
-
return handleTeamNamespace(args);
|
|
119
|
-
case "promote":
|
|
120
|
-
return handlePromoteNamespace(args);
|
|
121
|
-
default:
|
|
122
|
-
console.error(`Unknown command: ${command}\nRun 'phren --help' for available commands.`);
|
|
123
|
-
process.exit(1);
|
|
124
|
-
}
|
|
125
|
-
}
|