pi-weave 0.1.11 → 0.1.13
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 +148 -132
- package/package.json +1 -2
- package/src/core/cache/workspace.ts +26 -9
- package/src/core/concurrency.ts +3 -6
- package/src/core/frontmatter.ts +0 -53
- package/src/core/graph/build.ts +12 -8
- package/src/core/graph/current.ts +4 -6
- package/src/core/graph/model.ts +1 -1
- package/src/core/graph/wikilinks.ts +3 -3
- package/src/core/index.ts +26 -27
- package/src/core/paths.ts +0 -7
- package/src/core/slug.ts +13 -0
- package/src/core/types.ts +1 -0
- package/src/core/vault.ts +45 -467
- package/src/core/view/detail.ts +1 -1
- package/src/core/view/health.ts +1 -1
- package/src/core/view/tree.ts +15 -3
- package/src/pi/index.ts +6 -85
- package/src/pi/summarize.ts +2 -2
- package/src/pi/viewer/tui/bodyStore.ts +4 -7
- package/src/pi/viewer/tui/branding.ts +7 -148
- package/src/pi/viewer/tui/run.ts +3 -17
- package/src/pi/viewer/tui/surface/base.ts +24 -3
- package/src/pi/viewer/tui/surface/explore.ts +41 -6
- package/src/pi/viewer/tui/workspace.ts +23 -351
- package/src/pi/viewer/tui/workspaceRoot.ts +31 -172
- package/src/pi/viewer/web/run.ts +7 -117
- package/src/web/client/api.dom.ts +2 -2
- package/src/web/client/api.ts +14 -176
- package/src/web/client/bootstrap.ts +5 -14
- package/src/web/client/context/context.model.ts +9 -11
- package/src/web/client/dist/app.js +77 -167
- package/src/web/client/graph/dynamics.ts +5 -65
- package/src/web/client/graph/renderer.dom.ts +7 -8
- package/src/web/client/graph/renderer.ts +9 -35
- package/src/web/client/main.tsx +1 -1
- package/src/web/client/note/Note.tsx +37 -60
- package/src/web/client/note/note.model.ts +23 -0
- package/src/web/client/search/SearchPalette.tsx +45 -36
- package/src/web/client/search/search.model.ts +33 -454
- package/src/web/client/shell/Columns.tsx +13 -81
- package/src/web/client/shell/Header.tsx +2 -10
- package/src/web/client/shell/Shell.tsx +50 -123
- package/src/web/client/shell/StatusBar.tsx +1 -4
- package/src/web/client/shell/icons.model.ts +4 -7
- package/src/web/client/shell/keys.model.ts +5 -42
- package/src/web/client/shell/keys.ts +2 -2
- package/src/web/client/shell/shell.model.ts +10 -133
- package/src/web/client/shell/theme.model.ts +2 -2
- package/src/web/client/shell/theme.ts +33 -121
- package/src/web/client/state.ts +9 -89
- package/src/web/client/tree/Tree.tsx +24 -97
- package/src/web/client/tree/tree.model.ts +8 -56
- package/src/web/client/workspace.ts +72 -242
- package/src/web/server/page.ts +8 -10
- package/src/web/server/routes.ts +30 -415
- package/src/web/server/server.ts +6 -145
- package/src/web/shared/layout.ts +72 -624
- package/src/web/shared/wire.ts +10 -178
- package/src/core/sessions.ts +0 -929
- package/src/pi/sessionScan.ts +0 -104
- package/src/pi/viewer/tui/explorer.ts +0 -586
- package/src/web/client/live.model.ts +0 -275
- package/src/web/client/live.ts +0 -151
- package/src/web/client/note/Editor.tsx +0 -109
- package/src/web/client/note/editor.controller.ts +0 -151
- package/src/web/client/note/editor.model.ts +0 -686
- package/src/web/client/search/search.ts +0 -107
- package/src/web/client/shell/Divider.tsx +0 -44
- package/src/web/client/shell/cssvars.ts +0 -70
- package/src/web/client/shell/drag.model.ts +0 -170
- package/src/web/client/shell/layout.model.ts +0 -500
- package/src/web/client/shell/viewport.ts +0 -29
- package/src/web/server/sse.ts +0 -321
- package/src/web/server/watcher.ts +0 -507
package/src/core/index.ts
CHANGED
|
@@ -3,24 +3,32 @@
|
|
|
3
3
|
*
|
|
4
4
|
* NO harness imports allowed in this tree (see docs/design.md §21).
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
6
|
+
export type { WorkspaceStatus } from "./types";
|
|
7
|
+
export { NOTES_DIR, repoIndexDir, resolveVaultRoot } from "./paths";
|
|
8
|
+
export { findGitRoot } from "./git";
|
|
9
|
+
export {
|
|
10
|
+
assessStaleness,
|
|
11
|
+
buildRepoIndex,
|
|
12
|
+
readRepoIndex,
|
|
13
|
+
summarizeIndex,
|
|
14
|
+
writeRepoIndex,
|
|
15
|
+
} from "./repoIndex";
|
|
16
|
+
export { runDeepScan, type DeepScanOptions, type DeepScanResult, type SummarizeFn } from "./summaries";
|
|
17
|
+
export {
|
|
18
|
+
addNote,
|
|
19
|
+
appendToNote,
|
|
20
|
+
extractRawTail,
|
|
21
|
+
finalizeNote,
|
|
22
|
+
formatNote,
|
|
23
|
+
formatRawAppend,
|
|
24
|
+
getNote,
|
|
25
|
+
listNotes,
|
|
26
|
+
resolveNotePath,
|
|
27
|
+
searchNotes,
|
|
28
|
+
} from "./vault";
|
|
29
|
+
export { withMutationQueue } from "./mutex";
|
|
30
|
+
export { formatDashboard, formatStatusLine, getWorkspaceStatus } from "./workspace";
|
|
31
|
+
export { WorkspaceCache } from "./cache/workspace";
|
|
24
32
|
export {
|
|
25
33
|
buildCurrentGraph,
|
|
26
34
|
readNoteForView,
|
|
@@ -28,12 +36,3 @@ export {
|
|
|
28
36
|
readRepositorySide,
|
|
29
37
|
type ViewNote,
|
|
30
38
|
} from "./graph/current";
|
|
31
|
-
export {
|
|
32
|
-
classifyPath,
|
|
33
|
-
DEFAULT_STALENESS_TTL_MS,
|
|
34
|
-
WorkspaceCache,
|
|
35
|
-
type CacheStats,
|
|
36
|
-
type InvalidationScope,
|
|
37
|
-
type WorkspaceCacheOptions,
|
|
38
|
-
type WorkspaceSnapshot,
|
|
39
|
-
} from "./cache/workspace";
|
package/src/core/paths.ts
CHANGED
|
@@ -14,13 +14,6 @@ import { join } from "node:path";
|
|
|
14
14
|
export const OKF_DIR = ".okf";
|
|
15
15
|
export const OKF_MANIFEST = "okf.json";
|
|
16
16
|
export const NOTES_DIR = "notes";
|
|
17
|
-
/**
|
|
18
|
-
* Vault collection for generated session memory (docs/session-scan.md).
|
|
19
|
-
* A sibling of `notes/` rather than a subdirectory of it: session notes are
|
|
20
|
-
* machine-derived memory, not hand-curated knowledge, so they stay out of
|
|
21
|
-
* the note graph's flat listing — and out of its slug namespace.
|
|
22
|
-
*/
|
|
23
|
-
export const SESSIONS_DIR = "sessions";
|
|
24
17
|
export const REPOSITORY_DIR = "repository";
|
|
25
18
|
export const VAULT_ENV_VAR = "PI_WEAVE_VAULT";
|
|
26
19
|
|
package/src/core/slug.ts
CHANGED
|
@@ -15,6 +15,19 @@ export function slugify(title: string): string {
|
|
|
15
15
|
return slug.length > 0 ? slug : "note";
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Slugify each segment of a relative path while preserving directory separators.
|
|
20
|
+
*/
|
|
21
|
+
export function slugifyPath(path: string): string {
|
|
22
|
+
const parts = path
|
|
23
|
+
.split(/[\/\\]+/)
|
|
24
|
+
.map((s) => s.trim())
|
|
25
|
+
.filter((s) => s.length > 0)
|
|
26
|
+
.map(slugify)
|
|
27
|
+
.filter((s) => s.length > 0);
|
|
28
|
+
return parts.length > 0 ? parts.join("/") : "note";
|
|
29
|
+
}
|
|
30
|
+
|
|
18
31
|
/**
|
|
19
32
|
* Find a free slug in the vault given a desired base, appending -2, -3, ...
|
|
20
33
|
* `exists` is injected so this stays pure and trivially testable.
|