@kynver-app/mcp-agent-os 0.1.0 → 0.2.0

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.
Files changed (2) hide show
  1. package/dist/server.js +55 -3
  2. package/package.json +5 -2
package/dist/server.js CHANGED
@@ -38,7 +38,7 @@ export function createAgentOsServer() {
38
38
  const defaultAgentOsSlug = () => process.env.KYNVER_AGENT_OS_SLUG?.trim() || "ghost";
39
39
  const osSlug = (s) => (s && s.trim()) || defaultAgentOsSlug();
40
40
  register("agent_os_get_context", "Get the agent's full Agentic-OS state in one call: identity, open goals, active projects with current focus/next-actions/blockers, recent sessions, contacts, and long-term memory stats. Use at session start instead of reading SOUL.md / USER.md / MEMORY.md.", { slug: z.string().optional().describe("AgentOS slug. Defaults to KYNVER_AGENT_OS_SLUG, then 'ghost'.") }, async (args) => jsonResult(await get(`/agent-os/${osSlug(args.slug)}/stats`)));
41
- register("agent_os_open_session", "Mark the start of a session. Returns the session id pass it to agent_os_close_session at the end.", {
41
+ register("agent_os_open_session", "Call this at the START of every session. Records channel, model, and opens a session record for continuity. Ghost calls this immediately after agent_os_get_context on startup.", {
42
42
  channel: z.string().describe("Runtime channel: 'webchat' | 'telegram' | 'discord' | …"),
43
43
  model: z.string().optional().describe("Model used for the session (default 'claude-sonnet-4-6')."),
44
44
  slug: z.string().optional().describe("AgentOS slug. Defaults to KYNVER_AGENT_OS_SLUG, then 'ghost'."),
@@ -46,7 +46,7 @@ export function createAgentOsServer() {
46
46
  const { slug, ...body } = args;
47
47
  return jsonResult(await post(`/agent-os/${osSlug(slug)}/sessions`, body));
48
48
  });
49
- register("agent_os_close_session", "Close a session with an end-of-session summary (2-3 sentences), the topics worked on, and optional decisions log / touched goal & project ids. The summary is ingested into long-term memory.", {
49
+ register("agent_os_close_session", "Call this at the END of every session with a summary of what was accomplished and key decisions made. This is how Ghost maintains cross-session continuity without it, the next session has no record of what happened.", {
50
50
  sessionId: z.string(),
51
51
  summary: z.string(),
52
52
  topicsWorked: z.array(z.string()).optional(),
@@ -142,7 +142,7 @@ export function createAgentOsServer() {
142
142
  const { projectId, slug, ...body } = args;
143
143
  return jsonResult(await patch(`/agent-os/${osSlug(slug)}/projects/${projectId}`, body));
144
144
  });
145
- register("agent_os_search_memory", "Semantic + keyword hybrid search over the agent's long-term MARM memory (ownerType=agent). Use to recall specific decisions, project details, or lessons without loading full context. Replaces grep/reading MEMORY.md.", {
145
+ register("agent_os_search_memory", "Semantic + keyword hybrid search over the agent's long-term MARM memory (ownerType=agent). Use to recall specific decisions, project details, or lessons without loading full context. Replaces grep/reading MEMORY.md. Results include rrfScore — a Reciprocal Rank Fusion score where ~0.033 is a near-perfect match. Higher is better; do not treat low numbers as poor results.", {
146
146
  query: z.string().describe("Natural language query to search memory."),
147
147
  k: z.number().optional().describe("Number of results (default 10, max 50)."),
148
148
  slug: z.string().optional(),
@@ -181,5 +181,57 @@ export function createAgentOsServer() {
181
181
  });
182
182
  register("agent_os_get_contacts", "Get all people the agent knows: their relationship, context, preferences, and notes. Replaces reading USER.md and contact sections of MEMORY.md.", { slug: z.string().optional() }, async (args) => jsonResult(await get(`/agent-os/${osSlug(args.slug)}/contacts`)));
183
183
  register("agent_os_consolidate_memory", "Trigger a memory consolidation pass: LLM reviews recent daily logs and distils key decisions, lessons, and facts into long-term MARM memory. Use during heartbeat maintenance instead of manually rewriting MEMORY.md. Rate-limited to 2 runs per agent per day.", { slug: z.string().optional() }, async (args) => jsonResult(await post(`/agent-os/${osSlug(args.slug)}/consolidate`, {})));
184
+ register("agent_os_create_project", "Create a new project in the agent OS. Use this to add a newly started project to tracking. Returns the created project with its DB id.", {
185
+ name: z.string().describe("Project name (required)."),
186
+ description: z.string().optional(),
187
+ status: z.enum(["active", "on_hold", "shipped", "archived"]).optional().default("active"),
188
+ currentFocus: z.string().optional().describe("What is being worked on right now."),
189
+ nextActions: z.array(z.string()).optional().describe("Ordered list of next steps."),
190
+ blockers: z.array(z.string()).optional(),
191
+ repoUrl: z.string().optional(),
192
+ deployUrl: z.string().optional(),
193
+ slug: z.string().optional(),
194
+ }, async (args) => {
195
+ const { slug, ...body } = args;
196
+ return jsonResult(await post(`/agent-os/${osSlug(slug)}/projects`, body));
197
+ });
198
+ register("agent_os_create_contact", "Add a new contact (or upsert by name) to the agent OS. Use when you meet someone new or want to record info about a person.", {
199
+ name: z.string().describe("Contact name (required)."),
200
+ relationship: z.string().optional().describe("e.g. owner, collaborator, client, stakeholder"),
201
+ context: z.string().optional().describe("Background on who they are and what they do."),
202
+ preferences: z.record(z.string(), z.unknown()).optional().describe("Communication preferences, timezone, style notes, etc."),
203
+ notes: z.string().optional(),
204
+ slug: z.string().optional(),
205
+ }, async (args) => {
206
+ const { slug, ...body } = args;
207
+ return jsonResult(await post(`/agent-os/${osSlug(slug)}/contacts`, body));
208
+ });
209
+ register("agent_os_update_contact", "Update an existing contact by their DB id. Use agent_os_get_contacts to get the id first.", {
210
+ contactId: z.string().describe("DB id of the contact to update (from agent_os_get_contacts)."),
211
+ name: z.string().optional(),
212
+ relationship: z.string().optional(),
213
+ context: z.string().optional(),
214
+ preferences: z.record(z.string(), z.unknown()).optional(),
215
+ notes: z.string().optional(),
216
+ slug: z.string().optional(),
217
+ }, async (args) => {
218
+ const { contactId, slug, ...body } = args;
219
+ return jsonResult(await patch(`/agent-os/${osSlug(slug)}/contacts/${contactId}`, body));
220
+ });
221
+ register("agent_os_update_memory", "Update an existing memory entry by its key/slug. Use to correct or replace a previously written memory. The key must match the slug used when the memory was written — if key was omitted on write, the auto-generated slug (note-<timestamp>) is returned in the write response.", {
222
+ key: z.string().describe("The slug/key of the memory to update (from the original agent_os_write_memory call)."),
223
+ content: z.string().describe("New content to replace the existing memory with."),
224
+ sourceId: z.string().optional().describe("Override the sourceId tag if needed."),
225
+ metadata: z.record(z.string(), z.unknown()).optional(),
226
+ slug: z.string().optional().describe("AgentOS slug. Defaults to KYNVER_AGENT_OS_SLUG, then ghost."),
227
+ }, async (args) => {
228
+ const { key, slug, content, sourceId, metadata } = args;
229
+ const body = { content, slug: key };
230
+ if (sourceId)
231
+ body.sourceId = sourceId;
232
+ if (metadata)
233
+ body.metadata = metadata;
234
+ return jsonResult(await post(`/agent-os/${osSlug(slug)}/memory`, body));
235
+ });
184
236
  return server;
185
237
  }
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "@kynver-app/mcp-agent-os",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Kynver Agentic OS MCP server — slug-keyed agent identity, goals, projects, sessions, and long-term memory",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "kynver-mcp-agent-os": "dist/index.js"
8
8
  },
9
- "files": ["dist", "README.md"],
9
+ "files": [
10
+ "dist",
11
+ "README.md"
12
+ ],
10
13
  "scripts": {
11
14
  "build": "node --max-old-space-size=8192 ../../node_modules/typescript/bin/tsc",
12
15
  "dev": "node --max-old-space-size=8192 ../../node_modules/typescript/bin/tsc --watch",