smaran 0.1.0 → 0.1.1
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/index.js +11 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15,7 +15,17 @@ const dbPath = parseDbArg() ?? defaultDbPath();
|
|
|
15
15
|
const db = openDb(dbPath);
|
|
16
16
|
const store = new Store(db);
|
|
17
17
|
const tools = buildTools(store);
|
|
18
|
-
|
|
18
|
+
// Injected into the client's system prompt at initialize (MCP `instructions`).
|
|
19
|
+
// This is how every user gets the read-before-work / write-after-work loop
|
|
20
|
+
// with zero configuration — it travels with the package.
|
|
21
|
+
const INSTRUCTIONS = `smaran is the user's persistent professional memory. It survives across sessions and across AI tools — treat it as the source of truth for the user's projects, decisions, people, and preferences.
|
|
22
|
+
|
|
23
|
+
Read before work: at the start of a task, call prepare_task_brief (or get_project_context / list_projects if unsure what exists) to load relevant context instead of asking the user to re-explain.
|
|
24
|
+
|
|
25
|
+
Write after work: when a task produces a durable outcome, store it with the most specific tool: store_decision for choices made, save_preference for learned preferences, set_next_step / mark_done for tasks, log_event for meeting outcomes and milestones, update_project_state for focus/blockers/open loops. Do not store speculation, drafts, or chain-of-thought. If search_memories misses, retry with synonyms before concluding the memory does not exist.
|
|
26
|
+
|
|
27
|
+
When a stored fact is no longer true, supersede it (supersedes_id) rather than ignoring it. Every write is audited and reversible: if the user asks what was remembered, call list_recent_writes; if they want something undone, call revert_write with that entry's audit_id.`;
|
|
28
|
+
const server = new Server({ name: 'smaran', version: '0.1.1' }, { capabilities: { tools: {} }, instructions: INSTRUCTIONS });
|
|
19
29
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
20
30
|
tools: tools.map(({ name, description, inputSchema }) => ({ name, description, inputSchema })),
|
|
21
31
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smaran",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Smaran (Sanskrit: remembrance) — local-first professional memory for AI agents over MCP. Typed writes, append-only audit log, and an undo button. No Docker, no API keys, no account.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|