pi-weave 0.1.7 → 0.1.9
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 +123 -37
- package/package.json +17 -5
- package/skills/weave-notepad/SKILL.md +13 -4
- package/src/core/cache/workspace.ts +466 -0
- package/src/core/concurrency.ts +36 -0
- package/src/core/frontmatter.ts +270 -23
- package/src/core/git.ts +19 -0
- package/src/core/graph/build.ts +97 -5
- package/src/core/graph/current.ts +41 -28
- package/src/core/graph/mentions.ts +170 -0
- package/src/core/graph/model.ts +39 -0
- package/src/core/graph/wikilinks.ts +5 -1
- package/src/core/index.ts +14 -0
- package/src/core/openInEditor.ts +69 -0
- package/src/core/paths.ts +7 -0
- package/src/core/sessions.ts +929 -0
- package/src/core/summaries.ts +1 -19
- package/src/core/types.ts +40 -0
- package/src/core/vault.ts +739 -57
- package/src/core/view/cluster.ts +262 -0
- package/src/core/view/detail.ts +118 -0
- package/src/core/view/focus.ts +109 -0
- package/src/core/view/health.ts +156 -0
- package/src/core/view/index.ts +15 -0
- package/src/core/view/links.ts +105 -0
- package/src/core/view/time.ts +47 -0
- package/src/core/view/tree.ts +269 -0
- package/src/core/view/types.ts +39 -0
- package/src/core/workspace.ts +3 -3
- package/src/pi/index.ts +248 -48
- package/src/pi/sessionScan.ts +104 -0
- package/src/pi/summarize.ts +24 -4
- package/src/pi/tools/noteTool.ts +13 -4
- package/src/pi/viewer/tui/branding.ts +8 -7
- package/src/pi/viewer/tui/explorer.ts +5 -3
- package/src/pi/viewer/tui/model.ts +46 -667
- package/src/pi/viewer/tui/openNote.ts +7 -56
- package/src/pi/viewer/tui/surface/explore.ts +4 -2
- package/src/pi/viewer/web/run.ts +331 -0
- package/src/web/client/api.dom.ts +40 -0
- package/src/web/client/api.ts +472 -0
- package/src/web/client/bootstrap.ts +58 -0
- package/src/web/client/context/context.model.ts +313 -0
- package/src/web/client/dist/app.js +764 -0
- package/src/web/client/graph/Graph.tsx +209 -0
- package/src/web/client/graph/column.model.ts +372 -0
- package/src/web/client/graph/dynamics.ts +176 -0
- package/src/web/client/graph/graph.model.ts +546 -0
- package/src/web/client/graph/positions.ts +380 -0
- package/src/web/client/graph/project.ts +153 -0
- package/src/web/client/graph/renderer.dom.ts +52 -0
- package/src/web/client/graph/renderer.ts +339 -0
- package/src/web/client/graph/scheme.ts +44 -0
- package/src/web/client/live.model.ts +275 -0
- package/src/web/client/live.ts +151 -0
- package/src/web/client/main.tsx +27 -0
- package/src/web/client/note/Editor.tsx +102 -0
- package/src/web/client/note/Note.tsx +113 -0
- package/src/web/client/note/editor.controller.ts +151 -0
- package/src/web/client/note/editor.model.ts +636 -0
- package/src/web/client/note/note.model.ts +738 -0
- package/src/web/client/search/SearchPalette.tsx +105 -0
- package/src/web/client/search/search.model.ts +588 -0
- package/src/web/client/search/search.ts +107 -0
- package/src/web/client/selection.storage.ts +69 -0
- package/src/web/client/shell/Columns.tsx +161 -0
- package/src/web/client/shell/ContextRail.tsx +87 -0
- package/src/web/client/shell/Divider.tsx +44 -0
- package/src/web/client/shell/FocusTrap.tsx +56 -0
- package/src/web/client/shell/Header.tsx +64 -0
- package/src/web/client/shell/HelpOverlay.tsx +70 -0
- package/src/web/client/shell/Shell.tsx +210 -0
- package/src/web/client/shell/StatusBar.tsx +28 -0
- package/src/web/client/shell/cssvars.ts +70 -0
- package/src/web/client/shell/drag.model.ts +170 -0
- package/src/web/client/shell/focus.model.ts +100 -0
- package/src/web/client/shell/keys.model.ts +453 -0
- package/src/web/client/shell/keys.ts +59 -0
- package/src/web/client/shell/layout.model.ts +526 -0
- package/src/web/client/shell/shell.model.ts +333 -0
- package/src/web/client/shell/theme.ts +490 -0
- package/src/web/client/shell/viewport.ts +29 -0
- package/src/web/client/state.ts +89 -0
- package/src/web/client/tree/Tree.tsx +141 -0
- package/src/web/client/tree/tree.model.ts +674 -0
- package/src/web/client/workspace.ts +278 -0
- package/src/web/server/page.ts +258 -0
- package/src/web/server/routes.ts +987 -0
- package/src/web/server/security.ts +361 -0
- package/src/web/server/server.ts +275 -0
- package/src/web/server/sse.ts +321 -0
- package/src/web/server/watcher.ts +507 -0
- package/src/web/shared/graph.ts +213 -0
- package/src/web/shared/layout.ts +314 -0
- package/src/web/shared/logo.ts +11 -0
- package/src/web/shared/metrics.ts +136 -0
- package/src/web/shared/view.ts +200 -0
- package/src/web/shared/wire.ts +358 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* 1. "kitty" — the real raster logo via pi-tui's `Image` component (a small
|
|
8
8
|
* ~2×2-cell favicon). The raw JPG is bundled and base64'd once.
|
|
9
9
|
* 2. "glyph" — a tiny curated Unicode glyph derived from the logo silhouette.
|
|
10
|
-
* 3. "plain" —
|
|
10
|
+
* 3. "plain" — `🕸️` + wordmark, forced by PI_WEAVE_TUI_PLAIN.
|
|
11
11
|
*
|
|
12
12
|
* The line-art/unicode constants contain no ESC by construction (decision 1:
|
|
13
13
|
* the representation fallback is a curated constant, never generated at runtime).
|
|
@@ -22,25 +22,26 @@ export type LogoTier = "kitty" | "glyph" | "plain";
|
|
|
22
22
|
/** A tiny Unicode mark derived from the logo silhouette (decision 1 fallback). */
|
|
23
23
|
export const MARK_GLYPH = "◈";
|
|
24
24
|
/** Absolute last-resort mark (also the forced plain tier). */
|
|
25
|
-
export const PLAIN_MARK = "
|
|
25
|
+
export const PLAIN_MARK = "🕸️";
|
|
26
26
|
/** The wordmark shown after the mark. */
|
|
27
27
|
export const WORDMARK = "weave view";
|
|
28
28
|
|
|
29
29
|
/** Env var that forces the plain tier. */
|
|
30
30
|
export const PLAIN_ENV = "PI_WEAVE_TUI_PLAIN";
|
|
31
31
|
|
|
32
|
-
/** MIME of the bundled raster logo asset (downscaled
|
|
33
|
-
export const LOGO_MIME = "image/
|
|
32
|
+
/** MIME of the bundled raster logo asset (downscaled transparent PNG of the logo). */
|
|
33
|
+
export const LOGO_MIME = "image/png";
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* Bundled downscaled raster copy of `docs/pi-weave-logo.
|
|
37
|
-
* Decision 1 (§15): ship a small raster copy
|
|
36
|
+
* Bundled downscaled raster copy of `docs/pi-weave-logo.png` (the transparent-
|
|
37
|
+
* background spider, 32×32, ~1.7 KB). Decision 1 (§15): ship a small raster copy
|
|
38
|
+
* and embed it via pi-tui's `Image`
|
|
38
39
|
* (Kitty graphics) as a small ~2×2-cell favicon in the header strip — a casual
|
|
39
40
|
* in-bar mark, not a hero splash. Stored base64 so the render path needs no
|
|
40
41
|
* fs/path resolution and the asset is trivially unit-testable.
|
|
41
42
|
*/
|
|
42
43
|
export const LOGO_B64 =
|
|
43
|
-
"/
|
|
44
|
+
"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGCElEQVRYCe2WeWwUVRzHfzNv7t3Z7S57tNt2OXpFCqVYigerUYtYz6hNqchfQMSQEKOJGvlD4q3E26gQBUJiEKFERU00rULBYhCsHFKgCMWjsnSv2d3Zndm5naqoJUWLG+M/vmQy78283+/3yff93u89gCLawYMnAl8NDPiKcAF4McYGZ1kO07SK8UEUY5wTRdA0thgXxSkAOQARskUBFKdALgcFVf3vABKJBCYTJFYMQVEKpNNpC8fRf5eEdXXlEs/zZjEK/CP5Jje01nGsu4VhyJmmaWqqUuhNiend0aPbv79QmAsDcIc902svXeUNBBcSNM1pugqGaQCB4VCQ5LSQjL9+/MC2x2wIZbwgaLwT7XnUtPq5H5aHJrbJUoYE2YAAWQYujIesmAQwVcbj8lxBc2UTk7Hj74/X77gBwlNalpeXVi7L2cFsycHUDODs4IahQVqKgqoqYGgqIBzNUA3mqJyP9o8HYjyl+JedwjtcHYauQDYtgGTvfwIjQVJEkGUJLM2CvP1Nztt9UwcMsAW/Bef+DuIvFQiGZt0xuar5LZLyM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ViaXieaqISXMnup3GUrKWqunESeR58eP7erGSS18xu2exzl84EHX1HFtRPeg5sswvH6DamAn19b2j2tOUNDfMcEj/hmtrmOR9907NBdYa91Tphne7+uoQlvWcMd2jyUgTmFnMYNeeVwtYCcXwoG/PVjYRYseixHsPSavOZ75947q0H8qPD/jEaMwf++G332ttRfYK7VCMdFRjDNjGa/KnDSemYQh2rXzk/Lryzo4JFnsuorDqoZnM+Vgm0G2AM0pzcFZN37u3s7DRG+Ttn8PcAvxlUzVveYRf95xlLfppC+GGKoXIs0IaT5SIor+yjTJpkET2BhtJ77ANp99p3F608J9aYw3ED2NbYlKZ212BfZ6apfambAoeTBpplccIiMULmEeQ2bnykuDv6mIj/f/xfgX9ZgZ8BjHSob2Br4LAAAAAASUVORK5CYII=";
|
|
44
45
|
|
|
45
46
|
/** Terminal capability surface branding probes. */
|
|
46
47
|
export interface BrandCapabilities {
|
|
@@ -21,6 +21,7 @@ import type { ViewNote } from "../../../core/graph/current";
|
|
|
21
21
|
import {
|
|
22
22
|
detailModel,
|
|
23
23
|
focusModel,
|
|
24
|
+
formatTreeMeta,
|
|
24
25
|
graphRoots,
|
|
25
26
|
healthModel,
|
|
26
27
|
initialState,
|
|
@@ -262,7 +263,7 @@ export class WeaveExplorer implements Component {
|
|
|
262
263
|
|
|
263
264
|
private renderHeader(width: number): string[] {
|
|
264
265
|
const t = this.theme;
|
|
265
|
-
const line1 = t.bold(
|
|
266
|
+
const line1 = t.bold(`🕸️ weave view — data as of ${this.model.generatedAt || "now"}`) + ` ${this.surfaceName()}`;
|
|
266
267
|
const counts = this.countNotes();
|
|
267
268
|
const repo = this.model.nodes.find((n) => n.kind === "repository");
|
|
268
269
|
const repoState = this.model.staleness?.state ?? (repo ? "fresh" : "missing");
|
|
@@ -359,8 +360,8 @@ export class WeaveExplorer implements Component {
|
|
|
359
360
|
showInternals: this.state.showInternals,
|
|
360
361
|
provFilter: this.state.provFilter,
|
|
361
362
|
query: this.state.query,
|
|
362
|
-
now: this.nowFn(),
|
|
363
363
|
});
|
|
364
|
+
const now = this.nowFn();
|
|
364
365
|
const hint = treeEmptyHint(this.model);
|
|
365
366
|
if (rows.length === 0 && hint) {
|
|
366
367
|
return { lines: [{ text: t.fg("dim", hint) }], rows: [] };
|
|
@@ -369,7 +370,8 @@ export class WeaveExplorer implements Component {
|
|
|
369
370
|
const chev = chevron(r.expanded, r.hasKids);
|
|
370
371
|
const marker = this.rowMarker(r.kind, r.provenance);
|
|
371
372
|
const label = sanitizeTerminalText(r.label);
|
|
372
|
-
const
|
|
373
|
+
const metaText = formatTreeMeta(r.meta, now);
|
|
374
|
+
const meta = metaText ? t.fg("dim", ` ${sanitizeTerminalText(metaText)}`) : "";
|
|
373
375
|
const indent = " ".repeat(r.depth);
|
|
374
376
|
const body = `${indent}${chev} ${marker}${label}`;
|
|
375
377
|
const text = meta ? `${body}${meta}` : body;
|