@kynver-app/mcp-agent-os 0.3.5 → 0.3.6

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
@@ -63,6 +63,12 @@ state to important memories instead of burying those pointers in freeform text.
63
63
  Set `reviewStatus: "needs_review"` for important or uncertain memories that a
64
64
  human should be able to find and correct in the dashboard.
65
65
 
66
+ Active-state and correction tools expose the "what is true right now" layer:
67
+ `agent_os_record_state` / `agent_os_get_state` manage one current
68
+ `active_state` row per live PR, branch, or deployment, while
69
+ `agent_os_correct_memory` writes an auditable correction that supersedes stale
70
+ or wrong remembered claims instead of silently editing history.
71
+
66
72
  Skill tools expose the AgentOS skill registry and skill-tagged memory contract.
67
73
  Use `agent_os_get_skill` to fetch instructions on demand, `agent_os_create_skill`
68
74
  /`agent_os_update_skill` to manage user-authored skills, `agent_os_import_skills`
package/dist/server.js CHANGED
@@ -82,7 +82,7 @@ export function createAgentOsServer() {
82
82
  })
83
83
  .passthrough();
84
84
  const memoryTypeSchema = z
85
- .enum(["decision", "lesson", "fact", "preference", "project_update", "runbook", "source_map", "correction", "note"])
85
+ .enum(["decision", "lesson", "fact", "preference", "project_update", "runbook", "source_map", "correction", "active_state", "note"])
86
86
  .describe("What kind of durable memory this is. Use note only when a more specific type does not fit.");
87
87
  const confidenceSchema = z
88
88
  .enum(["low", "medium", "high"])
@@ -90,6 +90,9 @@ export function createAgentOsServer() {
90
90
  const reviewStatusSchema = z
91
91
  .enum(["none", "needs_review", "reviewed", "stale", "rejected"])
92
92
  .describe("Set needs_review for important, uncertain, stale-looking, or user-correctable memories.");
93
+ const activeStateEntityTypeSchema = z
94
+ .enum(["pr_watch", "branch", "deployment"])
95
+ .describe("Tracked entity kind. pr_watch: a live PR. branch: local-vs-remote branch state. deployment: a live release.");
93
96
  const skillCategorySchema = z.enum(["engineering", "productivity", "agent_ops", "domain", "personal", "misc"]);
94
97
  const skillStatusSchema = z.enum(["draft", "active", "deprecated", "archived"]);
95
98
  const skillDraftSchema = z.object({
@@ -244,14 +247,31 @@ export function createAgentOsServer() {
244
247
  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.", {
245
248
  query: z.string().describe("Natural language query to search memory."),
246
249
  k: z.number().optional().describe("Number of results (default 10, max 50)."),
250
+ ticker: z.string().optional().describe("Trading desk: filter hits to this ticker symbol."),
251
+ debatePersona: z.enum(["bull", "bear"]).optional().describe("Trading desk: filter to bull or bear advocate memories."),
247
252
  slug: slugField,
248
253
  }, async (args) => {
249
254
  const params = new URLSearchParams({ q: args.query });
250
255
  if (args.k)
251
256
  params.set("k", String(args.k));
257
+ if (args.ticker)
258
+ params.set("ticker", args.ticker);
259
+ if (args.debatePersona)
260
+ params.set("debatePersona", args.debatePersona);
252
261
  const s = await resolveToolSlug(args.slug);
253
262
  return jsonResult(await get(`/agent-os/${s}/memory?${params}`));
254
263
  });
264
+ register("agent_os_get_desk_debate_context", "Fetch trading-desk debate context for a ticker: latest canonical DeskAnalysisReport debate fields plus bull/bear MARM snippets scoped by ticker and debatePersona.", {
265
+ ticker: z.string().describe("Equity ticker symbol, e.g. NVDA."),
266
+ reportId: z.string().optional().describe("Optional DeskAnalysisReport id; defaults to latest canonical report for the ticker."),
267
+ slug: slugField,
268
+ }, async (args) => {
269
+ const params = new URLSearchParams({ ticker: args.ticker });
270
+ if (args.reportId)
271
+ params.set("reportId", args.reportId);
272
+ const s = await resolveToolSlug(args.slug);
273
+ return jsonResult(await get(`/agent-os/${s}/desk-debate-context?${params}`));
274
+ });
255
275
  register("agent_os_list_skills", "List AgentOS skills available to this workspace, including Kynver built-ins, user-authored skills, and per-AgentOS binding state. Pass view=\"manifest\" for the runtime read path: only enabled, runtime-eligible skills (enabled binding plus, for user skills, status=active) with metadata only — no instructions. Skill instructions are fetched on demand with agent_os_get_skill; do not inject every skill into every model context.", {
256
276
  view: z
257
277
  .enum(["full", "manifest"])
@@ -504,6 +524,66 @@ export function createAgentOsServer() {
504
524
  const s = await resolveToolSlug(slug);
505
525
  return jsonResult(await post(`/agent-os/${s}/memory`, body));
506
526
  });
527
+ register("agent_os_correct_memory", "Write an auditable correction memory that supersedes a stale or wrong memory by slug. Use when fixing an incorrect remembered claim rather than silently editing history.", {
528
+ targetSlug: z.string().describe("Slug/key of the memory being corrected."),
529
+ content: z.string().describe("Correct replacement content to remember."),
530
+ reason: z.string().describe("Why the target is wrong; recorded on the superseded target."),
531
+ key: z.string().optional().describe("Slug for the new correction memory. Defaults to <targetSlug>-correction."),
532
+ alsoInvalidates: z.array(z.string()).optional().describe("Additional memory slugs/ids to supersede alongside targetSlug."),
533
+ assertedBySessionId: z.string().optional(),
534
+ sourceId: z.string().optional(),
535
+ sourceRefs: z.array(sourceRefSchema).optional(),
536
+ memoryType: memoryTypeSchema.optional(),
537
+ confidence: confidenceSchema.optional(),
538
+ reviewStatus: reviewStatusSchema.optional(),
539
+ projectId: z.string().optional(),
540
+ goalId: z.string().optional(),
541
+ contactId: z.string().optional(),
542
+ skillId: z.string().optional(),
543
+ slug: slugField,
544
+ }, async (args) => {
545
+ const { slug, ...body } = args;
546
+ const s = await resolveToolSlug(slug);
547
+ return jsonResult(await post("/agent-os/" + s + "/memory/correct", body));
548
+ });
549
+ register("agent_os_record_state", "Record current active state for a live mutable entity such as a PR, branch, or deployment. Server derives the canonical entityKey from fields and upserts one active_state row per entity.", {
550
+ entityType: activeStateEntityTypeSchema,
551
+ fields: z.record(z.string(), z.unknown()).describe("Entity-specific current truth. pr_watch requires repo, pr, author, headOwner, headBranch, state. branch requires repo, branch, aheadBy, behindBy, lastCommit. deployment requires target, env, state, url, and version or sha."),
552
+ observedAt: z.string().optional().describe("ISO timestamp the state was observed. Defaults to now."),
553
+ content: z.string().optional().describe("Optional human summary; one is generated otherwise."),
554
+ sourceRefs: z.array(sourceRefSchema).optional(),
555
+ projectId: z.string().optional(),
556
+ confidence: confidenceSchema.optional(),
557
+ reviewStatus: reviewStatusSchema.optional(),
558
+ sourceId: z.string().optional(),
559
+ metadata: z.record(z.string(), z.unknown()).optional(),
560
+ slug: slugField,
561
+ }, async (args) => {
562
+ const { slug, ...body } = args;
563
+ const s = await resolveToolSlug(slug);
564
+ return jsonResult(await post("/agent-os/" + s + "/memory/state", body));
565
+ });
566
+ register("agent_os_get_state", "Get current active state records. Pass entityKey for one record, or entityType/projectId/limit to list active PR, branch, or deployment state.", {
567
+ entityKey: z.string().optional().describe("Canonical key of a single record, e.g. pr:openclaw/openclaw#83529. Omit to list records."),
568
+ entityType: activeStateEntityTypeSchema.optional(),
569
+ projectId: z.string().optional(),
570
+ limit: z.number().optional(),
571
+ slug: slugField,
572
+ }, async (args) => {
573
+ const { slug, entityKey, entityType, projectId, limit } = args;
574
+ const s = await resolveToolSlug(slug);
575
+ const qs = new URLSearchParams();
576
+ if (entityKey)
577
+ qs.set("entityKey", entityKey);
578
+ if (entityType)
579
+ qs.set("entityType", entityType);
580
+ if (projectId)
581
+ qs.set("projectId", projectId);
582
+ if (limit !== undefined)
583
+ qs.set("limit", String(limit));
584
+ const suffix = qs.toString() ? "?" + qs.toString() : "";
585
+ return jsonResult(await get("/agent-os/" + s + "/memory/state" + suffix));
586
+ });
507
587
  // AgentTask board — batch 1 (CRUD) + batch 1.5 (steering / lease) tools.
508
588
  registerTaskTools({ register, resolveToolSlug, jsonResult, compact });
509
589
  return server;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kynver-app/mcp-agent-os",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
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": {