@kynver-app/mcp-agent-os 0.3.61 → 0.3.62
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/taskflow.js +37 -2
- package/package.json +1 -1
package/dist/tools/taskflow.js
CHANGED
|
@@ -22,11 +22,46 @@ const idSchema = {
|
|
|
22
22
|
export function registerTaskflowTools({ register, resolveToolSlug, jsonResult, }) {
|
|
23
23
|
register("agent_os_taskflow_list", [
|
|
24
24
|
"List Kynver-native managed TaskFlows projected to the openclaw adapter wire shape.",
|
|
25
|
+
"Defaults: scope=active, detail=compact (use scope=all|recent and detail=full for audits).",
|
|
26
|
+
"Supports limit/offset flow pagination; taskWindow.truncated signals the shared 1000-row board window was saturated.",
|
|
25
27
|
"Safe for verify_live — read-only.",
|
|
26
|
-
].join(" "),
|
|
28
|
+
].join(" "), {
|
|
29
|
+
...idSchema,
|
|
30
|
+
scope: z
|
|
31
|
+
.enum(["active", "recent", "all"])
|
|
32
|
+
.optional()
|
|
33
|
+
.describe("Flow inventory scope (default active — non-terminal only)"),
|
|
34
|
+
detail: z
|
|
35
|
+
.enum(["compact", "full"])
|
|
36
|
+
.optional()
|
|
37
|
+
.describe("Projection detail (default compact — pruned terminal state)"),
|
|
38
|
+
limit: z
|
|
39
|
+
.number()
|
|
40
|
+
.int()
|
|
41
|
+
.positive()
|
|
42
|
+
.max(200)
|
|
43
|
+
.optional()
|
|
44
|
+
.describe("Max flows per page (default 50, max 200)"),
|
|
45
|
+
offset: z
|
|
46
|
+
.number()
|
|
47
|
+
.int()
|
|
48
|
+
.nonnegative()
|
|
49
|
+
.optional()
|
|
50
|
+
.describe("Flow page offset (default 0)"),
|
|
51
|
+
}, async (args) => {
|
|
27
52
|
const agentOsId = args.agentOsId?.trim() ||
|
|
28
53
|
(await resolveAgentOsId(args.slug ?? (await resolveToolSlug())));
|
|
29
|
-
const
|
|
54
|
+
const params = new URLSearchParams();
|
|
55
|
+
if (args.scope)
|
|
56
|
+
params.set("scope", args.scope);
|
|
57
|
+
if (args.detail)
|
|
58
|
+
params.set("detail", args.detail);
|
|
59
|
+
if (args.limit !== undefined)
|
|
60
|
+
params.set("limit", String(args.limit));
|
|
61
|
+
if (args.offset !== undefined)
|
|
62
|
+
params.set("offset", String(args.offset));
|
|
63
|
+
const qs = params.toString();
|
|
64
|
+
const data = await get(`/agent-os/by-id/${encodeURIComponent(agentOsId)}/taskflow${qs ? `?${qs}` : ""}`);
|
|
30
65
|
return jsonResult(data);
|
|
31
66
|
});
|
|
32
67
|
register("agent_os_taskflow_get", [
|
package/package.json
CHANGED