@kynver-app/mcp-agent-os 0.3.10 → 0.3.14
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/tools/plans.js +5 -1
- package/dist/tools/tasks.js +35 -6
- package/package.json +1 -1
package/dist/tools/plans.js
CHANGED
|
@@ -18,7 +18,11 @@ const planStatus = z.enum([
|
|
|
18
18
|
"archived",
|
|
19
19
|
"superseded",
|
|
20
20
|
]);
|
|
21
|
-
const planPriority = z
|
|
21
|
+
const planPriority = z
|
|
22
|
+
.enum(["low", "normal", "high", "critical"])
|
|
23
|
+
.describe("Priority — default 'normal'. Most plans are 'normal'; routine is 'low'. Use 'high' only for genuinely " +
|
|
24
|
+
"urgent+important plans and 'critical' ONLY for true emergencies blocking the mission now (very few). " +
|
|
25
|
+
"Over-tagging destroys the signal — if everything is critical, nothing is.");
|
|
22
26
|
const planLinkTarget = z.enum([
|
|
23
27
|
"goal",
|
|
24
28
|
"project",
|
package/dist/tools/tasks.js
CHANGED
|
@@ -7,17 +7,31 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { get, post, patch } from "../lib/kynver-client.js";
|
|
10
|
-
const taskStatus = z
|
|
11
|
-
|
|
10
|
+
const taskStatus = z
|
|
11
|
+
.enum([
|
|
12
|
+
"ready",
|
|
12
13
|
"running",
|
|
14
|
+
"waiting",
|
|
15
|
+
"scheduled",
|
|
13
16
|
"blocked",
|
|
14
17
|
"needs_input",
|
|
15
18
|
"awaiting_review",
|
|
16
19
|
"done",
|
|
17
20
|
"failed",
|
|
18
21
|
"cancelled",
|
|
19
|
-
])
|
|
20
|
-
|
|
22
|
+
])
|
|
23
|
+
.describe("Work-state lifecycle. `ready` = admitted, can start now. " +
|
|
24
|
+
"`running` = an executor holds a live lease. `waiting` = gated on upstream tasks (set dependsOnTaskIds; auto-promotes " +
|
|
25
|
+
"to ready when they're all done). `scheduled` = deferred to a time (set scheduledFor; auto-promotes to ready when it " +
|
|
26
|
+
"passes). `blocked`/`needs_input` = a human must resolve. `awaiting_review` = review gate open. Don't hand-set " +
|
|
27
|
+
"ready→running; the dispatcher/executor lease owns that.");
|
|
28
|
+
const taskPriority = z
|
|
29
|
+
.enum(["low", "normal", "high", "critical"])
|
|
30
|
+
.describe("Priority — default 'normal'. Create coding/implementation tasks as 'normal' (routine/cleanup 'low'); " +
|
|
31
|
+
"do NOT inherit the parent plan's priority — a task on a critical plan is still 'normal'. A task only " +
|
|
32
|
+
"becomes 'critical' once it is actively BLOCKING progress (and the system already marks blocked tasks " +
|
|
33
|
+
"critical automatically). Reserve manual 'high'/'critical' for genuine urgency. If everything is " +
|
|
34
|
+
"critical, nothing is — keep most tasks at normal/low.");
|
|
21
35
|
const taskExecutor = z.enum(["inline", "harness", "acp", "manual"]);
|
|
22
36
|
const taskEventType = z.enum([
|
|
23
37
|
"created",
|
|
@@ -36,12 +50,23 @@ const personaSlug = z
|
|
|
36
50
|
.nullable()
|
|
37
51
|
.optional()
|
|
38
52
|
.describe("Lane-expert worker slug to attribute the task to, or null to clear/filter unassigned tasks.");
|
|
53
|
+
const scheduledFor = z
|
|
54
|
+
.string()
|
|
55
|
+
.nullable()
|
|
56
|
+
.optional()
|
|
57
|
+
.describe("ISO-8601 timestamp to defer the task to. A future time creates the task as `scheduled`; the operator loop " +
|
|
58
|
+
"auto-promotes it to `ready` once the time passes. null clears the schedule.");
|
|
59
|
+
const dependsOnTaskIds = z
|
|
60
|
+
.array(z.string())
|
|
61
|
+
.optional()
|
|
62
|
+
.describe("Upstream task ids this task waits on. Creates the task as `waiting`; the operator loop auto-promotes it to " +
|
|
63
|
+
"`ready` once every listed task is `done` (a failed/cancelled upstream keeps it waiting).");
|
|
39
64
|
export function registerTaskTools({ register, resolveToolSlug, jsonResult, compact, }) {
|
|
40
65
|
const slugField = z
|
|
41
66
|
.string()
|
|
42
67
|
.optional()
|
|
43
68
|
.describe("AgentOS slug. Omit to use env or the server-discovered primary.");
|
|
44
|
-
register("agent_os_task_create", "Create an AgentTask on the board. Idempotent within the AgentOS: pass idempotencyKey (or requestId) from the foreground turn so a Telegram retry or Ghost restart returns the existing task instead of spawning a duplicate. Response includes `created` (false = an existing task was returned).", {
|
|
69
|
+
register("agent_os_task_create", "Create an AgentTask on the board. New tasks start `ready` (dispatchable now) unless you defer them: pass scheduledFor for a timed start (→ `scheduled`) or dependsOnTaskIds to gate on upstream work (→ `waiting`); both auto-promote to `ready` when their gate clears. Idempotent within the AgentOS: pass idempotencyKey (or requestId) from the foreground turn so a Telegram retry or Ghost restart returns the existing task instead of spawning a duplicate. Response includes `created` (false = an existing task was returned).", {
|
|
45
70
|
title: z.string().describe("Short task title (required)."),
|
|
46
71
|
description: z.string().optional(),
|
|
47
72
|
priority: taskPriority.optional(),
|
|
@@ -51,6 +76,8 @@ export function registerTaskTools({ register, resolveToolSlug, jsonResult, compa
|
|
|
51
76
|
goalId: z.string().optional(),
|
|
52
77
|
projectId: z.string().optional(),
|
|
53
78
|
personaSlug,
|
|
79
|
+
scheduledFor,
|
|
80
|
+
dependsOnTaskIds,
|
|
54
81
|
idempotencyKey: z.string().optional().describe("Dedupe key from the foreground turn. Strongly recommended."),
|
|
55
82
|
requestId: z.string().optional().describe("Raw foreground request id; used as the dedupe key if idempotencyKey is absent."),
|
|
56
83
|
slug: slugField,
|
|
@@ -86,7 +113,7 @@ export function registerTaskTools({ register, resolveToolSlug, jsonResult, compa
|
|
|
86
113
|
const s = await resolveToolSlug(args.slug);
|
|
87
114
|
return jsonResult(await get(`/agent-os/${s}/tasks${qs ? `?${qs}` : ""}`));
|
|
88
115
|
});
|
|
89
|
-
register("agent_os_task_update", "Patch an AgentTask: status, priority, executor, links, progress summary, blocker, or first-class artifact refs (branch/worktreePath/prUrl/headCommit). Does not touch lease fields — use claim/renew for those.", {
|
|
116
|
+
register("agent_os_task_update", "Patch an AgentTask: status, priority, executor, links, schedule (scheduledFor), dependencies (dependsOnTaskIds), progress summary, blocker, or first-class artifact refs (branch/worktreePath/prUrl/headCommit). Does not touch lease fields — use claim/renew for those.", {
|
|
90
117
|
taskId: z.string(),
|
|
91
118
|
title: z.string().optional(),
|
|
92
119
|
description: z.string().optional(),
|
|
@@ -98,6 +125,8 @@ export function registerTaskTools({ register, resolveToolSlug, jsonResult, compa
|
|
|
98
125
|
goalId: z.string().optional(),
|
|
99
126
|
projectId: z.string().optional(),
|
|
100
127
|
personaSlug,
|
|
128
|
+
scheduledFor,
|
|
129
|
+
dependsOnTaskIds,
|
|
101
130
|
lastSummary: z.string().optional().describe("Latest progress summary."),
|
|
102
131
|
blocker: z.string().optional(),
|
|
103
132
|
branch: z.string().optional(),
|
package/package.json
CHANGED