@phren/cli 0.1.36 → 0.1.38
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/dist/cli/hooks.js +3 -0
- package/dist/cli/namespaces-notes.d.ts +1 -0
- package/dist/cli/namespaces-notes.js +142 -0
- package/dist/cli/namespaces-store.js +2 -3
- package/dist/cli/namespaces.d.ts +1 -0
- package/dist/cli/namespaces.js +1 -0
- package/dist/cli-hooks-git.d.ts +1 -1
- package/dist/cli-hooks-git.js +1 -0
- package/dist/cli-registry.js +19 -0
- package/dist/core/note.d.ts +9 -0
- package/dist/core/note.js +20 -0
- package/dist/data/notes.d.ts +28 -0
- package/dist/data/notes.js +193 -0
- package/dist/generated/memory-ui-graph.browser.js +561 -291
- package/dist/governance/rbac.d.ts +1 -1
- package/dist/governance/rbac.js +4 -0
- package/dist/index.js +2 -0
- package/dist/link/doctor.js +68 -0
- package/dist/link/link.js +17 -1
- package/dist/memory-ui-graph.runtime.js +561 -291
- package/dist/phren-core.d.ts +1 -1
- package/dist/phren-core.js +1 -1
- package/dist/shared/index.js +2 -0
- package/dist/store-registry.d.ts +1 -0
- package/dist/store-registry.js +1 -1
- package/dist/tools/notes.d.ts +3 -0
- package/dist/tools/notes.js +146 -0
- package/dist/ui/data.d.ts +2 -0
- package/dist/ui/data.js +7 -0
- package/dist/ui/graph-chrome.d.ts +1 -1
- package/dist/ui/graph-chrome.js +31 -0
- package/dist/ui/page.js +10 -2
- package/dist/ui/scripts.d.ts +2 -0
- package/dist/ui/scripts.js +466 -29
- package/dist/ui/server.js +89 -23
- package/dist/ui/styles.d.ts +2 -0
- package/dist/ui/styles.js +59 -0
- package/package.json +9 -1
package/dist/phren-core.d.ts
CHANGED
|
@@ -59,6 +59,6 @@ export type FindingTag = FindingType;
|
|
|
59
59
|
/** Canonical set of known observation tags — derived from FINDING_TYPES */
|
|
60
60
|
export declare const KNOWN_OBSERVATION_TAGS: Set<string>;
|
|
61
61
|
/** Document types in the FTS index */
|
|
62
|
-
export declare const DOC_TYPES: readonly ["claude", "findings", "reference", "skills", "summary", "task", "changelog", "canonical", "review-queue", "skill", "other"];
|
|
62
|
+
export declare const DOC_TYPES: readonly ["claude", "findings", "notes", "reference", "skills", "summary", "task", "changelog", "canonical", "review-queue", "skill", "other"];
|
|
63
63
|
export type DocType = (typeof DOC_TYPES)[number];
|
|
64
64
|
export declare function capCache<K, V>(cache: Map<K, V>): void;
|
package/dist/phren-core.js
CHANGED
|
@@ -93,7 +93,7 @@ export const FINDING_TAGS = FINDING_TYPES;
|
|
|
93
93
|
/** Canonical set of known observation tags — derived from FINDING_TYPES */
|
|
94
94
|
export const KNOWN_OBSERVATION_TAGS = new Set(FINDING_TYPES);
|
|
95
95
|
/** Document types in the FTS index */
|
|
96
|
-
export const DOC_TYPES = ["claude", "findings", "reference", "skills", "summary", "task", "changelog", "canonical", "review-queue", "skill", "other"];
|
|
96
|
+
export const DOC_TYPES = ["claude", "findings", "notes", "reference", "skills", "summary", "task", "changelog", "canonical", "review-queue", "skill", "other"];
|
|
97
97
|
// ── Cache eviction helper ────────────────────────────────────────────────────
|
|
98
98
|
const CACHE_MAX = 1000;
|
|
99
99
|
const CACHE_EVICT = 100;
|
package/dist/shared/index.js
CHANGED
|
@@ -167,6 +167,8 @@ function pathHasSegment(relPath, segment) {
|
|
|
167
167
|
}
|
|
168
168
|
export function classifyFile(filename, relPath) {
|
|
169
169
|
// Directory takes priority over filename-based classification
|
|
170
|
+
if (pathHasSegment(relPath, "notes"))
|
|
171
|
+
return "notes";
|
|
170
172
|
if (pathHasSegment(relPath, "reference"))
|
|
171
173
|
return "reference";
|
|
172
174
|
if (pathHasSegment(relPath, "skills"))
|
package/dist/store-registry.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export interface TeamBootstrap {
|
|
|
26
26
|
description?: string;
|
|
27
27
|
default_role?: StoreRole;
|
|
28
28
|
}
|
|
29
|
+
export declare const STORES_FILENAME = "stores.yaml";
|
|
29
30
|
export declare function storesFilePath(phrenPath: string): string;
|
|
30
31
|
export declare function generateStoreId(): string;
|
|
31
32
|
export declare function readStoreRegistry(phrenPath: string): StoreRegistry | null;
|
package/dist/store-registry.js
CHANGED
|
@@ -7,7 +7,7 @@ import { withFileLock } from "./governance/locks.js";
|
|
|
7
7
|
import { isRecord, PhrenError } from "./phren-core.js";
|
|
8
8
|
import { getProjectDirs } from "./shared.js";
|
|
9
9
|
// ── Constants ────────────────────────────────────────────────────────────────
|
|
10
|
-
const STORES_FILENAME = "stores.yaml";
|
|
10
|
+
export const STORES_FILENAME = "stores.yaml";
|
|
11
11
|
const TEAM_BOOTSTRAP_FILENAME = ".phren-team.yaml";
|
|
12
12
|
const VALID_ROLES = new Set(["primary", "team", "readonly"]);
|
|
13
13
|
const VALID_SYNC_MODES = new Set(["managed-git", "pull-only"]);
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
import { FINDING_TYPES } from "../shared.js";
|
|
4
|
+
import { FINDINGS_FILENAME } from "../data/access.js";
|
|
5
|
+
import { addNote, editNote, listNotes, removeNote } from "../data/notes.js";
|
|
6
|
+
import { promoteNote } from "../core/note.js";
|
|
7
|
+
import { permissionDeniedError } from "../governance/rbac.js";
|
|
8
|
+
import { mcpResponse, resolveStoreForProject } from "./types.js";
|
|
9
|
+
function resolve(ctx, projectInput) {
|
|
10
|
+
try {
|
|
11
|
+
return { ok: true, value: resolveStoreForProject(ctx, projectInput) };
|
|
12
|
+
}
|
|
13
|
+
catch (err) {
|
|
14
|
+
return { ok: false, error: err instanceof Error ? err.message : String(err) };
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function noteSummary(note) {
|
|
18
|
+
const promoted = note.promoted ? " · promoted" : "";
|
|
19
|
+
return `- ${note.date} ${note.time.slice(0, 5)} · ${note.id}${promoted}\n ${note.text.replace(/\n/g, "\n ")}`;
|
|
20
|
+
}
|
|
21
|
+
async function refreshIndex(ctx, storeRole, ...files) {
|
|
22
|
+
if (storeRole === "primary") {
|
|
23
|
+
for (const file of files)
|
|
24
|
+
ctx.updateFileInIndex(file);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
// Incremental indexing is rooted at the primary store. A federated/team-store
|
|
28
|
+
// write therefore needs a rebuild so the file retains its real project/store identity.
|
|
29
|
+
await ctx.rebuildIndex();
|
|
30
|
+
}
|
|
31
|
+
export function register(server, ctx) {
|
|
32
|
+
server.registerTool("get_notes", {
|
|
33
|
+
title: "◆ phren · notes",
|
|
34
|
+
description: "List lightweight daily notes for a project. Notes are searchable scratch context and are not injected into agent prompts automatically.",
|
|
35
|
+
inputSchema: z.object({
|
|
36
|
+
project: z.string().describe("Project name, optionally store-qualified (for example team/project)."),
|
|
37
|
+
date: z.string().optional().describe("Optional YYYY-MM-DD date filter."),
|
|
38
|
+
limit: z.number().int().min(1).max(500).optional().describe("Maximum notes to return. Defaults to 100."),
|
|
39
|
+
}),
|
|
40
|
+
}, async ({ project: projectInput, date, limit }) => {
|
|
41
|
+
const target = resolve(ctx, projectInput);
|
|
42
|
+
if (!target.ok)
|
|
43
|
+
return mcpResponse({ ok: false, error: target.error });
|
|
44
|
+
const { phrenPath, project } = target.value;
|
|
45
|
+
const result = listNotes(phrenPath, project, { date, limit: limit ?? 100 });
|
|
46
|
+
if (!result.ok)
|
|
47
|
+
return mcpResponse({ ok: false, error: result.error, errorCode: result.code });
|
|
48
|
+
return mcpResponse({
|
|
49
|
+
ok: true,
|
|
50
|
+
message: result.data.length ? result.data.map(noteSummary).join("\n\n") : `No notes found for ${project}${date ? ` on ${date}` : ""}.`,
|
|
51
|
+
data: { project, notes: result.data },
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
server.registerTool("add_note", {
|
|
55
|
+
title: "◆ phren · add note",
|
|
56
|
+
description: "Add a lightweight Markdown note to a project's daily notes. Use findings instead for durable, agent-curated knowledge.",
|
|
57
|
+
inputSchema: z.object({
|
|
58
|
+
project: z.string().describe("Project name, optionally store-qualified."),
|
|
59
|
+
text: z.string().min(1).describe("Note text; Markdown and multiple lines are supported."),
|
|
60
|
+
date: z.string().optional().describe("Optional YYYY-MM-DD date. Defaults to today."),
|
|
61
|
+
}),
|
|
62
|
+
}, async ({ project: projectInput, text, date }) => {
|
|
63
|
+
const target = resolve(ctx, projectInput);
|
|
64
|
+
if (!target.ok)
|
|
65
|
+
return mcpResponse({ ok: false, error: target.error });
|
|
66
|
+
const { phrenPath, project, storeRole } = target.value;
|
|
67
|
+
const denied = permissionDeniedError(phrenPath, "add_note", project);
|
|
68
|
+
if (denied)
|
|
69
|
+
return mcpResponse({ ok: false, error: denied });
|
|
70
|
+
return ctx.withWriteQueue(async () => {
|
|
71
|
+
const result = addNote(phrenPath, project, text, { date });
|
|
72
|
+
if (!result.ok)
|
|
73
|
+
return mcpResponse({ ok: false, error: result.error, errorCode: result.code });
|
|
74
|
+
await refreshIndex(ctx, storeRole, result.data.path);
|
|
75
|
+
return mcpResponse({ ok: true, message: `Note added to ${project}: ${result.data.id}`, data: { project, note: result.data } });
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
server.registerTool("edit_note", {
|
|
79
|
+
title: "◆ phren · edit note",
|
|
80
|
+
description: "Replace the text of one daily note. Identify it with the stable nid returned by get_notes.",
|
|
81
|
+
inputSchema: z.object({
|
|
82
|
+
project: z.string(),
|
|
83
|
+
note: z.string().min(1).describe("Stable nid (preferred) or an unambiguous text match."),
|
|
84
|
+
text: z.string().min(1).describe("Replacement Markdown text."),
|
|
85
|
+
}),
|
|
86
|
+
}, async ({ project: projectInput, note, text }) => {
|
|
87
|
+
const target = resolve(ctx, projectInput);
|
|
88
|
+
if (!target.ok)
|
|
89
|
+
return mcpResponse({ ok: false, error: target.error });
|
|
90
|
+
const { phrenPath, project, storeRole } = target.value;
|
|
91
|
+
const denied = permissionDeniedError(phrenPath, "edit_note", project);
|
|
92
|
+
if (denied)
|
|
93
|
+
return mcpResponse({ ok: false, error: denied });
|
|
94
|
+
return ctx.withWriteQueue(async () => {
|
|
95
|
+
const result = editNote(phrenPath, project, note, text);
|
|
96
|
+
if (!result.ok)
|
|
97
|
+
return mcpResponse({ ok: false, error: result.error, errorCode: result.code });
|
|
98
|
+
await refreshIndex(ctx, storeRole, result.data.path);
|
|
99
|
+
return mcpResponse({ ok: true, message: `Updated ${result.data.id}.`, data: { project, note: result.data } });
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
server.registerTool("remove_note", {
|
|
103
|
+
title: "◆ phren · remove note",
|
|
104
|
+
description: "Remove one daily note by stable nid or unambiguous text match.",
|
|
105
|
+
inputSchema: z.object({ project: z.string(), note: z.string().min(1) }),
|
|
106
|
+
}, async ({ project: projectInput, note }) => {
|
|
107
|
+
const target = resolve(ctx, projectInput);
|
|
108
|
+
if (!target.ok)
|
|
109
|
+
return mcpResponse({ ok: false, error: target.error });
|
|
110
|
+
const { phrenPath, project, storeRole } = target.value;
|
|
111
|
+
const denied = permissionDeniedError(phrenPath, "remove_note", project);
|
|
112
|
+
if (denied)
|
|
113
|
+
return mcpResponse({ ok: false, error: denied });
|
|
114
|
+
return ctx.withWriteQueue(async () => {
|
|
115
|
+
const result = removeNote(phrenPath, project, note);
|
|
116
|
+
if (!result.ok)
|
|
117
|
+
return mcpResponse({ ok: false, error: result.error, errorCode: result.code });
|
|
118
|
+
await refreshIndex(ctx, storeRole, result.data.path);
|
|
119
|
+
return mcpResponse({ ok: true, message: `Removed ${result.data.id}.`, data: { project, note: result.data } });
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
server.registerTool("promote_note", {
|
|
123
|
+
title: "◆ phren · promote note",
|
|
124
|
+
description: "Copy a daily note into durable findings and mark the source note as promoted. The note remains in the daily record.",
|
|
125
|
+
inputSchema: z.object({
|
|
126
|
+
project: z.string(),
|
|
127
|
+
note: z.string().min(1),
|
|
128
|
+
findingType: z.enum(FINDING_TYPES).optional(),
|
|
129
|
+
}),
|
|
130
|
+
}, async ({ project: projectInput, note, findingType }) => {
|
|
131
|
+
const target = resolve(ctx, projectInput);
|
|
132
|
+
if (!target.ok)
|
|
133
|
+
return mcpResponse({ ok: false, error: target.error });
|
|
134
|
+
const { phrenPath, project, storeRole } = target.value;
|
|
135
|
+
const denied = permissionDeniedError(phrenPath, "promote_note", project);
|
|
136
|
+
if (denied)
|
|
137
|
+
return mcpResponse({ ok: false, error: denied });
|
|
138
|
+
return ctx.withWriteQueue(async () => {
|
|
139
|
+
const result = promoteNote(phrenPath, project, note, findingType);
|
|
140
|
+
if (!result.ok)
|
|
141
|
+
return mcpResponse({ ok: false, error: result.error, errorCode: result.code });
|
|
142
|
+
await refreshIndex(ctx, storeRole, result.data.note.path, path.join(phrenPath, project, FINDINGS_FILENAME));
|
|
143
|
+
return mcpResponse({ ok: true, message: `Promoted ${result.data.note.id} to a finding.`, data: { project, ...result.data } });
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
}
|
package/dist/ui/data.d.ts
CHANGED
|
@@ -81,6 +81,8 @@ export declare function isAllowedFilePath(filePath: string, phrenPath: string):
|
|
|
81
81
|
* not the entire phren store.
|
|
82
82
|
*/
|
|
83
83
|
export declare function isAllowedSkillPath(filePath: string, phrenPath: string): boolean;
|
|
84
|
+
/** Allow only the four exact lifecycle-hook config files surfaced by the UI. */
|
|
85
|
+
export declare function isAllowedHookConfigPath(filePath: string, phrenPath: string): boolean;
|
|
84
86
|
export declare function collectSkillsForUI(phrenPath: string, profile?: string): Array<{
|
|
85
87
|
name: string;
|
|
86
88
|
source: string;
|
package/dist/ui/data.js
CHANGED
|
@@ -111,6 +111,13 @@ export function isAllowedSkillPath(filePath, phrenPath) {
|
|
|
111
111
|
const segments = resolved.split(path.sep);
|
|
112
112
|
return segments.some((seg) => seg === "skills");
|
|
113
113
|
}
|
|
114
|
+
/** Allow only the four exact lifecycle-hook config files surfaced by the UI. */
|
|
115
|
+
export function isAllowedHookConfigPath(filePath, phrenPath) {
|
|
116
|
+
if (!isAllowedFilePath(filePath, phrenPath))
|
|
117
|
+
return false;
|
|
118
|
+
const resolved = path.resolve(filePath);
|
|
119
|
+
return Object.values(hookConfigPaths(phrenPath)).some((configPath) => path.resolve(configPath) === resolved);
|
|
120
|
+
}
|
|
114
121
|
export function collectSkillsForUI(phrenPath, profile = "") {
|
|
115
122
|
return getAllSkills(phrenPath, profile).map((skill) => ({
|
|
116
123
|
name: skill.name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const GRAPH_HUD_STYLES = "\n/* \u2500\u2500 Full-bleed graph tab \u2014 total dark immersion (header included) \u2500\u2500 */\nbody:has(#tab-graph.active) { background: #04050b; }\nbody:has(#tab-graph.active) .main { max-width: none; padding: 0; }\nbody:has(#tab-graph.active) .header {\n background: rgba(5, 6, 13, 0.92);\n border-bottom: 1px solid rgba(103, 232, 249, 0.12);\n backdrop-filter: blur(10px);\n -webkit-backdrop-filter: blur(10px);\n}\nbody:has(#tab-graph.active) .header .nav-item { color: #7f8db8; }\nbody:has(#tab-graph.active) .header .nav-item.active { color: #67e8f9; }\nbody:has(#tab-graph.active) .header .brand-name,\nbody:has(#tab-graph.active) .header-brand { color: #dbe6ff; }\n#tab-graph .graph-container {\n background: #04050b;\n border: none;\n border-radius: 0;\n position: relative;\n overflow: hidden;\n}\n#tab-graph #graph-canvas {\n height: calc(100vh - 64px);\n min-height: 520px;\n}\n\n/* \u2500\u2500 Overlay chrome \u2014 compact HUD clustered top-right (GraphRAG) \u2500\u2500\u2500\u2500 */\n#tab-graph .graph-filters {\n background: transparent;\n border: none;\n box-shadow: none;\n padding: 0;\n left: auto;\n right: 60px;\n width: min(560px, 60%);\n z-index: 10;\n}\n#tab-graph .graph-controls { z-index: 10; }\n#tab-graph .graph-controls button {\n width: 34px;\n height: 34px;\n border-radius: 8px;\n border: 1px solid rgba(103, 232, 249, 0.2);\n background: rgba(8, 10, 22, 0.85);\n color: #9fb2e8;\n font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n cursor: pointer;\n transition: border-color 0.15s ease, color 0.15s ease;\n}\n#tab-graph .graph-controls button:hover {\n border-color: rgba(103, 232, 249, 0.55);\n color: #e6f6ff;\n}\n\n/* \u2500\u2500 Docked dossier \u2014 left side, compact (GraphRAG inspector) \u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n#graph-node-popover.phren-docked {\n left: 16px !important;\n right: auto !important;\n top: 68px !important;\n bottom: 16px;\n width: 340px;\n max-width: min(360px, calc(100% - 32px));\n pointer-events: none;\n z-index: 12;\n}\n/* GraphRAG-style stats row + relationships in the inspector */\n.phren-dossier-stats {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n border: 1px solid rgba(103, 232, 249, 0.16);\n border-radius: 8px;\n overflow: hidden;\n margin: 12px 0 4px;\n}\n.phren-dossier-stats > div {\n padding: 8px 10px;\n border-right: 1px solid rgba(103, 232, 249, 0.12);\n}\n.phren-dossier-stats > div:last-child { border-right: 0; }\n.phren-dossier-stats .k {\n font: 700 8.5px/1.4 ui-monospace, Menlo, monospace;\n letter-spacing: 0.12em; color: #6b76a0; text-transform: uppercase;\n}\n.phren-dossier-stats .v {\n font: 700 14px/1.2 ui-monospace, Menlo, monospace; color: #67e8f9; margin-top: 3px;\n}\n.phren-rel-row {\n display: flex; align-items: baseline; justify-content: space-between; gap: 10px;\n padding: 7px 0; border-bottom: 1px solid rgba(120, 150, 220, 0.08); cursor: pointer;\n}\n.phren-rel-row:last-child { border-bottom: 0; }\n.phren-rel-row .n { font-size: 12px; color: #d6e2ff; overflow: hidden; text-overflow: ellipsis; }\n.phren-rel-row .n small { display: block; color: #6b76a0; font-size: 10px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.phren-rel-row .w { font: 600 11px/1.4 ui-monospace, Menlo, monospace; color: #67e8f9; font-variant-numeric: tabular-nums; }\n.phren-rel-row:hover .n { color: #eaf2ff; }\n#graph-node-popover.phren-docked #graph-node-popover-card {\n --surface: #0a0d1e;\n --surface-raised: rgba(22, 27, 52, 0.9);\n --surface-sunken: rgba(5, 6, 15, 0.92);\n --ink: #dbe4ff;\n --muted: #8b96c9;\n --border: rgba(103, 232, 249, 0.2);\n --accent: #67e8f9;\n --accent-dim: rgba(103, 232, 249, 0.12);\n height: 100%;\n overflow: auto;\n pointer-events: auto;\n background: rgba(8, 10, 22, 0.92);\n border: 1px solid rgba(103, 232, 249, 0.22);\n box-shadow: 0 16px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(103, 232, 249, 0.05);\n border-radius: 12px;\n color: #dbe4ff;\n backdrop-filter: blur(14px);\n -webkit-backdrop-filter: blur(14px);\n}\n#graph-node-popover.phren-docked .phren-dossier-kind {\n font: 700 10px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n color: #67e8f9;\n letter-spacing: 0.16em;\n text-transform: uppercase;\n}\n#graph-node-popover.phren-docked #graph-node-popover-card { padding: 14px 15px; }\n#graph-node-popover.phren-docked .phren-dossier-text {\n white-space: pre-wrap;\n line-height: 1.6;\n font-size: 13px;\n color: #dde6fb;\n}\n.phren-dossier-section {\n font: 700 9.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n color: #67e8f9;\n letter-spacing: 0.14em;\n text-transform: uppercase;\n margin-top: 4px;\n}\n.phren-dossier-nav {\n display: inline-flex;\n align-items: center;\n gap: 10px;\n font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n color: #8b96c9;\n}\n.phren-dossier-nav button {\n width: 28px;\n height: 28px;\n border-radius: 6px;\n border: 1px solid rgba(103, 232, 249, 0.2);\n background: rgba(12, 15, 30, 0.9);\n color: #9fb2e8;\n font-size: 14px;\n line-height: 1;\n cursor: pointer;\n transition: border-color 0.15s ease, color 0.15s ease;\n}\n.phren-dossier-nav button:hover {\n border-color: rgba(103, 232, 249, 0.55);\n color: #e6f6ff;\n}\n";
|
|
1
|
+
export declare const GRAPH_HUD_STYLES = "\n/* \u2500\u2500 Full-bleed graph tab \u2014 total dark immersion (header included) \u2500\u2500 */\nbody:has(#tab-graph.active) { background: #04050b; }\nbody:has(#tab-graph.active) .main { max-width: none; padding: 0; }\nbody:has(#tab-graph.active) .header {\n background: rgba(5, 6, 13, 0.92);\n border-bottom: 1px solid rgba(103, 232, 249, 0.12);\n backdrop-filter: blur(10px);\n -webkit-backdrop-filter: blur(10px);\n}\nbody:has(#tab-graph.active) .header .nav-item { color: #7f8db8; }\nbody:has(#tab-graph.active) .header .nav-item.active { color: #67e8f9; }\nbody:has(#tab-graph.active) .header .brand-name,\nbody:has(#tab-graph.active) .header-brand { color: #dbe6ff; }\n#tab-graph .graph-container {\n background: #04050b;\n border: none;\n border-radius: 0;\n position: relative;\n overflow: hidden;\n}\n#tab-graph #graph-canvas {\n height: calc(100vh - 64px);\n min-height: 520px;\n}\n\n/* \u2500\u2500 Overlay chrome \u2014 compact HUD clustered top-right (GraphRAG) \u2500\u2500\u2500\u2500 */\n#tab-graph .graph-filters {\n background: transparent;\n border: none;\n box-shadow: none;\n padding: 0;\n left: auto;\n right: 60px;\n width: min(560px, 60%);\n z-index: 10;\n}\n#tab-graph .graph-controls { z-index: 10; }\n#tab-graph .graph-controls button {\n width: 34px;\n height: 34px;\n border-radius: 8px;\n border: 1px solid rgba(103, 232, 249, 0.2);\n background: rgba(8, 10, 22, 0.85);\n color: #9fb2e8;\n font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n cursor: pointer;\n transition: border-color 0.15s ease, color 0.15s ease;\n}\n#tab-graph .graph-controls button:hover {\n border-color: rgba(103, 232, 249, 0.55);\n color: #e6f6ff;\n}\n\n/* \u2500\u2500 Docked dossier \u2014 left side, compact (GraphRAG inspector) \u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n#graph-node-popover.phren-docked {\n left: 16px !important;\n right: auto !important;\n top: 68px !important;\n bottom: 16px;\n width: 340px;\n max-width: min(360px, calc(100% - 32px));\n pointer-events: none;\n z-index: 12;\n}\n/* Edge drag handle to widen/narrow the docked dossier (symmetric with the\n contents pane). The popover itself is pointer-transparent, so the handle\n re-enables pointer events for itself. */\n#graph-node-popover.phren-docked .phren-dossier-resize {\n position: absolute;\n right: -4px;\n top: 0;\n bottom: 0;\n width: 9px;\n cursor: ew-resize;\n z-index: 20;\n pointer-events: auto;\n touch-action: none;\n}\n#graph-node-popover.phren-docked .phren-dossier-resize::after {\n content: \"\";\n position: absolute;\n right: 3px;\n top: 50%;\n transform: translateY(-50%);\n width: 3px;\n height: 38px;\n border-radius: 999px;\n background: rgba(103, 232, 249, 0.28);\n opacity: 0;\n transition: opacity 0.15s ease;\n}\n#graph-node-popover.phren-docked .phren-dossier-resize:hover::after,\n#graph-node-popover.phren-docked .phren-dossier-resize.dragging::after {\n opacity: 1;\n}\n/* GraphRAG-style stats row + relationships in the inspector */\n.phren-dossier-stats {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n border: 1px solid rgba(103, 232, 249, 0.16);\n border-radius: 8px;\n overflow: hidden;\n margin: 12px 0 4px;\n}\n.phren-dossier-stats > div {\n padding: 8px 10px;\n border-right: 1px solid rgba(103, 232, 249, 0.12);\n}\n.phren-dossier-stats > div:last-child { border-right: 0; }\n.phren-dossier-stats .k {\n font: 700 8.5px/1.4 ui-monospace, Menlo, monospace;\n letter-spacing: 0.12em; color: #6b76a0; text-transform: uppercase;\n}\n.phren-dossier-stats .v {\n font: 700 14px/1.2 ui-monospace, Menlo, monospace; color: #67e8f9; margin-top: 3px;\n}\n.phren-rel-row {\n display: flex; align-items: baseline; justify-content: space-between; gap: 10px;\n padding: 7px 0; border-bottom: 1px solid rgba(120, 150, 220, 0.08); cursor: pointer;\n}\n.phren-rel-row:last-child { border-bottom: 0; }\n.phren-rel-row .n { font-size: 12px; color: #d6e2ff; overflow: hidden; text-overflow: ellipsis; }\n.phren-rel-row .n small { display: block; color: #6b76a0; font-size: 10px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.phren-rel-row .w { font: 600 11px/1.4 ui-monospace, Menlo, monospace; color: #67e8f9; font-variant-numeric: tabular-nums; }\n.phren-rel-row:hover .n { color: #eaf2ff; }\n#graph-node-popover.phren-docked #graph-node-popover-card {\n --surface: #0a0d1e;\n --surface-raised: rgba(22, 27, 52, 0.9);\n --surface-sunken: rgba(5, 6, 15, 0.92);\n --ink: #dbe4ff;\n --muted: #8b96c9;\n --border: rgba(103, 232, 249, 0.2);\n --accent: #67e8f9;\n --accent-dim: rgba(103, 232, 249, 0.12);\n height: 100%;\n overflow: auto;\n pointer-events: auto;\n background: rgba(8, 10, 22, 0.92);\n border: 1px solid rgba(103, 232, 249, 0.22);\n box-shadow: 0 16px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(103, 232, 249, 0.05);\n border-radius: 12px;\n color: #dbe4ff;\n backdrop-filter: blur(14px);\n -webkit-backdrop-filter: blur(14px);\n}\n#graph-node-popover.phren-docked .phren-dossier-kind {\n font: 700 10px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n color: #67e8f9;\n letter-spacing: 0.16em;\n text-transform: uppercase;\n}\n#graph-node-popover.phren-docked #graph-node-popover-card { padding: 14px 15px; }\n#graph-node-popover.phren-docked .phren-dossier-text {\n white-space: pre-wrap;\n line-height: 1.6;\n font-size: 13px;\n color: #dde6fb;\n}\n.phren-dossier-section {\n font: 700 9.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n color: #67e8f9;\n letter-spacing: 0.14em;\n text-transform: uppercase;\n margin-top: 4px;\n}\n.phren-dossier-nav {\n display: inline-flex;\n align-items: center;\n gap: 10px;\n font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n color: #8b96c9;\n}\n.phren-dossier-nav button {\n width: 28px;\n height: 28px;\n border-radius: 6px;\n border: 1px solid rgba(103, 232, 249, 0.2);\n background: rgba(12, 15, 30, 0.9);\n color: #9fb2e8;\n font-size: 14px;\n line-height: 1;\n cursor: pointer;\n transition: border-color 0.15s ease, color 0.15s ease;\n}\n.phren-dossier-nav button:hover {\n border-color: rgba(103, 232, 249, 0.55);\n color: #e6f6ff;\n}\n";
|
package/dist/ui/graph-chrome.js
CHANGED
|
@@ -67,6 +67,37 @@ body:has(#tab-graph.active) .header-brand { color: #dbe6ff; }
|
|
|
67
67
|
pointer-events: none;
|
|
68
68
|
z-index: 12;
|
|
69
69
|
}
|
|
70
|
+
/* Edge drag handle to widen/narrow the docked dossier (symmetric with the
|
|
71
|
+
contents pane). The popover itself is pointer-transparent, so the handle
|
|
72
|
+
re-enables pointer events for itself. */
|
|
73
|
+
#graph-node-popover.phren-docked .phren-dossier-resize {
|
|
74
|
+
position: absolute;
|
|
75
|
+
right: -4px;
|
|
76
|
+
top: 0;
|
|
77
|
+
bottom: 0;
|
|
78
|
+
width: 9px;
|
|
79
|
+
cursor: ew-resize;
|
|
80
|
+
z-index: 20;
|
|
81
|
+
pointer-events: auto;
|
|
82
|
+
touch-action: none;
|
|
83
|
+
}
|
|
84
|
+
#graph-node-popover.phren-docked .phren-dossier-resize::after {
|
|
85
|
+
content: "";
|
|
86
|
+
position: absolute;
|
|
87
|
+
right: 3px;
|
|
88
|
+
top: 50%;
|
|
89
|
+
transform: translateY(-50%);
|
|
90
|
+
width: 3px;
|
|
91
|
+
height: 38px;
|
|
92
|
+
border-radius: 999px;
|
|
93
|
+
background: rgba(103, 232, 249, 0.28);
|
|
94
|
+
opacity: 0;
|
|
95
|
+
transition: opacity 0.15s ease;
|
|
96
|
+
}
|
|
97
|
+
#graph-node-popover.phren-docked .phren-dossier-resize:hover::after,
|
|
98
|
+
#graph-node-popover.phren-docked .phren-dossier-resize.dragging::after {
|
|
99
|
+
opacity: 1;
|
|
100
|
+
}
|
|
70
101
|
/* GraphRAG-style stats row + relationships in the inspector */
|
|
71
102
|
.phren-dossier-stats {
|
|
72
103
|
display: grid;
|
package/dist/ui/page.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { WEB_UI_STYLES, renderWebUiScript } from "./assets.js";
|
|
2
2
|
import { renderGraphScript } from "./graph.js";
|
|
3
|
-
import { LAYOUT_VIEWPORT_STYLES, PROJECT_REFERENCE_UI_STYLES, REVIEW_UI_STYLES, SETTINGS_TAB_UI_STYLES, TASK_UI_STYLES } from "./styles.js";
|
|
3
|
+
import { FINDING_CAPTURE_UI_STYLES, LAYOUT_VIEWPORT_STYLES, NOTES_UI_STYLES, PROJECT_REFERENCE_UI_STYLES, REVIEW_UI_STYLES, SETTINGS_TAB_UI_STYLES, TASK_UI_STYLES } from "./styles.js";
|
|
4
4
|
import { PHREN_DEEP_VOID_STYLES } from "./deep-void.js";
|
|
5
5
|
import { GRAPH_HUD_STYLES } from "./graph-chrome.js";
|
|
6
|
-
import { renderSharedWebUiHelpers, renderSkillUiEnhancementScript, renderProfileSwitcherScript, renderProjectReferenceEnhancementScript, renderTasksAndSettingsScript, renderReviewQueueKeyboardScript, renderSearchScript, renderEventWiringScript, renderGraphHostScript, renderActivityStreamScript, renderGraphWalkScript, } from "./scripts.js";
|
|
6
|
+
import { renderSharedWebUiHelpers, renderSkillUiEnhancementScript, renderProfileSwitcherScript, renderFindingCaptureEnhancementScript, renderNotesEnhancementScript, renderProjectReferenceEnhancementScript, renderTasksAndSettingsScript, renderReviewQueueKeyboardScript, renderSearchScript, renderEventWiringScript, renderGraphHostScript, renderActivityStreamScript, renderGraphWalkScript, } from "./scripts.js";
|
|
7
7
|
function h(s) {
|
|
8
8
|
return s
|
|
9
9
|
.replace(/&/g, "&")
|
|
@@ -31,6 +31,8 @@ ${REVIEW_UI_STYLES}
|
|
|
31
31
|
${PHREN_DEEP_VOID_STYLES}
|
|
32
32
|
${LAYOUT_VIEWPORT_STYLES}
|
|
33
33
|
${GRAPH_HUD_STYLES}
|
|
34
|
+
${FINDING_CAPTURE_UI_STYLES}
|
|
35
|
+
${NOTES_UI_STYLES}
|
|
34
36
|
</style>
|
|
35
37
|
</head>
|
|
36
38
|
<body>
|
|
@@ -405,6 +407,12 @@ ${renderGraphHostScript()}
|
|
|
405
407
|
${renderSharedWebUiHelpers(authToken || "")}
|
|
406
408
|
</script>
|
|
407
409
|
<script${nonceAttr}>
|
|
410
|
+
${renderFindingCaptureEnhancementScript()}
|
|
411
|
+
</script>
|
|
412
|
+
<script${nonceAttr}>
|
|
413
|
+
${renderNotesEnhancementScript()}
|
|
414
|
+
</script>
|
|
415
|
+
<script${nonceAttr}>
|
|
408
416
|
${renderSkillUiEnhancementScript(h(authToken || ""))}
|
|
409
417
|
</script>
|
|
410
418
|
<script${nonceAttr}>
|
package/dist/ui/scripts.d.ts
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function renderSharedWebUiHelpers(authToken: string): string;
|
|
10
10
|
export declare function renderProfileSwitcherScript(_authToken: string): string;
|
|
11
|
+
export declare function renderFindingCaptureEnhancementScript(): string;
|
|
12
|
+
export declare function renderNotesEnhancementScript(): string;
|
|
11
13
|
export declare function renderSkillUiEnhancementScript(_authToken: string): string;
|
|
12
14
|
export declare function renderProjectReferenceEnhancementScript(_authToken: string): string;
|
|
13
15
|
export declare function renderTasksAndSettingsScript(authToken: string): string;
|