@phren/cli 0.1.38 → 0.1.40
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/session-background.js +4 -0
- package/dist/cli/session-stop.js +16 -0
- package/dist/cli-handlers.d.ts +2 -0
- package/dist/cli-handlers.js +40 -0
- package/dist/cli-registry.js +15 -1
- package/dist/generated/memory-ui-graph.browser.js +363 -293
- package/dist/hooks.d.ts +6 -0
- package/dist/hooks.js +6 -3
- package/dist/init/init-configure.d.ts +7 -2
- package/dist/init/init-configure.js +36 -10
- package/dist/init/init-preset.d.ts +3 -0
- package/dist/init/init-preset.js +122 -0
- package/dist/init/init-uninstall.js +9 -0
- package/dist/init/init-walkthrough.d.ts +2 -0
- package/dist/init/init-walkthrough.js +42 -17
- package/dist/init/init.d.ts +5 -0
- package/dist/init/init.js +62 -14
- package/dist/init/management-preset.d.ts +42 -0
- package/dist/init/management-preset.js +122 -0
- package/dist/init/preferences.d.ts +17 -0
- package/dist/init/preferences.js +3 -0
- package/dist/init/self-wiring.d.ts +5 -0
- package/dist/init/self-wiring.js +52 -0
- package/dist/init/setup.d.ts +5 -1
- package/dist/init/setup.js +19 -7
- package/dist/init/teardown.d.ts +15 -0
- package/dist/init/teardown.js +241 -0
- package/dist/link/doctor.js +41 -14
- package/dist/link/link.js +49 -26
- package/dist/memory-ui-graph.runtime.js +363 -293
- package/dist/status.js +13 -1
- package/dist/ui/scripts.js +35 -14
- package/package.json +1 -1
package/dist/status.js
CHANGED
|
@@ -5,6 +5,7 @@ import { findPhrenPath, getProjectDirs, EXEC_TIMEOUT_QUICK_MS, debugLog, isRecor
|
|
|
5
5
|
import { buildIndex, detectProject, findFtsCacheForPath, listIndexedDocumentPaths, queryRows } from "./shared/index.js";
|
|
6
6
|
import { mergeConfig, getWorkflowPolicy } from "./shared/governance.js";
|
|
7
7
|
import { getMcpEnabledPreference, getHooksEnabledPreference } from "./init/init.js";
|
|
8
|
+
import { getManagementPreset, resolveManagementCapabilities } from "./init/management-preset.js";
|
|
8
9
|
import { getTelemetrySummary } from "./telemetry.js";
|
|
9
10
|
import { runGit as runGitShared, errorMessage } from "./utils.js";
|
|
10
11
|
import { logger } from "./logger.js";
|
|
@@ -107,11 +108,22 @@ export async function runStatus() {
|
|
|
107
108
|
if (profile) {
|
|
108
109
|
console.log(` ${DIM}profile${RESET} ${profile}`);
|
|
109
110
|
}
|
|
110
|
-
// MCP + hooks status
|
|
111
|
+
// Management preset + MCP + hooks status
|
|
112
|
+
const preset = getManagementPreset(phrenPath);
|
|
113
|
+
const caps = resolveManagementCapabilities(phrenPath);
|
|
111
114
|
const mcpEnabled = getMcpEnabledPreference(phrenPath);
|
|
112
115
|
const hooksEnabled = getHooksEnabledPreference(phrenPath);
|
|
116
|
+
console.log(` ${DIM}preset${RESET} ${preset}`);
|
|
113
117
|
console.log(` ${DIM}mcp${RESET} ${mcpEnabled ? `${GREEN}on${RESET}` : `${YELLOW}off${RESET}`}`);
|
|
114
118
|
console.log(` ${DIM}hooks${RESET} ${hooksEnabled ? `${GREEN}on${RESET}` : `${YELLOW}off${RESET}`}`);
|
|
119
|
+
// What phren touches on this machine under the current preset.
|
|
120
|
+
const touches = [
|
|
121
|
+
caps.linkGlobalClaudeMd ? "~/.claude/CLAUDE.md" : null,
|
|
122
|
+
caps.installSkillLinks ? "~/.claude/skills" : null,
|
|
123
|
+
caps.installWrappers ? "~/.local/bin wrappers" : null,
|
|
124
|
+
caps.repoMirroring ? "repo mirrors" : null,
|
|
125
|
+
].filter(Boolean);
|
|
126
|
+
console.log(` ${DIM}touches${RESET} ${touches.length ? touches.join(", ") : `${DIM}store only${RESET}`}`);
|
|
115
127
|
// Hook health: check ~/.claude/settings.json
|
|
116
128
|
let hooksInstalled = false;
|
|
117
129
|
let mcpConfigured = false;
|
package/dist/ui/scripts.js
CHANGED
|
@@ -2683,20 +2683,41 @@ export function renderGraphHostScript() {
|
|
|
2683
2683
|
deleteNode(currentNode);
|
|
2684
2684
|
}
|
|
2685
2685
|
|
|
2686
|
-
//
|
|
2687
|
-
|
|
2686
|
+
// Persist edits made directly inside the project pane. The pane owns the
|
|
2687
|
+
// editor; the host only performs the mutation and updates the rendered node.
|
|
2688
|
+
function saveInlineFromPane(node) {
|
|
2688
2689
|
if (!node || (node.kind !== 'finding' && node.kind !== 'task')) return;
|
|
2689
|
-
var
|
|
2690
|
-
if (
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
if (
|
|
2698
|
-
|
|
2699
|
-
|
|
2690
|
+
var nextText = (node.editedText || '').trim();
|
|
2691
|
+
if (!nextText) return;
|
|
2692
|
+
if (node.kind === 'finding') {
|
|
2693
|
+
graphRequest('/api/findings/' + encodeURIComponent(node.projectName), 'PUT', {
|
|
2694
|
+
old_text: node.tooltipLabel || node.fullLabel || '',
|
|
2695
|
+
new_text: nextText,
|
|
2696
|
+
score_key: node.scoreKey || ''
|
|
2697
|
+
}).then(function(result) {
|
|
2698
|
+
if (!result || !result.ok) throw new Error(result && result.error ? result.error : 'Save failed');
|
|
2699
|
+
var api = graphApi();
|
|
2700
|
+
if (api && api.updateNode) api.updateNode(node.id, { text: nextText });
|
|
2701
|
+
graphToast('Finding updated', 'ok');
|
|
2702
|
+
}).catch(function(err) { graphToast('Update failed: ' + err.message, 'err'); });
|
|
2703
|
+
return;
|
|
2704
|
+
}
|
|
2705
|
+
graphRequest('/api/tasks/update', 'POST', {
|
|
2706
|
+
project: node.projectName,
|
|
2707
|
+
item: node.stableId || node.id || node.tooltipLabel || node.fullLabel || node.displayLabel || '',
|
|
2708
|
+
text: nextText,
|
|
2709
|
+
section: node.editedSection || node.section || 'Queue',
|
|
2710
|
+
priority: typeof node.editedPriority === 'string' ? node.editedPriority : (node.priority || '')
|
|
2711
|
+
}).then(function(result) {
|
|
2712
|
+
if (!result || !result.ok) throw new Error(result && result.error ? result.error : 'Save failed');
|
|
2713
|
+
var api = graphApi();
|
|
2714
|
+
if (api && api.updateNode) api.updateNode(node.id, {
|
|
2715
|
+
text: nextText,
|
|
2716
|
+
section: node.editedSection || node.section || 'Queue',
|
|
2717
|
+
priority: typeof node.editedPriority === 'string' ? node.editedPriority : (node.priority || '')
|
|
2718
|
+
});
|
|
2719
|
+
graphToast('Task updated', 'ok');
|
|
2720
|
+
}).catch(function(err) { graphToast('Update failed: ' + err.message, 'err'); });
|
|
2700
2721
|
}
|
|
2701
2722
|
|
|
2702
2723
|
function completeCurrentTask() {
|
|
@@ -2818,7 +2839,7 @@ export function renderGraphHostScript() {
|
|
|
2818
2839
|
api.onItemAction(function(payload, action) {
|
|
2819
2840
|
if (action === 'delete') deleteNode(payload);
|
|
2820
2841
|
else if (action === 'delete-batch') deleteNodes(payload);
|
|
2821
|
-
else if (action === '
|
|
2842
|
+
else if (action === 'save-inline') saveInlineFromPane(payload);
|
|
2822
2843
|
else if (action === 'merge') mergeNodes(payload);
|
|
2823
2844
|
});
|
|
2824
2845
|
}
|