granite-mem 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 +124 -207
- package/dist/index.js +4997 -1444
- package/dist/public/app.js +17 -588
- package/dist/public/graph-engine.js +102 -0
- package/dist/public/index.html +117 -126
- package/dist/public/markdown-renderer.js +1 -189
- package/dist/public/style.css +1 -923
- package/dist/templates/founder-os.yml +204 -0
- package/package.json +9 -3
- package/templates/founder-os.yml +204 -0
- package/dist/public/canvas-renderer.js +0 -524
- package/dist/public/graph.js +0 -380
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
vault_name: My Vault
|
|
2
|
+
version: 1
|
|
3
|
+
note_types:
|
|
4
|
+
note:
|
|
5
|
+
folder: notes/notes
|
|
6
|
+
description: Refined, linked notes — one idea per note
|
|
7
|
+
template: |
|
|
8
|
+
## Summary
|
|
9
|
+
|
|
10
|
+
## Details
|
|
11
|
+
|
|
12
|
+
## Links
|
|
13
|
+
line_limit: 200
|
|
14
|
+
warn_only: false
|
|
15
|
+
instructions: >-
|
|
16
|
+
One atomic idea per note. Write a clear summary, then expand in details.
|
|
17
|
+
Link to related notes with [[wikilinks]]. If the note grows too long, split it.
|
|
18
|
+
frontmatter_defaults:
|
|
19
|
+
durability: canonical
|
|
20
|
+
|
|
21
|
+
source:
|
|
22
|
+
folder: notes/sources
|
|
23
|
+
description: Imported or observed source material kept close to the original
|
|
24
|
+
template: |
|
|
25
|
+
## Summary
|
|
26
|
+
|
|
27
|
+
## Key Facts
|
|
28
|
+
|
|
29
|
+
-
|
|
30
|
+
|
|
31
|
+
## Raw Content
|
|
32
|
+
|
|
33
|
+
## Links
|
|
34
|
+
line_limit: 400
|
|
35
|
+
warn_only: true
|
|
36
|
+
instructions: >-
|
|
37
|
+
Keep the source close to the original. Capture provenance in frontmatter,
|
|
38
|
+
summarize the essentials, and link to durable notes or syntheses.
|
|
39
|
+
fields:
|
|
40
|
+
document_file: { type: text, description: Attached document filename }
|
|
41
|
+
document_path: { type: text, description: Vault-relative path to the attached document }
|
|
42
|
+
document_mime: { type: text, description: MIME type of the attached document }
|
|
43
|
+
document_sha256: { type: text, description: SHA-256 hash of the attached document }
|
|
44
|
+
document_resource_uri: { type: text, description: Granite MCP resource URI for the attached document }
|
|
45
|
+
on_create:
|
|
46
|
+
- { action: hash_source, field: document_path, target: document_sha256 }
|
|
47
|
+
indexed_fields: [document_sha256]
|
|
48
|
+
frontmatter_defaults:
|
|
49
|
+
durability: canonical
|
|
50
|
+
|
|
51
|
+
synthesis:
|
|
52
|
+
folder: notes/syntheses
|
|
53
|
+
description: Compiled knowledge that connects multiple notes or sources
|
|
54
|
+
template: |
|
|
55
|
+
## Scope
|
|
56
|
+
|
|
57
|
+
## Executive Summary
|
|
58
|
+
|
|
59
|
+
## Main Themes
|
|
60
|
+
|
|
61
|
+
## Open Questions
|
|
62
|
+
|
|
63
|
+
## Links
|
|
64
|
+
line_limit: 300
|
|
65
|
+
warn_only: true
|
|
66
|
+
instructions: >-
|
|
67
|
+
Use syntheses for durable compiled knowledge. Keep the scope explicit,
|
|
68
|
+
summarize clearly, and point back to the notes or sources in derived_from.
|
|
69
|
+
frontmatter_defaults:
|
|
70
|
+
durability: canonical
|
|
71
|
+
|
|
72
|
+
output:
|
|
73
|
+
folder: notes/outputs
|
|
74
|
+
description: Audience-specific outputs such as briefs, reports, or slides
|
|
75
|
+
template: |
|
|
76
|
+
## Goal
|
|
77
|
+
|
|
78
|
+
## Audience
|
|
79
|
+
|
|
80
|
+
## Output
|
|
81
|
+
|
|
82
|
+
## References
|
|
83
|
+
line_limit: 300
|
|
84
|
+
warn_only: true
|
|
85
|
+
instructions: >-
|
|
86
|
+
Outputs are situational deliverables. Keep them readable, point back to the
|
|
87
|
+
durable knowledge they derive from, and make them easy to regenerate or archive.
|
|
88
|
+
frontmatter_defaults:
|
|
89
|
+
durability: ephemeral
|
|
90
|
+
|
|
91
|
+
person:
|
|
92
|
+
folder: notes/people
|
|
93
|
+
description: People you interact with — contacts, colleagues, collaborators
|
|
94
|
+
template: |
|
|
95
|
+
## Context
|
|
96
|
+
|
|
97
|
+
## Connections
|
|
98
|
+
|
|
99
|
+
## History
|
|
100
|
+
line_limit: 200
|
|
101
|
+
warn_only: true
|
|
102
|
+
instructions: >-
|
|
103
|
+
One note per human. Keep the core identity in frontmatter (role, organization, email),
|
|
104
|
+
and context/history in the body. Link conversations, meetings, and decisions back to this note.
|
|
105
|
+
fields:
|
|
106
|
+
role: { type: text, description: Role or title }
|
|
107
|
+
organization: { type: wikilink, target_types: [organization], description: Primary affiliated organization }
|
|
108
|
+
email: { type: text, description: Primary email }
|
|
109
|
+
first_met: { type: date, description: First contact date }
|
|
110
|
+
on_create:
|
|
111
|
+
- { action: resolve_wikilinks, fields: [organization], auto_stub: true }
|
|
112
|
+
indexed_fields: [organization, role, email]
|
|
113
|
+
frontmatter_defaults:
|
|
114
|
+
durability: canonical
|
|
115
|
+
|
|
116
|
+
organization:
|
|
117
|
+
folder: notes/organizations
|
|
118
|
+
description: Companies, teams, or groups — clients, partners, tools, employers
|
|
119
|
+
template: |
|
|
120
|
+
## Identity
|
|
121
|
+
|
|
122
|
+
## Products
|
|
123
|
+
|
|
124
|
+
## Mission
|
|
125
|
+
|
|
126
|
+
## Relationship
|
|
127
|
+
line_limit: 300
|
|
128
|
+
warn_only: true
|
|
129
|
+
instructions: >-
|
|
130
|
+
One note per organization. Track kind (client, prospect, partner, tool, employer) and the
|
|
131
|
+
relationship stage in frontmatter. Link to key people and meetings.
|
|
132
|
+
fields:
|
|
133
|
+
kind: { type: enum, options: [client, prospect, partner, tool, employer, other], description: Type of relationship }
|
|
134
|
+
relationship_stage: { type: enum, options: [active, paused, archived], default: active, description: Current relationship stage }
|
|
135
|
+
website: { type: url, description: Primary website URL }
|
|
136
|
+
indexed_fields: [kind, relationship_stage]
|
|
137
|
+
lifecycle:
|
|
138
|
+
states: [active, paused, archived]
|
|
139
|
+
transitions:
|
|
140
|
+
- { from: active, to: paused, trigger: manual }
|
|
141
|
+
- { from: paused, to: active, trigger: manual }
|
|
142
|
+
- { from: paused, to: archived, trigger: stale_days, days: 180 }
|
|
143
|
+
frontmatter_defaults:
|
|
144
|
+
durability: canonical
|
|
145
|
+
|
|
146
|
+
meeting:
|
|
147
|
+
folder: notes/meetings
|
|
148
|
+
description: Discussions with decisions, blockers, and action items
|
|
149
|
+
template: |
|
|
150
|
+
## Summary
|
|
151
|
+
|
|
152
|
+
## Decisions
|
|
153
|
+
|
|
154
|
+
## Blockers
|
|
155
|
+
|
|
156
|
+
## Action items
|
|
157
|
+
|
|
158
|
+
## Insights
|
|
159
|
+
line_limit: 300
|
|
160
|
+
warn_only: true
|
|
161
|
+
instructions: >-
|
|
162
|
+
One note per meeting. Always record date, attendees, and organization in frontmatter.
|
|
163
|
+
Structure the body with Summary / Decisions / Blockers / Action items / Insights.
|
|
164
|
+
fields:
|
|
165
|
+
date: { type: date, required: true, description: Date of the meeting }
|
|
166
|
+
attendees: { type: list, of: wikilink, target_types: [person], many: true, description: People who attended }
|
|
167
|
+
organization: { type: wikilink, target_types: [organization], description: Associated organization }
|
|
168
|
+
on_create:
|
|
169
|
+
- { action: resolve_wikilinks, fields: [attendees, organization], auto_stub: true }
|
|
170
|
+
- { action: set_default, field: date, value: "${today}" }
|
|
171
|
+
indexed_fields: [date, organization]
|
|
172
|
+
frontmatter_defaults:
|
|
173
|
+
durability: canonical
|
|
174
|
+
|
|
175
|
+
learning:
|
|
176
|
+
folder: notes/learnings
|
|
177
|
+
description: Concepts, techniques, and mental models you have internalized
|
|
178
|
+
template: |
|
|
179
|
+
## Core idea
|
|
180
|
+
|
|
181
|
+
## How it works
|
|
182
|
+
|
|
183
|
+
## When to use
|
|
184
|
+
|
|
185
|
+
## Connections
|
|
186
|
+
line_limit: 250
|
|
187
|
+
warn_only: true
|
|
188
|
+
instructions: >-
|
|
189
|
+
Capture durable ideas that change how you think or act. Always link to the source
|
|
190
|
+
that taught you the idea. Connect to other learnings.
|
|
191
|
+
fields:
|
|
192
|
+
topic: { type: text, description: Umbrella topic or domain }
|
|
193
|
+
source: { type: wikilink, target_types: [source], description: Source note that introduced this idea }
|
|
194
|
+
on_create:
|
|
195
|
+
- { action: resolve_wikilinks, fields: [source] }
|
|
196
|
+
indexed_fields: [topic]
|
|
197
|
+
frontmatter_defaults:
|
|
198
|
+
durability: canonical
|
|
199
|
+
|
|
200
|
+
defaults:
|
|
201
|
+
note_type: note
|
|
202
|
+
editor: $EDITOR
|
|
203
|
+
index:
|
|
204
|
+
auto_rebuild: true
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "granite-mem",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "A local-first markdown memory system for humans and agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"granite": "./dist/index.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
-
"dist"
|
|
10
|
+
"dist",
|
|
11
|
+
"templates"
|
|
11
12
|
],
|
|
12
13
|
"keywords": [
|
|
13
14
|
"memory",
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
"url": "https://github.com/The-Vibe-Company/Granite"
|
|
25
26
|
},
|
|
26
27
|
"scripts": {
|
|
27
|
-
"build": "tsup && rm -rf dist/
|
|
28
|
+
"build": "tsup && node scripts/build-web.mjs && rm -rf dist/templates && cp -r templates dist/templates",
|
|
28
29
|
"dev": "tsx src/index.ts",
|
|
29
30
|
"test": "vitest run",
|
|
30
31
|
"test:coverage": "vitest run --coverage",
|
|
@@ -33,14 +34,19 @@
|
|
|
33
34
|
"prepare": "husky"
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
37
|
+
"@chenglou/pretext": "^0.0.4",
|
|
36
38
|
"@hono/node-server": "^1.13.0",
|
|
37
39
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
38
40
|
"better-sqlite3": "^11.0.0",
|
|
39
41
|
"commander": "^13.0.0",
|
|
42
|
+
"fast-xml-parser": "^5.5.11",
|
|
43
|
+
"fflate": "^0.8.2",
|
|
40
44
|
"gray-matter": "^4.0.3",
|
|
41
45
|
"hono": "^4.0.0",
|
|
42
46
|
"js-yaml": "^4.1.0",
|
|
47
|
+
"mammoth": "^1.12.0",
|
|
43
48
|
"uuid": "^11.0.0",
|
|
49
|
+
"xlsx": "^0.18.5",
|
|
44
50
|
"zod": "^3.25.76"
|
|
45
51
|
},
|
|
46
52
|
"devDependencies": {
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
vault_name: My Vault
|
|
2
|
+
version: 1
|
|
3
|
+
note_types:
|
|
4
|
+
note:
|
|
5
|
+
folder: notes/notes
|
|
6
|
+
description: Refined, linked notes — one idea per note
|
|
7
|
+
template: |
|
|
8
|
+
## Summary
|
|
9
|
+
|
|
10
|
+
## Details
|
|
11
|
+
|
|
12
|
+
## Links
|
|
13
|
+
line_limit: 200
|
|
14
|
+
warn_only: false
|
|
15
|
+
instructions: >-
|
|
16
|
+
One atomic idea per note. Write a clear summary, then expand in details.
|
|
17
|
+
Link to related notes with [[wikilinks]]. If the note grows too long, split it.
|
|
18
|
+
frontmatter_defaults:
|
|
19
|
+
durability: canonical
|
|
20
|
+
|
|
21
|
+
source:
|
|
22
|
+
folder: notes/sources
|
|
23
|
+
description: Imported or observed source material kept close to the original
|
|
24
|
+
template: |
|
|
25
|
+
## Summary
|
|
26
|
+
|
|
27
|
+
## Key Facts
|
|
28
|
+
|
|
29
|
+
-
|
|
30
|
+
|
|
31
|
+
## Raw Content
|
|
32
|
+
|
|
33
|
+
## Links
|
|
34
|
+
line_limit: 400
|
|
35
|
+
warn_only: true
|
|
36
|
+
instructions: >-
|
|
37
|
+
Keep the source close to the original. Capture provenance in frontmatter,
|
|
38
|
+
summarize the essentials, and link to durable notes or syntheses.
|
|
39
|
+
fields:
|
|
40
|
+
document_file: { type: text, description: Attached document filename }
|
|
41
|
+
document_path: { type: text, description: Vault-relative path to the attached document }
|
|
42
|
+
document_mime: { type: text, description: MIME type of the attached document }
|
|
43
|
+
document_sha256: { type: text, description: SHA-256 hash of the attached document }
|
|
44
|
+
document_resource_uri: { type: text, description: Granite MCP resource URI for the attached document }
|
|
45
|
+
on_create:
|
|
46
|
+
- { action: hash_source, field: document_path, target: document_sha256 }
|
|
47
|
+
indexed_fields: [document_sha256]
|
|
48
|
+
frontmatter_defaults:
|
|
49
|
+
durability: canonical
|
|
50
|
+
|
|
51
|
+
synthesis:
|
|
52
|
+
folder: notes/syntheses
|
|
53
|
+
description: Compiled knowledge that connects multiple notes or sources
|
|
54
|
+
template: |
|
|
55
|
+
## Scope
|
|
56
|
+
|
|
57
|
+
## Executive Summary
|
|
58
|
+
|
|
59
|
+
## Main Themes
|
|
60
|
+
|
|
61
|
+
## Open Questions
|
|
62
|
+
|
|
63
|
+
## Links
|
|
64
|
+
line_limit: 300
|
|
65
|
+
warn_only: true
|
|
66
|
+
instructions: >-
|
|
67
|
+
Use syntheses for durable compiled knowledge. Keep the scope explicit,
|
|
68
|
+
summarize clearly, and point back to the notes or sources in derived_from.
|
|
69
|
+
frontmatter_defaults:
|
|
70
|
+
durability: canonical
|
|
71
|
+
|
|
72
|
+
output:
|
|
73
|
+
folder: notes/outputs
|
|
74
|
+
description: Audience-specific outputs such as briefs, reports, or slides
|
|
75
|
+
template: |
|
|
76
|
+
## Goal
|
|
77
|
+
|
|
78
|
+
## Audience
|
|
79
|
+
|
|
80
|
+
## Output
|
|
81
|
+
|
|
82
|
+
## References
|
|
83
|
+
line_limit: 300
|
|
84
|
+
warn_only: true
|
|
85
|
+
instructions: >-
|
|
86
|
+
Outputs are situational deliverables. Keep them readable, point back to the
|
|
87
|
+
durable knowledge they derive from, and make them easy to regenerate or archive.
|
|
88
|
+
frontmatter_defaults:
|
|
89
|
+
durability: ephemeral
|
|
90
|
+
|
|
91
|
+
person:
|
|
92
|
+
folder: notes/people
|
|
93
|
+
description: People you interact with — contacts, colleagues, collaborators
|
|
94
|
+
template: |
|
|
95
|
+
## Context
|
|
96
|
+
|
|
97
|
+
## Connections
|
|
98
|
+
|
|
99
|
+
## History
|
|
100
|
+
line_limit: 200
|
|
101
|
+
warn_only: true
|
|
102
|
+
instructions: >-
|
|
103
|
+
One note per human. Keep the core identity in frontmatter (role, organization, email),
|
|
104
|
+
and context/history in the body. Link conversations, meetings, and decisions back to this note.
|
|
105
|
+
fields:
|
|
106
|
+
role: { type: text, description: Role or title }
|
|
107
|
+
organization: { type: wikilink, target_types: [organization], description: Primary affiliated organization }
|
|
108
|
+
email: { type: text, description: Primary email }
|
|
109
|
+
first_met: { type: date, description: First contact date }
|
|
110
|
+
on_create:
|
|
111
|
+
- { action: resolve_wikilinks, fields: [organization], auto_stub: true }
|
|
112
|
+
indexed_fields: [organization, role, email]
|
|
113
|
+
frontmatter_defaults:
|
|
114
|
+
durability: canonical
|
|
115
|
+
|
|
116
|
+
organization:
|
|
117
|
+
folder: notes/organizations
|
|
118
|
+
description: Companies, teams, or groups — clients, partners, tools, employers
|
|
119
|
+
template: |
|
|
120
|
+
## Identity
|
|
121
|
+
|
|
122
|
+
## Products
|
|
123
|
+
|
|
124
|
+
## Mission
|
|
125
|
+
|
|
126
|
+
## Relationship
|
|
127
|
+
line_limit: 300
|
|
128
|
+
warn_only: true
|
|
129
|
+
instructions: >-
|
|
130
|
+
One note per organization. Track kind (client, prospect, partner, tool, employer) and the
|
|
131
|
+
relationship stage in frontmatter. Link to key people and meetings.
|
|
132
|
+
fields:
|
|
133
|
+
kind: { type: enum, options: [client, prospect, partner, tool, employer, other], description: Type of relationship }
|
|
134
|
+
relationship_stage: { type: enum, options: [active, paused, archived], default: active, description: Current relationship stage }
|
|
135
|
+
website: { type: url, description: Primary website URL }
|
|
136
|
+
indexed_fields: [kind, relationship_stage]
|
|
137
|
+
lifecycle:
|
|
138
|
+
states: [active, paused, archived]
|
|
139
|
+
transitions:
|
|
140
|
+
- { from: active, to: paused, trigger: manual }
|
|
141
|
+
- { from: paused, to: active, trigger: manual }
|
|
142
|
+
- { from: paused, to: archived, trigger: stale_days, days: 180 }
|
|
143
|
+
frontmatter_defaults:
|
|
144
|
+
durability: canonical
|
|
145
|
+
|
|
146
|
+
meeting:
|
|
147
|
+
folder: notes/meetings
|
|
148
|
+
description: Discussions with decisions, blockers, and action items
|
|
149
|
+
template: |
|
|
150
|
+
## Summary
|
|
151
|
+
|
|
152
|
+
## Decisions
|
|
153
|
+
|
|
154
|
+
## Blockers
|
|
155
|
+
|
|
156
|
+
## Action items
|
|
157
|
+
|
|
158
|
+
## Insights
|
|
159
|
+
line_limit: 300
|
|
160
|
+
warn_only: true
|
|
161
|
+
instructions: >-
|
|
162
|
+
One note per meeting. Always record date, attendees, and organization in frontmatter.
|
|
163
|
+
Structure the body with Summary / Decisions / Blockers / Action items / Insights.
|
|
164
|
+
fields:
|
|
165
|
+
date: { type: date, required: true, description: Date of the meeting }
|
|
166
|
+
attendees: { type: list, of: wikilink, target_types: [person], many: true, description: People who attended }
|
|
167
|
+
organization: { type: wikilink, target_types: [organization], description: Associated organization }
|
|
168
|
+
on_create:
|
|
169
|
+
- { action: resolve_wikilinks, fields: [attendees, organization], auto_stub: true }
|
|
170
|
+
- { action: set_default, field: date, value: "${today}" }
|
|
171
|
+
indexed_fields: [date, organization]
|
|
172
|
+
frontmatter_defaults:
|
|
173
|
+
durability: canonical
|
|
174
|
+
|
|
175
|
+
learning:
|
|
176
|
+
folder: notes/learnings
|
|
177
|
+
description: Concepts, techniques, and mental models you have internalized
|
|
178
|
+
template: |
|
|
179
|
+
## Core idea
|
|
180
|
+
|
|
181
|
+
## How it works
|
|
182
|
+
|
|
183
|
+
## When to use
|
|
184
|
+
|
|
185
|
+
## Connections
|
|
186
|
+
line_limit: 250
|
|
187
|
+
warn_only: true
|
|
188
|
+
instructions: >-
|
|
189
|
+
Capture durable ideas that change how you think or act. Always link to the source
|
|
190
|
+
that taught you the idea. Connect to other learnings.
|
|
191
|
+
fields:
|
|
192
|
+
topic: { type: text, description: Umbrella topic or domain }
|
|
193
|
+
source: { type: wikilink, target_types: [source], description: Source note that introduced this idea }
|
|
194
|
+
on_create:
|
|
195
|
+
- { action: resolve_wikilinks, fields: [source] }
|
|
196
|
+
indexed_fields: [topic]
|
|
197
|
+
frontmatter_defaults:
|
|
198
|
+
durability: canonical
|
|
199
|
+
|
|
200
|
+
defaults:
|
|
201
|
+
note_type: note
|
|
202
|
+
editor: $EDITOR
|
|
203
|
+
index:
|
|
204
|
+
auto_rebuild: true
|