@kynver-app/mcp-agent-os 0.3.7 → 0.3.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/dist/server.js CHANGED
@@ -10,6 +10,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
10
10
  import { z } from "zod";
11
11
  import { get, post, patch } from "./lib/kynver-client.js";
12
12
  import { registerPlanTools } from "./tools/plans.js";
13
+ import { registerPlanProgressTools } from "./tools/plan-progress.js";
13
14
  import { registerTaskTools } from "./tools/tasks.js";
14
15
  import { registerActionRequiredTools } from "./tools/action-required.js";
15
16
  function jsonResult(data) {
@@ -610,6 +611,7 @@ export function createAgentOsServer() {
610
611
  registerTaskTools({ register, resolveToolSlug, jsonResult, compact });
611
612
  // First-class AgentOS plans (Phase 5A): versioned operational artifacts.
612
613
  registerPlanTools({ register, resolveToolSlug, jsonResult, compact });
614
+ registerPlanProgressTools({ register, resolveToolSlug, jsonResult, compact });
613
615
  // Action Required inbox: agent_os_ask_human + agent_os_await_action (slice 1).
614
616
  registerActionRequiredTools({ register, jsonResult, compact });
615
617
  return server;
@@ -0,0 +1,2 @@
1
+ import type { PlanToolDeps } from "./plans.js";
2
+ export declare function registerPlanProgressTools({ register, resolveToolSlug, jsonResult, compact, }: PlanToolDeps): void;
@@ -0,0 +1,113 @@
1
+ import { z } from "zod";
2
+ import { get, post } from "../lib/kynver-client.js";
3
+ const progressStatus = z.enum(["todo", "running", "partial", "blocked", "done"]);
4
+ const roleLane = z.enum([
5
+ "plan_author",
6
+ "plan_reviewer",
7
+ "implementer",
8
+ "report_reviewer",
9
+ "deep_reviewer",
10
+ "repair_implementer",
11
+ "runtime_verifier",
12
+ "user",
13
+ "system",
14
+ ]);
15
+ const evidenceSchema = z.object({
16
+ type: z.enum(["path", "pr", "commit", "command", "url", "note"]),
17
+ value: z.string(),
18
+ exitCode: z.number().optional(),
19
+ stdoutTail: z.string().optional(),
20
+ });
21
+ const rowUpsertSchema = z.object({
22
+ rowKey: z.string(),
23
+ title: z.string(),
24
+ description: z.string().optional(),
25
+ ordinal: z.number(),
26
+ stageId: z.string().optional(),
27
+ ownerLane: roleLane.optional(),
28
+ taskId: z.string().optional(),
29
+ });
30
+ export function registerPlanProgressTools({ register, resolveToolSlug, jsonResult, compact, }) {
31
+ const slugField = z
32
+ .string()
33
+ .optional()
34
+ .describe("AgentOS workspace slug. Omit to use env or the server-discovered primary.");
35
+ register("agent_os_plan_progress_rows_upsert", "Seed or update structured plan progress rows (canonical checklist state).", {
36
+ planId: z.string(),
37
+ rows: z.array(rowUpsertSchema),
38
+ slug: slugField,
39
+ }, async (args) => {
40
+ const s = await resolveToolSlug(args.slug);
41
+ return jsonResult(await post(`/agent-os/${s}/plans/${args.planId}/progress-rows`, {
42
+ rows: args.rows,
43
+ }));
44
+ });
45
+ register("agent_os_plan_progress_event_append", "Append a role-lane progress event and apply allowed row transition rules.", {
46
+ planId: z.string(),
47
+ rowKey: z.string().optional(),
48
+ rowId: z.string().optional(),
49
+ taskId: z.string().optional(),
50
+ reviewTaskId: z.string().optional(),
51
+ roleLane,
52
+ status: progressStatus,
53
+ note: z.string().optional(),
54
+ remainingWork: z.string().optional(),
55
+ evidence: z.array(evidenceSchema).optional(),
56
+ proposed: z.boolean().optional(),
57
+ executorRef: z.string().optional(),
58
+ slug: slugField,
59
+ }, async (args) => {
60
+ const s = await resolveToolSlug(args.slug);
61
+ const { slug, planId, remainingWork, ...rest } = args;
62
+ return jsonResult(await post(`/agent-os/${s}/plans/${planId}/progress-events`, compact({
63
+ ...rest,
64
+ ...(remainingWork !== undefined ? { remaining: remainingWork } : {}),
65
+ })));
66
+ });
67
+ register("agent_os_plan_review_task_create", "Create a discovery review/decision AgentTask linked to a progress row.", {
68
+ planId: z.string(),
69
+ title: z.string(),
70
+ description: z.string().optional(),
71
+ rowKey: z.string().optional(),
72
+ rowId: z.string().optional(),
73
+ forWill: z.boolean().optional(),
74
+ parentTaskId: z.string().optional(),
75
+ idempotencyKey: z.string().optional(),
76
+ slug: slugField,
77
+ }, async (args) => {
78
+ const s = await resolveToolSlug(args.slug);
79
+ const { slug, planId, ...rest } = args;
80
+ return jsonResult(await post(`/agent-os/${s}/plans/${planId}/review-tasks`, compact(rest)));
81
+ });
82
+ register("agent_os_plan_progress_rows_list", "List structured progress rows for a plan.", { planId: z.string(), slug: slugField }, async (args) => {
83
+ const s = await resolveToolSlug(args.slug);
84
+ return jsonResult(await get(`/agent-os/${s}/plans/${args.planId}/progress-rows`));
85
+ });
86
+ register("agent_os_plan_progress_events_list", "List append-only progress events for a plan (audit trail).", {
87
+ planId: z.string(),
88
+ rowId: z.string().optional(),
89
+ limit: z.number().int().min(1).max(500).optional(),
90
+ slug: slugField,
91
+ }, async (args) => {
92
+ const s = await resolveToolSlug(args.slug);
93
+ const qs = new URLSearchParams();
94
+ if (args.rowId)
95
+ qs.set("rowId", args.rowId);
96
+ if (args.limit)
97
+ qs.set("limit", String(args.limit));
98
+ const q = qs.toString();
99
+ return jsonResult(await get(`/agent-os/${s}/plans/${args.planId}/progress-events${q ? `?${q}` : ""}`));
100
+ });
101
+ register("agent_os_plan_verify", "Run automated runtime verification (typecheck + test) or operator override for plan closure.", {
102
+ planId: z.string(),
103
+ worktreePath: z.string().optional(),
104
+ taskId: z.string().optional(),
105
+ humanOverride: z.boolean().optional(),
106
+ overrideReason: z.string().optional(),
107
+ slug: slugField,
108
+ }, async (args) => {
109
+ const s = await resolveToolSlug(args.slug);
110
+ const { slug, planId, ...rest } = args;
111
+ return jsonResult(await post(`/agent-os/${s}/plans/${planId}/verify`, compact(rest)));
112
+ });
113
+ }
@@ -31,6 +31,11 @@ const taskEventType = z.enum([
31
31
  "failed",
32
32
  ]);
33
33
  const artifactVisibility = z.enum(["internal", "telegram_safe", "public_pr_safe"]);
34
+ const personaSlug = z
35
+ .string()
36
+ .nullable()
37
+ .optional()
38
+ .describe("Lane-expert worker slug to attribute the task to, or null to clear/filter unassigned tasks.");
34
39
  export function registerTaskTools({ register, resolveToolSlug, jsonResult, compact, }) {
35
40
  const slugField = z
36
41
  .string()
@@ -45,6 +50,7 @@ export function registerTaskTools({ register, resolveToolSlug, jsonResult, compa
45
50
  parentTaskId: z.string().optional().describe("Parent task id when this is one of 2+ coordinated workers."),
46
51
  goalId: z.string().optional(),
47
52
  projectId: z.string().optional(),
53
+ personaSlug,
48
54
  idempotencyKey: z.string().optional().describe("Dedupe key from the foreground turn. Strongly recommended."),
49
55
  requestId: z.string().optional().describe("Raw foreground request id; used as the dedupe key if idempotencyKey is absent."),
50
56
  slug: slugField,
@@ -61,6 +67,7 @@ export function registerTaskTools({ register, resolveToolSlug, jsonResult, compa
61
67
  status: taskStatus.optional(),
62
68
  executor: taskExecutor.optional(),
63
69
  parentTaskId: z.string().optional(),
70
+ personaSlug,
64
71
  limit: z.number().optional().describe("Max rows (default 50, max 200)."),
65
72
  slug: slugField,
66
73
  }, async (args) => {
@@ -71,6 +78,8 @@ export function registerTaskTools({ register, resolveToolSlug, jsonResult, compa
71
78
  params.set("executor", args.executor);
72
79
  if (args.parentTaskId)
73
80
  params.set("parentTaskId", args.parentTaskId);
81
+ if (args.personaSlug !== undefined)
82
+ params.set("personaSlug", args.personaSlug ?? "");
74
83
  if (args.limit)
75
84
  params.set("limit", String(args.limit));
76
85
  const qs = params.toString();
@@ -88,6 +97,7 @@ export function registerTaskTools({ register, resolveToolSlug, jsonResult, compa
88
97
  parentTaskId: z.string().optional(),
89
98
  goalId: z.string().optional(),
90
99
  projectId: z.string().optional(),
100
+ personaSlug,
91
101
  lastSummary: z.string().optional().describe("Latest progress summary."),
92
102
  blocker: z.string().optional(),
93
103
  branch: z.string().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kynver-app/mcp-agent-os",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
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": {