@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/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;
@@ -2683,20 +2683,41 @@ export function renderGraphHostScript() {
2683
2683
  deleteNode(currentNode);
2684
2684
  }
2685
2685
 
2686
- // Open the dossier in edit mode for a finding/task chosen in the contents pane.
2687
- function editNodeFromPane(node) {
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 api = graphApi();
2690
- if (api && api.selectNode) api.selectNode(node.id);
2691
- setTimeout(function() {
2692
- if (currentNode && currentNode.id === node.id) {
2693
- editMode = currentNode.kind === 'task' ? 'task' : 'finding';
2694
- var point = currentPopoverPoint();
2695
- renderPopover(currentNode, point.x, point.y);
2696
- var editor = document.getElementById('graph-node-editor');
2697
- if (editor) editor.focus();
2698
- }
2699
- }, 220);
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 === 'edit') editNodeFromPane(payload);
2842
+ else if (action === 'save-inline') saveInlineFromPane(payload);
2822
2843
  else if (action === 'merge') mergeNodes(payload);
2823
2844
  });
2824
2845
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phren/cli",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "description": "Knowledge layer for AI agents — CLI, MCP server, and data layer",
5
5
  "type": "module",
6
6
  "bin": {