@kynver-app/mcp-agent-os 0.3.49 → 0.3.52
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 +11 -0
- package/dist/tools/cmo-control.d.ts +20 -0
- package/dist/tools/cmo-control.js +26 -0
- package/dist/tools/current-focus.d.ts +17 -0
- package/dist/tools/current-focus.js +126 -0
- package/dist/tools/task-board-watchdog.d.ts +20 -0
- package/dist/tools/task-board-watchdog.js +42 -0
- package/dist/tools/workbench.js +45 -0
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -21,6 +21,7 @@ import { registerMemoryQualityFeedbackTools } from "./tools/memory-quality-feedb
|
|
|
21
21
|
import { registerOperatingRulesTools } from "./tools/operating-rules.js";
|
|
22
22
|
import { registerProviderEvidenceTools } from "./tools/provider-evidence.js";
|
|
23
23
|
import { registerPrBacklogTools } from "./tools/pr-backlog.js";
|
|
24
|
+
import { registerTaskBoardWatchdogTools } from "./tools/task-board-watchdog.js";
|
|
24
25
|
import { registerMeshLivenessTools } from "./tools/mesh-liveness.js";
|
|
25
26
|
import { registerDiagnosticsTools } from "./tools/diagnostics.js";
|
|
26
27
|
import { registerSkillsTools } from "./tools/skills.js";
|
|
@@ -30,6 +31,8 @@ import { registerMonitorTools } from "./tools/monitor.js";
|
|
|
30
31
|
import { registerMacroControlsTools } from "./tools/macro-controls.js";
|
|
31
32
|
import { registerKariAdMarketingLoopTools } from "./tools/kariad-marketing-loop.js";
|
|
32
33
|
import { registerKariAdOutcomeImportTools } from "./tools/kariad-outcome-import.js";
|
|
34
|
+
import { registerCmoControlTools } from "./tools/cmo-control.js";
|
|
35
|
+
import { registerCurrentFocusTools } from "./tools/current-focus.js";
|
|
33
36
|
import { readOwnPackageVersion } from "./lib/package-version.js";
|
|
34
37
|
const PACKAGE_VERSION = readOwnPackageVersion(import.meta.url);
|
|
35
38
|
function jsonResult(data) {
|
|
@@ -172,6 +175,7 @@ export function createAgentOsServer() {
|
|
|
172
175
|
memoryQuery: z.string().optional().describe("Override the memory search query. Defaults to a query derived from the anchor's title/summary."),
|
|
173
176
|
memoryLimit: z.number().optional().describe("Max memory hits (default 5, max 20). Set 0 to skip memory recall."),
|
|
174
177
|
sessionLimit: z.number().optional().describe("Max recent sessions (default 1, max 5). Set 0 to skip."),
|
|
178
|
+
resolveCurrentFocus: z.boolean().optional().describe("M2: when true and anchorType=session, resolve the most-recently-active non-terminal task as current focus. Read-only — never mutates task status. Use for agents (e.g. Hermes chat) that do not start from an explicit task anchor."),
|
|
175
179
|
surface: memorySurfaceField,
|
|
176
180
|
slug: slugField,
|
|
177
181
|
}, async (args) => {
|
|
@@ -185,6 +189,8 @@ export function createAgentOsServer() {
|
|
|
185
189
|
params.set("memoryLimit", String(args.memoryLimit));
|
|
186
190
|
if (args.sessionLimit !== undefined)
|
|
187
191
|
params.set("sessionLimit", String(args.sessionLimit));
|
|
192
|
+
if (args.resolveCurrentFocus)
|
|
193
|
+
params.set("resolveCurrentFocus", "true");
|
|
188
194
|
if (args.surface)
|
|
189
195
|
params.set("surface", args.surface);
|
|
190
196
|
return jsonResult(await get(`/agent-os/${s}/context-envelope?${params}`));
|
|
@@ -730,6 +736,8 @@ export function createAgentOsServer() {
|
|
|
730
736
|
registerProviderEvidenceTools({ register, resolveToolSlug, jsonResult });
|
|
731
737
|
// PR backlog drain (read-only routing-funnel surface).
|
|
732
738
|
registerPrBacklogTools({ register, resolveToolSlug, jsonResult });
|
|
739
|
+
// Kynver-native task board watchdog (read + tick for verify_live).
|
|
740
|
+
registerTaskBoardWatchdogTools({ register, resolveToolSlug, jsonResult });
|
|
733
741
|
// Connected-box mesh liveness (heartbeats, cron lease, peer rescues).
|
|
734
742
|
registerMeshLivenessTools({ register, resolveToolSlug, jsonResult });
|
|
735
743
|
// Visible Diagnostics report (dispatch-funnel, closed-loop, verify-live health …).
|
|
@@ -743,5 +751,8 @@ export function createAgentOsServer() {
|
|
|
743
751
|
registerKariAdMarketingLoopTools({ register, resolveToolSlug, jsonResult });
|
|
744
752
|
// KariAd marketing loop — M6 outcome import (analytics feedback + memory learning).
|
|
745
753
|
registerKariAdOutcomeImportTools({ register, resolveToolSlug, jsonResult });
|
|
754
|
+
registerCmoControlTools({ register, resolveToolSlug, jsonResult });
|
|
755
|
+
// M5: Kynver current-focus / todo adapter (agent-loop focus ≠ executor lease).
|
|
756
|
+
registerCurrentFocusTools({ register, resolveToolSlug, jsonResult, compact });
|
|
746
757
|
return server;
|
|
747
758
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* M7 — CMO control status MCP tool (verify-live / agent steering).
|
|
3
|
+
*
|
|
4
|
+
* Read-only customer-safe marketing rollup: connection, approvals, trend
|
|
5
|
+
* snapshot summary, campaign evidence rows, and next actions.
|
|
6
|
+
*/
|
|
7
|
+
type ToolResult = {
|
|
8
|
+
content: {
|
|
9
|
+
type: "text";
|
|
10
|
+
text: string;
|
|
11
|
+
}[];
|
|
12
|
+
structuredContent?: unknown;
|
|
13
|
+
};
|
|
14
|
+
export interface CmoControlToolDeps {
|
|
15
|
+
register: (name: string, description: string, inputSchema: Record<string, unknown>, cb: (args: any) => any) => void;
|
|
16
|
+
resolveToolSlug: (explicitSlug?: string) => Promise<string>;
|
|
17
|
+
jsonResult: (data: unknown) => ToolResult;
|
|
18
|
+
}
|
|
19
|
+
export declare function registerCmoControlTools({ register, resolveToolSlug, jsonResult, }: CmoControlToolDeps): void;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* M7 — CMO control status MCP tool (verify-live / agent steering).
|
|
3
|
+
*
|
|
4
|
+
* Read-only customer-safe marketing rollup: connection, approvals, trend
|
|
5
|
+
* snapshot summary, campaign evidence rows, and next actions.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { get } from "../lib/kynver-client.js";
|
|
9
|
+
const slugField = z
|
|
10
|
+
.string()
|
|
11
|
+
.optional()
|
|
12
|
+
.describe("AgentOS slug. Defaults to env/primary AgentOS.");
|
|
13
|
+
export function registerCmoControlTools({ register, resolveToolSlug, jsonResult, }) {
|
|
14
|
+
register("agent_os_cmo_control_status_get", [
|
|
15
|
+
"Fetch the user-facing marketing / CMO control status for Command Center.",
|
|
16
|
+
"Returns connection health, pending marketing approvals, trend snapshot summary,",
|
|
17
|
+
"recent campaign activity evidence, executive summary, and suggested next actions.",
|
|
18
|
+
"Customer-safe copy only — no credentials, lane names, or memory internals.",
|
|
19
|
+
"Read-only; safe for unattended verification.",
|
|
20
|
+
"Workbench: navigate to view=marketing or open_panel system:cmo-campaign.",
|
|
21
|
+
].join(" "), { slug: slugField }, async ({ slug }) => {
|
|
22
|
+
const s = await resolveToolSlug(slug);
|
|
23
|
+
const payload = await get(`/agent-os/${encodeURIComponent(s)}/cmo-control`);
|
|
24
|
+
return jsonResult(payload);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kynver current-focus / todo-projection MCP tools (M5).
|
|
3
|
+
*
|
|
4
|
+
* kynver.focus.get → agent_os_focus_get
|
|
5
|
+
* kynver.focus.set → agent_os_focus_set
|
|
6
|
+
* kynver.focus.clear → agent_os_focus_clear
|
|
7
|
+
* kynver.todo.project → agent_os_todo_project
|
|
8
|
+
*
|
|
9
|
+
* CRITICAL INVARIANT:
|
|
10
|
+
* `in_progress` on a plan row = agent-loop current focus (set by these tools).
|
|
11
|
+
* `running` on a task = executor worker lease/heartbeat (never set here).
|
|
12
|
+
*
|
|
13
|
+
* Hermes `in_progress` maps ONLY to plan row `in_progress`. These tools never
|
|
14
|
+
* touch AgentTask.status — that is the dispatcher/executor's domain.
|
|
15
|
+
*/
|
|
16
|
+
import type { PlanToolDeps } from "./plans.js";
|
|
17
|
+
export declare function registerCurrentFocusTools({ register, resolveToolSlug, jsonResult, compact, }: PlanToolDeps): void;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kynver current-focus / todo-projection MCP tools (M5).
|
|
3
|
+
*
|
|
4
|
+
* kynver.focus.get → agent_os_focus_get
|
|
5
|
+
* kynver.focus.set → agent_os_focus_set
|
|
6
|
+
* kynver.focus.clear → agent_os_focus_clear
|
|
7
|
+
* kynver.todo.project → agent_os_todo_project
|
|
8
|
+
*
|
|
9
|
+
* CRITICAL INVARIANT:
|
|
10
|
+
* `in_progress` on a plan row = agent-loop current focus (set by these tools).
|
|
11
|
+
* `running` on a task = executor worker lease/heartbeat (never set here).
|
|
12
|
+
*
|
|
13
|
+
* Hermes `in_progress` maps ONLY to plan row `in_progress`. These tools never
|
|
14
|
+
* touch AgentTask.status — that is the dispatcher/executor's domain.
|
|
15
|
+
*/
|
|
16
|
+
import { z } from "zod";
|
|
17
|
+
import { get, post } from "../lib/kynver-client.js";
|
|
18
|
+
export function registerCurrentFocusTools({ register, resolveToolSlug, jsonResult, compact, }) {
|
|
19
|
+
const slugField = z
|
|
20
|
+
.string()
|
|
21
|
+
.optional()
|
|
22
|
+
.describe("AgentOS workspace slug. Omit to use env or the server-discovered primary.");
|
|
23
|
+
const roleLane = z
|
|
24
|
+
.enum([
|
|
25
|
+
"plan_author",
|
|
26
|
+
"plan_reviewer",
|
|
27
|
+
"implementer",
|
|
28
|
+
"report_reviewer",
|
|
29
|
+
"deep_reviewer",
|
|
30
|
+
"repair_implementer",
|
|
31
|
+
"runtime_verifier",
|
|
32
|
+
"user",
|
|
33
|
+
"system",
|
|
34
|
+
])
|
|
35
|
+
.optional()
|
|
36
|
+
.default("implementer")
|
|
37
|
+
.describe("Role lane making this focus change. Defaults to implementer.");
|
|
38
|
+
register("agent_os_focus_get", [
|
|
39
|
+
"Get the current agent-loop focus and active executor leases for this AgentOS workspace.",
|
|
40
|
+
"Returns two separate buckets:",
|
|
41
|
+
" agentLoopFocus — plan rows currently marked `in_progress` (agent/Hermes focus, NOT executor state).",
|
|
42
|
+
" executorLeases — tasks with status `running` and an active worker lease.",
|
|
43
|
+
"Never conflate the two: in_progress = current-focus intent; running = live executor heartbeat.",
|
|
44
|
+
"Pass todos=true to also receive a projected Hermes-like todo list.",
|
|
45
|
+
].join(" "), {
|
|
46
|
+
todos: z
|
|
47
|
+
.boolean()
|
|
48
|
+
.optional()
|
|
49
|
+
.describe("When true, also return a projected todo list of actionable tasks and in-progress rows."),
|
|
50
|
+
planId: z
|
|
51
|
+
.string()
|
|
52
|
+
.optional()
|
|
53
|
+
.describe("Scope the todo projection to a single plan. Has no effect unless todos=true."),
|
|
54
|
+
slug: slugField,
|
|
55
|
+
}, async (args) => {
|
|
56
|
+
const s = await resolveToolSlug(args.slug);
|
|
57
|
+
const params = new URLSearchParams();
|
|
58
|
+
if (args.todos)
|
|
59
|
+
params.set("todos", "true");
|
|
60
|
+
if (args.planId)
|
|
61
|
+
params.set("planId", args.planId);
|
|
62
|
+
const qs = params.toString();
|
|
63
|
+
return jsonResult(await get(`/agent-os/${s}/current-focus${qs ? `?${qs}` : ""}`));
|
|
64
|
+
});
|
|
65
|
+
register("agent_os_focus_set", [
|
|
66
|
+
"Set the agent-loop current focus to a specific plan progress row.",
|
|
67
|
+
"This marks the row as `in_progress` and updates AgentPlan.inProgressRowKey.",
|
|
68
|
+
"IMPORTANT: This does NOT set the task status to `running` — that is the executor lease.",
|
|
69
|
+
"Hermes `in_progress` semantics: focus intent, not worker heartbeat.",
|
|
70
|
+
"Any previously focused row on the same plan is demoted back to `todo`.",
|
|
71
|
+
"Precondition: the plan must have focus enabled (progressFocusEnabled not set to false in plan metadata).",
|
|
72
|
+
"When focus is disabled, returns applied:false with a reason — not an error, but the change was not applied.",
|
|
73
|
+
].join(" "), {
|
|
74
|
+
planId: z.string().describe("The plan that owns the row to focus."),
|
|
75
|
+
rowKey: z.string().optional().describe("Progress row key to focus. One of rowKey or rowId is required."),
|
|
76
|
+
rowId: z.string().optional().describe("Progress row DB id to focus. One of rowKey or rowId is required."),
|
|
77
|
+
taskId: z.string().optional().describe("Associate a task with this focus event (metadata only — does not change task status)."),
|
|
78
|
+
roleLane,
|
|
79
|
+
note: z.string().optional().describe("Optional note recorded on the focus event."),
|
|
80
|
+
slug: slugField,
|
|
81
|
+
}, async (args) => {
|
|
82
|
+
const s = await resolveToolSlug(args.slug);
|
|
83
|
+
const { slug, ...rest } = args;
|
|
84
|
+
return jsonResult(await post(`/agent-os/${s}/current-focus`, compact(rest)));
|
|
85
|
+
});
|
|
86
|
+
register("agent_os_focus_clear", [
|
|
87
|
+
"Clear the agent-loop current focus for a plan, moving the focused row back to `todo`.",
|
|
88
|
+
"Use when the session is done with a row but not marking it complete.",
|
|
89
|
+
"Does NOT cancel or abort the associated task — task lifecycle is separate.",
|
|
90
|
+
].join(" "), {
|
|
91
|
+
planId: z.string().describe("The plan whose current focus should be cleared."),
|
|
92
|
+
roleLane,
|
|
93
|
+
note: z.string().optional().describe("Optional note recorded on the clear event."),
|
|
94
|
+
slug: slugField,
|
|
95
|
+
}, async (args) => {
|
|
96
|
+
const s = await resolveToolSlug(args.slug);
|
|
97
|
+
const { slug, ...rest } = args;
|
|
98
|
+
// POST with clear=true — the route distinguishes set vs clear by presence
|
|
99
|
+
// of rowKey/rowId. No rowKey/rowId + clear=true = explicit clear.
|
|
100
|
+
return jsonResult(await post(`/agent-os/${s}/current-focus`, compact({ ...rest, clear: true })));
|
|
101
|
+
});
|
|
102
|
+
register("agent_os_todo_project", [
|
|
103
|
+
"Project the current AgentOS task board and plan progress rows into a Hermes-like todo list.",
|
|
104
|
+
"Returns KynverTodoItem entries with origin discriminants:",
|
|
105
|
+
" plan_row — an in_progress plan progress row (agent-loop focus).",
|
|
106
|
+
" task_ready — a task ready for dispatch.",
|
|
107
|
+
" task_blocked — a task blocked on external input.",
|
|
108
|
+
" task_needs_input — a task waiting on human decision.",
|
|
109
|
+
"Includes stale detection: items not updated within 48h are flagged stale=true.",
|
|
110
|
+
"Use this as the authoritative 'what is next' readback for Kynver sessions,",
|
|
111
|
+
"replacing stale Hermes-local todos with live board state.",
|
|
112
|
+
].join(" "), {
|
|
113
|
+
planId: z.string().optional().describe("Scope to a single plan. Omit for workspace-wide projection."),
|
|
114
|
+
limit: z.number().int().min(1).max(100).optional().describe("Max todo items (default 50, max 100)."),
|
|
115
|
+
slug: slugField,
|
|
116
|
+
}, async (args) => {
|
|
117
|
+
const s = await resolveToolSlug(args.slug);
|
|
118
|
+
const params = new URLSearchParams();
|
|
119
|
+
params.set("todos", "true");
|
|
120
|
+
if (args.planId)
|
|
121
|
+
params.set("planId", args.planId);
|
|
122
|
+
const qs = params.toString();
|
|
123
|
+
const result = await get(`/agent-os/${s}/current-focus?${qs}`);
|
|
124
|
+
return jsonResult(result.todoProjection ?? result);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task board watchdog MCP tools — read/trigger the Kynver-native board sweep.
|
|
3
|
+
*
|
|
4
|
+
* agent_os_task_board_watchdog_get → GET …/task-board-watchdog (last snapshot)
|
|
5
|
+
* agent_os_task_board_watchdog_tick → POST …/task-board-watchdog (run one tick)
|
|
6
|
+
*/
|
|
7
|
+
type ToolResult = {
|
|
8
|
+
content: {
|
|
9
|
+
type: "text";
|
|
10
|
+
text: string;
|
|
11
|
+
}[];
|
|
12
|
+
structuredContent?: unknown;
|
|
13
|
+
};
|
|
14
|
+
export interface TaskBoardWatchdogToolDeps {
|
|
15
|
+
register: (name: string, description: string, inputSchema: Record<string, unknown>, cb: (args: any) => any) => void;
|
|
16
|
+
resolveToolSlug: (explicitSlug?: string) => Promise<string>;
|
|
17
|
+
jsonResult: (data: unknown) => ToolResult;
|
|
18
|
+
}
|
|
19
|
+
export declare function registerTaskBoardWatchdogTools({ register, resolveToolSlug, jsonResult, }: TaskBoardWatchdogToolDeps): void;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task board watchdog MCP tools — read/trigger the Kynver-native board sweep.
|
|
3
|
+
*
|
|
4
|
+
* agent_os_task_board_watchdog_get → GET …/task-board-watchdog (last snapshot)
|
|
5
|
+
* agent_os_task_board_watchdog_tick → POST …/task-board-watchdog (run one tick)
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { get, post } from "../lib/kynver-client.js";
|
|
9
|
+
async function resolveAgentOsId(slug) {
|
|
10
|
+
const row = await get(`/agent-os/${encodeURIComponent(slug)}`);
|
|
11
|
+
const id = typeof row.id === "string" ? row.id.trim() : "";
|
|
12
|
+
if (!id) {
|
|
13
|
+
throw new Error(`AgentOS slug "${slug}" did not resolve to an id. Pass agentOsId explicitly or ensure GET /api/agent-os/{slug} returns id.`);
|
|
14
|
+
}
|
|
15
|
+
return id;
|
|
16
|
+
}
|
|
17
|
+
const idSchema = {
|
|
18
|
+
agentOsId: z.string().uuid().optional().describe("AgentOS workspace id"),
|
|
19
|
+
slug: z.string().optional().describe("AgentOS slug (resolved to id when agentOsId omitted)"),
|
|
20
|
+
};
|
|
21
|
+
export function registerTaskBoardWatchdogTools({ register, resolveToolSlug, jsonResult, }) {
|
|
22
|
+
register("agent_os_task_board_watchdog_get", [
|
|
23
|
+
"Fetch the Kynver-native task board watchdog snapshot: last tick movement counts,",
|
|
24
|
+
"quiet flag, dispatch floor advice, and agentReadable summary.",
|
|
25
|
+
"Safe for verify_live — read-only.",
|
|
26
|
+
].join(" "), idSchema, async (args) => {
|
|
27
|
+
const agentOsId = args.agentOsId?.trim() ||
|
|
28
|
+
(await resolveAgentOsId(args.slug ?? (await resolveToolSlug())));
|
|
29
|
+
const data = await get(`/agent-os/by-id/${encodeURIComponent(agentOsId)}/task-board-watchdog`);
|
|
30
|
+
return jsonResult(data);
|
|
31
|
+
});
|
|
32
|
+
register("agent_os_task_board_watchdog_tick", [
|
|
33
|
+
"Run one Kynver-native task board watchdog tick: board reconcile, expert supervisor,",
|
|
34
|
+
"bookkeeping drain, budget-reset PR lifecycle retry, and meaningful-change report.",
|
|
35
|
+
"Idempotent — safe for verify_live when a fresh snapshot is needed.",
|
|
36
|
+
].join(" "), idSchema, async (args) => {
|
|
37
|
+
const agentOsId = args.agentOsId?.trim() ||
|
|
38
|
+
(await resolveAgentOsId(args.slug ?? (await resolveToolSlug())));
|
|
39
|
+
const data = await post(`/agent-os/by-id/${encodeURIComponent(agentOsId)}/task-board-watchdog`, {});
|
|
40
|
+
return jsonResult(data);
|
|
41
|
+
});
|
|
42
|
+
}
|
package/dist/tools/workbench.js
CHANGED
|
@@ -98,4 +98,49 @@ export function registerWorkbenchTools({ register, resolveToolSlug, jsonResult,
|
|
|
98
98
|
}
|
|
99
99
|
return jsonResult(await post(`/agent-os/${slug}/workbench/command`, body));
|
|
100
100
|
});
|
|
101
|
+
register("agent_os_workbench_present", [
|
|
102
|
+
"Present a full-screen slideshow on the operator's open Command Center — walk the user",
|
|
103
|
+
"through points/status/reviews as large-type slides while you narrate in chat.",
|
|
104
|
+
"action=start with your own slides, OR compose=\"working_on\" to auto-build a",
|
|
105
|
+
"'What we're working on' deck from the live rollup server-side. Drive with",
|
|
106
|
+
"action=next/prev/goto/close. Slides may carry an EntityRef (task:<id>, plan:<id>)",
|
|
107
|
+
"for a 'Show in Command Center' button. View-control only; user can dismiss (Esc).",
|
|
108
|
+
].join(" "), {
|
|
109
|
+
slug: z.string().optional(),
|
|
110
|
+
action: z.enum(["start", "next", "prev", "goto", "close"]).optional()
|
|
111
|
+
.describe("Default start."),
|
|
112
|
+
compose: z.enum(["working_on"]).optional()
|
|
113
|
+
.describe("Auto-compose the deck from the live rollup (ignores slides)."),
|
|
114
|
+
title: z.string().optional().describe("Deck headline (start)."),
|
|
115
|
+
slides: z
|
|
116
|
+
.array(z.object({
|
|
117
|
+
title: z.string(),
|
|
118
|
+
body: z.string().optional(),
|
|
119
|
+
bullets: z.array(z.string()).optional(),
|
|
120
|
+
metric: z.object({ value: z.string(), label: z.string() }).optional(),
|
|
121
|
+
ref: z.string().optional().describe("EntityRef e.g. task:<id>, plan:<id>"),
|
|
122
|
+
tone: z.enum(["info", "good", "warn", "risk"]).optional(),
|
|
123
|
+
}))
|
|
124
|
+
.optional()
|
|
125
|
+
.describe("Slides for action=start (max 16)."),
|
|
126
|
+
index: z.number().optional().describe("Target slide for action=goto (0-based)."),
|
|
127
|
+
autoAdvanceMs: z.number().optional().describe("Optional auto-advance (3000–120000 ms)."),
|
|
128
|
+
sessionId: z.string().optional(),
|
|
129
|
+
}, async (args) => {
|
|
130
|
+
const slug = await resolveToolSlug(args.slug);
|
|
131
|
+
const body = {
|
|
132
|
+
kind: "present",
|
|
133
|
+
source: "agent",
|
|
134
|
+
sessionId: args.sessionId,
|
|
135
|
+
compose: args.compose,
|
|
136
|
+
present: {
|
|
137
|
+
action: args.action ?? "start",
|
|
138
|
+
title: args.title,
|
|
139
|
+
slides: args.slides,
|
|
140
|
+
index: args.index,
|
|
141
|
+
autoAdvanceMs: args.autoAdvanceMs,
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
return jsonResult(await post(`/agent-os/${slug}/workbench/command`, body));
|
|
145
|
+
});
|
|
101
146
|
}
|
package/package.json
CHANGED