@kynver-app/mcp-agent-os 0.2.1 → 0.2.2

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 CHANGED
@@ -30,6 +30,10 @@ Schemas are mirrored in `lib/mcp/tool-manifests/kynver-mcp-agent-os.json` in
30
30
  the Kynver repo (used as the static fallback when stdio spawn isn't available
31
31
  — e.g. on Vercel).
32
32
 
33
+ Memory write/update tools accept `sourceRefs` for structured provenance. Use it
34
+ to attach repo paths, commits, PRs, map files, sessions, tools, or URLs to
35
+ important memories instead of burying those pointers in freeform text.
36
+
33
37
  ## Env
34
38
 
35
39
  | Var | Purpose |
package/dist/server.js CHANGED
@@ -17,7 +17,7 @@ function jsonResult(data) {
17
17
  }
18
18
  const MCP_LEGACY_SLUG_FALLBACK = "ghost";
19
19
  export function createAgentOsServer() {
20
- const server = new McpServer({ name: "kynver-mcp-agent-os", version: "0.2.1" }, { capabilities: { tools: {} } });
20
+ const server = new McpServer({ name: "kynver-mcp-agent-os", version: "0.2.2" }, { capabilities: { tools: {} } });
21
21
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
22
22
  function register(name, description, inputSchema, cb) {
23
23
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -55,6 +55,23 @@ export function createAgentOsServer() {
55
55
  return MCP_LEGACY_SLUG_FALLBACK;
56
56
  }
57
57
  const slugField = z.string().optional().describe("AgentOS slug within your account. Omit to use env or server-discovered primary (GET /api/agent-os). Legacy: `ghost`.");
58
+ const sourceRefSchema = z
59
+ .object({
60
+ type: z
61
+ .enum(["repo", "commit", "branch", "pr", "map", "session", "tool", "url", "manual", "unknown"])
62
+ .describe("What kind of source backs this memory."),
63
+ label: z.string().optional(),
64
+ repo: z.string().optional(),
65
+ path: z.string().optional(),
66
+ commit: z.string().optional(),
67
+ branch: z.string().optional(),
68
+ pr: z.union([z.number(), z.string()]).optional(),
69
+ url: z.string().optional(),
70
+ sessionId: z.string().optional(),
71
+ toolName: z.string().optional(),
72
+ note: z.string().optional(),
73
+ })
74
+ .passthrough();
58
75
  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: slugField }, async (args) => {
59
76
  const s = await resolveToolSlug(args.slug);
60
77
  return jsonResult(await get(`/agent-os/${s}/stats`));
@@ -190,6 +207,7 @@ export function createAgentOsServer() {
190
207
  .describe("Memory category. Mapped to sourceId: long_term/contact/tool_config -> 'agent:long-term', project -> 'agent:project'. Ignored if sourceId is set."),
191
208
  sourceId: z.string().optional().describe("Advanced: override the sourceId tag directly. If set, category is ignored."),
192
209
  metadata: z.record(z.string(), z.unknown()).optional(),
210
+ sourceRefs: z.array(sourceRefSchema).optional().describe("Structured provenance references for this memory, such as repo/path/commit/PR/map/session."),
193
211
  slug: slugField,
194
212
  }, async (args) => {
195
213
  const categoryToSourceId = {
@@ -206,6 +224,8 @@ export function createAgentOsServer() {
206
224
  body.sourceId = sourceId;
207
225
  if (args.metadata)
208
226
  body.metadata = args.metadata;
227
+ if (args.sourceRefs)
228
+ body.sourceRefs = args.sourceRefs;
209
229
  const s = await resolveToolSlug(args.slug);
210
230
  return jsonResult(await post(`/agent-os/${s}/memory`, body));
211
231
  });
@@ -262,14 +282,17 @@ export function createAgentOsServer() {
262
282
  content: z.string().describe("New content to replace the existing memory with."),
263
283
  sourceId: z.string().optional().describe("Override the sourceId tag if needed."),
264
284
  metadata: z.record(z.string(), z.unknown()).optional(),
285
+ sourceRefs: z.array(sourceRefSchema).optional().describe("Structured provenance references for this replacement memory."),
265
286
  slug: slugField,
266
287
  }, async (args) => {
267
- const { key, slug, content, sourceId, metadata } = args;
288
+ const { key, slug, content, sourceId, metadata, sourceRefs } = args;
268
289
  const body = { content, slug: key };
269
290
  if (sourceId)
270
291
  body.sourceId = sourceId;
271
292
  if (metadata)
272
293
  body.metadata = metadata;
294
+ if (sourceRefs)
295
+ body.sourceRefs = sourceRefs;
273
296
  const s = await resolveToolSlug(slug);
274
297
  return jsonResult(await post(`/agent-os/${s}/memory`, body));
275
298
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kynver-app/mcp-agent-os",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
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": {