@phren/cli 0.1.44 → 0.1.46
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/agents/providers/herdr.d.ts +18 -0
- package/dist/agents/providers/herdr.js +94 -0
- package/dist/agents/providers/spawner.d.ts +13 -0
- package/dist/agents/providers/spawner.js +63 -0
- package/dist/agents/registry.d.ts +28 -0
- package/dist/agents/registry.js +82 -0
- package/dist/agents/types.d.ts +51 -0
- package/dist/agents/types.js +42 -0
- package/dist/cli/actions.d.ts +1 -1
- package/dist/cli/actions.js +7 -2
- package/dist/cli/config-proactivity.d.ts +6 -6
- package/dist/cli/hooks.d.ts +1 -1
- package/dist/cli/hooks.js +14 -3
- package/dist/cli/search.js +29 -0
- package/dist/cli/session-stop.d.ts +1 -1
- package/dist/cli/session-tool-hook.d.ts +1 -1
- package/dist/cli-registry.d.ts +1 -1
- package/dist/cli-registry.js +2 -1
- package/dist/content/learning.js +24 -1
- package/dist/data/access.js +2 -1
- package/dist/generated/memory-ui-graph.browser.js +482 -319
- package/dist/governance/locks.js +6 -0
- package/dist/graph-core/index.d.ts +2 -0
- package/dist/graph-core/index.js +2 -0
- package/dist/graph-core/model.d.ts +84 -0
- package/dist/graph-core/model.js +445 -0
- package/dist/graph-core/types.d.ts +110 -0
- package/dist/graph-core/types.js +43 -0
- package/dist/index.js +4 -1
- package/dist/init/init-uninstall.d.ts +1 -0
- package/dist/init/init-uninstall.js +1 -1
- package/dist/init/setup.js +11 -4
- package/dist/link/context.js +2 -1
- package/dist/link/link.js +3 -2
- package/dist/link/skills.js +2 -1
- package/dist/memory-ui-graph.runtime.js +482 -319
- package/dist/phren-art.d.ts +7 -0
- package/dist/phren-art.js +6 -41
- package/dist/phren-core.d.ts +16 -0
- package/dist/phren-core.js +21 -0
- package/dist/phren-paths.js +8 -4
- package/dist/profile-store.js +3 -2
- package/dist/project-config.js +2 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/lookup-tail.d.ts +35 -0
- package/dist/shared/lookup-tail.js +100 -0
- package/dist/shared/retrieval.d.ts +28 -0
- package/dist/shared/retrieval.js +45 -0
- package/dist/shell/entry.d.ts +3 -3
- package/dist/shell/entry.js +19 -44
- package/dist/shell/graph/agents.d.ts +48 -0
- package/dist/shell/graph/agents.js +152 -0
- package/dist/shell/graph/canvas.d.ts +64 -0
- package/dist/shell/graph/canvas.js +256 -0
- package/dist/shell/graph/controller.d.ts +202 -0
- package/dist/shell/graph/controller.js +782 -0
- package/dist/shell/graph/glyphs.d.ts +12 -0
- package/dist/shell/graph/glyphs.js +31 -0
- package/dist/shell/graph/graph-view.d.ts +19 -0
- package/dist/shell/graph/graph-view.js +585 -0
- package/dist/shell/graph/layout.d.ts +87 -0
- package/dist/shell/graph/layout.js +335 -0
- package/dist/shell/graph/watch.d.ts +71 -0
- package/dist/shell/graph/watch.js +153 -0
- package/dist/shell/input.d.ts +3 -0
- package/dist/shell/input.js +26 -4
- package/dist/shell/intro.d.ts +37 -0
- package/dist/shell/intro.js +82 -0
- package/dist/shell/logo-fx.d.ts +35 -0
- package/dist/shell/logo-fx.js +128 -0
- package/dist/shell/render.d.ts +2 -2
- package/dist/shell/render.js +15 -28
- package/dist/shell/shell.d.ts +15 -1
- package/dist/shell/shell.js +50 -7
- package/dist/shell/startup.d.ts +40 -0
- package/dist/shell/startup.js +113 -0
- package/dist/shell/state-store.d.ts +1 -1
- package/dist/shell/state-store.js +1 -1
- package/dist/shell/types.js +1 -0
- package/dist/shell/view.d.ts +3 -0
- package/dist/shell/view.js +72 -63
- package/dist/store-registry.js +3 -3
- package/dist/test-global-setup.d.ts +1 -0
- package/dist/test-global-setup.js +22 -0
- package/dist/tool-registry.js +1 -0
- package/dist/ui/data.d.ts +15 -7
- package/dist/ui/data.js +102 -3
- package/dist/ui/server.js +6 -56
- package/dist/utils-fts.js +2 -1
- package/dist/utils-helpers.d.ts +1 -0
- package/dist/utils-helpers.js +6 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +11 -7
package/dist/ui/data.js
CHANGED
|
@@ -10,13 +10,32 @@ import { hookConfigPaths, hookConfigRoots } from "../provider-adapters.js";
|
|
|
10
10
|
import { readProjectConfig, isProjectHookEnabled, PROJECT_HOOK_EVENTS } from "../project-config.js";
|
|
11
11
|
import { getAllSkills } from "../skill/registry.js";
|
|
12
12
|
import { resolveTaskFilePath, readTasks, TASKS_FILENAME } from "../data/tasks.js";
|
|
13
|
-
import { FINDINGS_FILENAME } from "../data/access.js";
|
|
13
|
+
import { FINDINGS_FILENAME, readFindings } from "../data/access.js";
|
|
14
14
|
import { buildIndex, queryDocBySourceKey, queryRows } from "../shared/index.js";
|
|
15
15
|
import { readProjectTopics, classifyTopicForText } from "../project-topics.js";
|
|
16
16
|
import { entryScoreKey } from "../governance/scores.js";
|
|
17
17
|
import { findingStableId } from "../finding-graph-id.js";
|
|
18
18
|
import { readRecentLookups } from "../governance/activity.js";
|
|
19
19
|
import { logger } from "../logger.js";
|
|
20
|
+
/** `[tag] text` → `text`, lower-cased, for matching lifecycle snippets against node labels. */
|
|
21
|
+
function lifecycleKey(text) {
|
|
22
|
+
return text.replace(/^\[[a-z_-]+\]\s+/i, "").trim().toLowerCase();
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Resolve a 60-char lifecycle snippet to a finding node of the same project.
|
|
26
|
+
* Either side may be the prefix of the other: the snippet is truncated, and
|
|
27
|
+
* the node label may itself be shorter than 60 chars.
|
|
28
|
+
*/
|
|
29
|
+
function resolveLifecycleRef(snippet, candidates) {
|
|
30
|
+
const key = lifecycleKey(snippet);
|
|
31
|
+
if (!key)
|
|
32
|
+
return undefined;
|
|
33
|
+
for (const candidate of candidates) {
|
|
34
|
+
if (candidate.key.startsWith(key) || key.startsWith(candidate.key))
|
|
35
|
+
return candidate.nodeId;
|
|
36
|
+
}
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
20
39
|
function extractGithubUrl(content) {
|
|
21
40
|
const match = content.match(/https?:\/\/github\.com\/[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+/);
|
|
22
41
|
return match ? match[0] : undefined;
|
|
@@ -160,7 +179,7 @@ export function getHooksData(phrenPath, profile) {
|
|
|
160
179
|
}
|
|
161
180
|
return { globalEnabled, tools, customHooks: readCustomHooks(phrenPath), projectOverrides };
|
|
162
181
|
}
|
|
163
|
-
export async function buildGraph(phrenPath, profile, focusProject, existingDb) {
|
|
182
|
+
export async function buildGraph(phrenPath, profile, focusProject, existingDb, opts = {}) {
|
|
164
183
|
// Collect projects from primary store and all readable non-primary stores
|
|
165
184
|
const storeProjects = [];
|
|
166
185
|
const primaryProjects = getProjectDirs(phrenPath, profile)
|
|
@@ -205,6 +224,15 @@ export async function buildGraph(phrenPath, profile, focusProject, existingDb) {
|
|
|
205
224
|
usedFindingIds.set(id, seen + 1);
|
|
206
225
|
return seen === 0 ? id : `${id}-${seen + 1}`;
|
|
207
226
|
};
|
|
227
|
+
// Finding text → node id per project, for resolving lifecycle snippets.
|
|
228
|
+
const findingKeysByProject = new Map();
|
|
229
|
+
const rememberFinding = (project, text, nodeId) => {
|
|
230
|
+
if (!opts.includeLifecycleEdges)
|
|
231
|
+
return;
|
|
232
|
+
const list = findingKeysByProject.get(project) ?? [];
|
|
233
|
+
list.push({ key: lifecycleKey(text), nodeId });
|
|
234
|
+
findingKeysByProject.set(project, list);
|
|
235
|
+
};
|
|
208
236
|
for (const { storePath, project } of storeProjects) {
|
|
209
237
|
// Load dynamic topics for this project
|
|
210
238
|
const { topics: projectTopics } = readProjectTopics(storePath, project);
|
|
@@ -318,6 +346,7 @@ export async function buildGraph(phrenPath, profile, focusProject, existingDb) {
|
|
|
318
346
|
date: currentDate,
|
|
319
347
|
});
|
|
320
348
|
links.push({ source: project, target: nodeId });
|
|
349
|
+
rememberFinding(project, text, nodeId);
|
|
321
350
|
for (const other of exactProjectMentions(text, projectSet, project)) {
|
|
322
351
|
links.push({ source: project, target: other });
|
|
323
352
|
}
|
|
@@ -354,6 +383,7 @@ export async function buildGraph(phrenPath, profile, focusProject, existingDb) {
|
|
|
354
383
|
date: currentDate,
|
|
355
384
|
});
|
|
356
385
|
links.push({ source: project, target: nodeId });
|
|
386
|
+
rememberFinding(project, text, nodeId);
|
|
357
387
|
for (const other of exactProjectMentions(text, projectSet, project)) {
|
|
358
388
|
links.push({ source: project, target: other });
|
|
359
389
|
}
|
|
@@ -390,12 +420,43 @@ export async function buildGraph(phrenPath, profile, focusProject, existingDb) {
|
|
|
390
420
|
date: currentDate,
|
|
391
421
|
});
|
|
392
422
|
links.push({ source: project, target: nodeId });
|
|
423
|
+
rememberFinding(project, text, nodeId);
|
|
393
424
|
}
|
|
394
425
|
const projectNode = projectNodeByName.get(project);
|
|
395
426
|
if (projectNode) {
|
|
396
427
|
projectNode.findingCount = (projectNode.findingCount || 0) + taggedCount + untaggedAdded;
|
|
397
428
|
}
|
|
398
429
|
}
|
|
430
|
+
// ── Lifecycle edges (opt-in) ─────────────────────────────────────────
|
|
431
|
+
if (opts.includeLifecycleEdges) {
|
|
432
|
+
for (const { storePath, project } of storeProjects) {
|
|
433
|
+
const candidates = findingKeysByProject.get(project);
|
|
434
|
+
if (!candidates?.length)
|
|
435
|
+
continue;
|
|
436
|
+
const result = readFindings(storePath, project);
|
|
437
|
+
if (!result.ok)
|
|
438
|
+
continue;
|
|
439
|
+
for (const item of result.data) {
|
|
440
|
+
if (!item.supersedes && !item.supersededBy && !item.contradicts?.length)
|
|
441
|
+
continue;
|
|
442
|
+
const self = resolveLifecycleRef(item.text, candidates);
|
|
443
|
+
if (!self)
|
|
444
|
+
continue;
|
|
445
|
+
const edge = (snippet, kind, newerFirst) => {
|
|
446
|
+
const other = resolveLifecycleRef(snippet, candidates);
|
|
447
|
+
if (!other || other === self)
|
|
448
|
+
return;
|
|
449
|
+
links.push(newerFirst ? { source: self, target: other, kind } : { source: other, target: self, kind });
|
|
450
|
+
};
|
|
451
|
+
if (item.supersedes)
|
|
452
|
+
edge(item.supersedes, "supersedes", true);
|
|
453
|
+
if (item.supersededBy)
|
|
454
|
+
edge(item.supersededBy, "supersedes", false);
|
|
455
|
+
for (const snippet of item.contradicts ?? [])
|
|
456
|
+
edge(snippet, "contradicts", true);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
399
460
|
// ── Tasks ──────────────────────────────────────────────────────────
|
|
400
461
|
try {
|
|
401
462
|
for (const { storePath, project } of storeProjects) {
|
|
@@ -479,6 +540,7 @@ export async function buildGraph(phrenPath, profile, focusProject, existingDb) {
|
|
|
479
540
|
refsByEntity.set(entityId, refs);
|
|
480
541
|
}
|
|
481
542
|
}
|
|
543
|
+
const entityNodeIds = new Map();
|
|
482
544
|
if (rows) {
|
|
483
545
|
for (const row of rows) {
|
|
484
546
|
const entityId = typeof row[0] === "number" ? row[0] : -1;
|
|
@@ -517,7 +579,44 @@ export async function buildGraph(phrenPath, profile, focusProject, existingDb) {
|
|
|
517
579
|
for (const proj of linkedProjects) {
|
|
518
580
|
links.push({ source: nodeId, target: proj });
|
|
519
581
|
}
|
|
582
|
+
entityNodeIds.set(entityId, nodeId);
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
// ── Fragment co-occurrence edges (opt-in) ──────────────────────────
|
|
586
|
+
// Two fragments mentioned by the same document are related; the more
|
|
587
|
+
// documents they share, the stronger the tie. Derived from refsByEntity,
|
|
588
|
+
// so no extra SQL.
|
|
589
|
+
if (opts.includeFragmentEdges && entityNodeIds.size > 1) {
|
|
590
|
+
const MAX_ENTITIES_PER_DOC = 40;
|
|
591
|
+
const MAX_FRAGMENT_EDGES = 400;
|
|
592
|
+
const entitiesByDoc = new Map();
|
|
593
|
+
for (const [entityId, nodeId] of entityNodeIds) {
|
|
594
|
+
for (const ref of refsByEntity.get(entityId) ?? []) {
|
|
595
|
+
const list = entitiesByDoc.get(ref.doc) ?? [];
|
|
596
|
+
if (list.length < MAX_ENTITIES_PER_DOC && !list.includes(nodeId))
|
|
597
|
+
list.push(nodeId);
|
|
598
|
+
entitiesByDoc.set(ref.doc, list);
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
const pairCounts = new Map();
|
|
602
|
+
for (const members of entitiesByDoc.values()) {
|
|
603
|
+
const sorted = members.slice().sort();
|
|
604
|
+
for (let i = 0; i < sorted.length; i++) {
|
|
605
|
+
for (let j = i + 1; j < sorted.length; j++) {
|
|
606
|
+
const key = `${sorted[i]}||${sorted[j]}`;
|
|
607
|
+
const entry = pairCounts.get(key) ?? { a: sorted[i], b: sorted[j], count: 0 };
|
|
608
|
+
entry.count++;
|
|
609
|
+
pairCounts.set(key, entry);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
520
612
|
}
|
|
613
|
+
const ranked = Array.from(pairCounts.values()).sort((x, y) => y.count - x.count || x.a.localeCompare(y.a) || x.b.localeCompare(y.b));
|
|
614
|
+
// Prefer pairs that co-occur in several docs; on a small store fall back
|
|
615
|
+
// to single co-mentions so the fragment layer still has structure.
|
|
616
|
+
const strong = ranked.filter((pair) => pair.count >= 2);
|
|
617
|
+
const chosen = (strong.length >= 20 ? strong : ranked).slice(0, MAX_FRAGMENT_EDGES);
|
|
618
|
+
for (const pair of chosen)
|
|
619
|
+
links.push({ source: pair.a, target: pair.b, kind: "fragment" });
|
|
521
620
|
}
|
|
522
621
|
}
|
|
523
622
|
catch {
|
|
@@ -582,7 +681,7 @@ export async function buildGraph(phrenPath, profile, focusProject, existingDb) {
|
|
|
582
681
|
}
|
|
583
682
|
const seen = new Set();
|
|
584
683
|
const dedupedLinks = links.filter((link) => {
|
|
585
|
-
const key = [link.source, link.target].sort().join("||")
|
|
684
|
+
const key = `${[link.source, link.target].sort().join("||")}::${link.kind ?? ""}`;
|
|
586
685
|
if (seen.has(key))
|
|
587
686
|
return false;
|
|
588
687
|
seen.add(key);
|
package/dist/ui/server.js
CHANGED
|
@@ -13,6 +13,7 @@ import { isValidProjectName, errorMessage, safeProjectPath } from "../utils.js";
|
|
|
13
13
|
import { readInstallPreferences, writeInstallPreferences, writeGovernanceInstallPreferences } from "../init/preferences.js";
|
|
14
14
|
import { buildGraph, collectProjectsForUI, collectSkillsForUI, getHooksData, isAllowedHookConfigPath, isAllowedSkillPath, readSyncSnapshot, recentAccepted, recentLookups, recentUsage, } from "./data.js";
|
|
15
15
|
import { lookupEventsLogFile } from "../shared.js";
|
|
16
|
+
import { LookupTail } from "../shared/lookup-tail.js";
|
|
16
17
|
import { CONSOLIDATION_ENTRY_THRESHOLD } from "../content/validate.js";
|
|
17
18
|
import { ensureTopicReferenceDoc, getProjectTopicsResponse, listProjectReferenceDocs, pinProjectTopicSuggestion, readReferenceContent, reclassifyLegacyTopicDocs, unpinProjectTopicSuggestion, writeProjectTopics, } from "../project-topics.js";
|
|
18
19
|
import { getWorkflowPolicy, updateWorkflowPolicy, updateRetentionPolicy, mergeConfig, getRetentionPolicy, getProjectConfigOverrides, getIndexPolicy, updateIndexPolicy, VALID_TASK_MODES } from "../governance/policy.js";
|
|
@@ -398,63 +399,12 @@ function handleLookupStream(req, res, ctx) {
|
|
|
398
399
|
"X-Accel-Buffering": "no",
|
|
399
400
|
});
|
|
400
401
|
res.write("retry: 3000\n\n");
|
|
401
|
-
|
|
402
|
-
//
|
|
403
|
-
|
|
404
|
-
let offset = 0;
|
|
405
|
-
try {
|
|
406
|
-
offset = fs.existsSync(logPath) ? fs.statSync(logPath).size : 0;
|
|
407
|
-
}
|
|
408
|
-
catch {
|
|
409
|
-
offset = 0;
|
|
410
|
-
}
|
|
411
|
-
let carry = "";
|
|
402
|
+
// Only stream events appended after the client connects; the initial
|
|
403
|
+
// snapshot comes from /api/lookups.
|
|
404
|
+
const tail = new LookupTail(lookupEventsLogFile(ctx.phrenPath));
|
|
412
405
|
const flushNew = () => {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
if (!fs.existsSync(logPath))
|
|
416
|
-
return;
|
|
417
|
-
size = fs.statSync(logPath).size;
|
|
418
|
-
}
|
|
419
|
-
catch {
|
|
420
|
-
return;
|
|
421
|
-
}
|
|
422
|
-
if (size < offset) {
|
|
423
|
-
offset = 0;
|
|
424
|
-
carry = "";
|
|
425
|
-
} // file rotated/truncated
|
|
426
|
-
if (size <= offset)
|
|
427
|
-
return;
|
|
428
|
-
let chunk = "";
|
|
429
|
-
try {
|
|
430
|
-
const fd = fs.openSync(logPath, "r");
|
|
431
|
-
try {
|
|
432
|
-
const buf = Buffer.alloc(size - offset);
|
|
433
|
-
fs.readSync(fd, buf, 0, buf.length, offset);
|
|
434
|
-
chunk = buf.toString("utf8");
|
|
435
|
-
}
|
|
436
|
-
finally {
|
|
437
|
-
fs.closeSync(fd);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
catch {
|
|
441
|
-
return;
|
|
442
|
-
}
|
|
443
|
-
offset = size;
|
|
444
|
-
const lines = (carry + chunk).split("\n");
|
|
445
|
-
carry = lines.pop() ?? "";
|
|
446
|
-
for (const line of lines) {
|
|
447
|
-
const trimmed = line.trim();
|
|
448
|
-
if (!trimmed)
|
|
449
|
-
continue;
|
|
450
|
-
try {
|
|
451
|
-
JSON.parse(trimmed); // validate before forwarding
|
|
452
|
-
res.write(`data: ${trimmed}\n\n`);
|
|
453
|
-
}
|
|
454
|
-
catch {
|
|
455
|
-
// skip malformed lines
|
|
456
|
-
}
|
|
457
|
-
}
|
|
406
|
+
for (const line of tail.pollLines())
|
|
407
|
+
res.write(`data: ${line}\n\n`);
|
|
458
408
|
};
|
|
459
409
|
const pollTimer = setInterval(flushNew, 1000);
|
|
460
410
|
const heartbeat = setInterval(() => {
|
package/dist/utils-fts.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as fs from "fs";
|
|
2
2
|
import * as path from "path";
|
|
3
3
|
import * as yaml from "js-yaml";
|
|
4
|
+
import { loadYamlDocument } from "./phren-core.js";
|
|
4
5
|
import { fileURLToPath } from "url";
|
|
5
6
|
import { findPhrenPath } from "./phren-paths.js";
|
|
6
7
|
import { isValidProjectName } from "./utils-paths.js";
|
|
@@ -122,7 +123,7 @@ function parseSynonymsYaml(filePath) {
|
|
|
122
123
|
if (!fs.existsSync(filePath))
|
|
123
124
|
return {};
|
|
124
125
|
try {
|
|
125
|
-
const parsed =
|
|
126
|
+
const parsed = loadYamlDocument(fs.readFileSync(filePath, "utf8"), (text) => yaml.load(text, { schema: yaml.CORE_SCHEMA }));
|
|
126
127
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
127
128
|
return {};
|
|
128
129
|
const loaded = {};
|
package/dist/utils-helpers.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare function resolveExecCommand(cmd: string): ResolvedExecCommand;
|
|
|
9
9
|
export declare function errorMessage(err: unknown): string;
|
|
10
10
|
export declare function isFeatureEnabled(envName: string, defaultValue?: boolean): boolean;
|
|
11
11
|
export declare function clampInt(raw: string | undefined, fallback: number, min: number, max: number): number;
|
|
12
|
+
export declare function clampFloat(raw: string | undefined, fallback: number, min: number, max: number): number;
|
|
12
13
|
export declare function getOptionValue(args: string[], name: string): string | undefined;
|
|
13
14
|
export declare function getPositionalArgs(args: string[], optionNamesWithValues: string[]): string[];
|
|
14
15
|
export {};
|
package/dist/utils-helpers.js
CHANGED
|
@@ -78,6 +78,12 @@ export function clampInt(raw, fallback, min, max) {
|
|
|
78
78
|
return fallback;
|
|
79
79
|
return Math.min(max, Math.max(min, parsed));
|
|
80
80
|
}
|
|
81
|
+
export function clampFloat(raw, fallback, min, max) {
|
|
82
|
+
const parsed = Number.parseFloat(raw || "");
|
|
83
|
+
if (Number.isNaN(parsed))
|
|
84
|
+
return fallback;
|
|
85
|
+
return Math.min(max, Math.max(min, parsed));
|
|
86
|
+
}
|
|
81
87
|
// ── Argv parsing helpers ────────────────────────────────────────────────────
|
|
82
88
|
export function getOptionValue(args, name) {
|
|
83
89
|
const exactIdx = args.indexOf(name);
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { runGitOrThrow, runGit, normalizeExecCommand, resolveExecCommand, errorMessage, isFeatureEnabled, clampInt, getOptionValue, getPositionalArgs, } from "./utils-helpers.js";
|
|
1
|
+
export { runGitOrThrow, runGit, normalizeExecCommand, resolveExecCommand, errorMessage, isFeatureEnabled, clampInt, clampFloat, getOptionValue, getPositionalArgs, } from "./utils-helpers.js";
|
|
2
2
|
export { isValidProjectName, safeProjectPath, queueFilePath, QUEUE_FILENAME, } from "./utils-paths.js";
|
|
3
3
|
export { STOP_WORDS, extractKeywordEntries, extractKeywords, learnedSynonymsPath, loadLearnedSynonyms, loadSynonymMap, learnSynonym, removeLearnedSynonym, sanitizeFts5Query, buildRobustFtsQuery, buildRelaxedFtsQuery, buildFtsQueryVariants, } from "./utils-fts.js";
|
package/dist/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Barrel re-export. Implementations split across utils-helpers.ts (general
|
|
2
2
|
// helpers, argv parsing, exec helpers), utils-paths.ts (path validation),
|
|
3
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";
|
|
4
|
+
export { runGitOrThrow, runGit, normalizeExecCommand, resolveExecCommand, errorMessage, isFeatureEnabled, clampInt, clampFloat, getOptionValue, getPositionalArgs, } from "./utils-helpers.js";
|
|
5
5
|
export { isValidProjectName, safeProjectPath, queueFilePath, QUEUE_FILENAME, } from "./utils-paths.js";
|
|
6
6
|
export { STOP_WORDS, extractKeywordEntries, extractKeywords, learnedSynonymsPath, loadLearnedSynonyms, loadSynonymMap, learnSynonym, removeLearnedSynonym, sanitizeFts5Query, buildRobustFtsQuery, buildRelaxedFtsQuery, buildFtsQueryVariants, } from "./utils-fts.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phren/cli",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Knowledge layer for AI agents
|
|
3
|
+
"version": "0.1.46",
|
|
4
|
+
"description": "Knowledge layer for AI agents — CLI, MCP server, and data layer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"phren": "dist/index.js"
|
|
@@ -85,6 +85,10 @@
|
|
|
85
85
|
"types": "./dist/shell/render-api.d.ts",
|
|
86
86
|
"default": "./dist/shell/render-api.js"
|
|
87
87
|
},
|
|
88
|
+
"./shell/intro": {
|
|
89
|
+
"types": "./dist/shell/intro.d.ts",
|
|
90
|
+
"default": "./dist/shell/intro.js"
|
|
91
|
+
},
|
|
88
92
|
"./phren-art": {
|
|
89
93
|
"types": "./dist/phren-art.d.ts",
|
|
90
94
|
"default": "./dist/phren-art.js"
|
|
@@ -104,11 +108,11 @@
|
|
|
104
108
|
"preuninstall": "node scripts/preuninstall.mjs"
|
|
105
109
|
},
|
|
106
110
|
"dependencies": {
|
|
107
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
108
|
-
"chalk": "^
|
|
111
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
112
|
+
"chalk": "^6.0.0",
|
|
109
113
|
"glob": "^13.0.6",
|
|
110
|
-
"inquirer": "^14.0
|
|
111
|
-
"js-yaml": "^
|
|
114
|
+
"inquirer": "^14.1.0",
|
|
115
|
+
"js-yaml": "^5.3.0",
|
|
112
116
|
"sql.js-fts5": "^1.4.0",
|
|
113
117
|
"zod": "^4.4.3"
|
|
114
118
|
},
|
|
@@ -131,7 +135,7 @@
|
|
|
131
135
|
},
|
|
132
136
|
"devDependencies": {
|
|
133
137
|
"3d-force-graph": "^1.80.0",
|
|
134
|
-
"three": "^0.
|
|
138
|
+
"three": "^0.185.1"
|
|
135
139
|
},
|
|
136
140
|
"publishConfig": {
|
|
137
141
|
"access": "public"
|