@yankeguo/dsh-tool-devlead 0.3.0-rc.1 → 0.3.0-rc.2

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.
Files changed (2) hide show
  1. package/lib/index.js +100 -17
  2. package/package.json +4 -3
package/lib/index.js CHANGED
@@ -22,6 +22,43 @@ var DevLeadToolInputError = class extends Error {
22
22
  this.name = "DevLeadToolInputError";
23
23
  }
24
24
  };
25
+ var TOOL_ARGUMENT_KEYS = {
26
+ devlead_list_workspaces: [],
27
+ devlead_list_models: [],
28
+ devlead_list_agent_presets: [],
29
+ devlead_use_workspace: ["path", "title", "create"],
30
+ devlead_list_sessions: ["workspace", "watched_only", "limit"],
31
+ devlead_create_session: [
32
+ "workspace",
33
+ "prompt",
34
+ "title",
35
+ "watch",
36
+ "preset",
37
+ "isolation",
38
+ "provider",
39
+ "model",
40
+ "reasoning_effort",
41
+ "agent_teams"
42
+ ],
43
+ devlead_get_session: ["session"],
44
+ devlead_prompt_session: ["session", "prompt", "watch", "interrupt", "interrupt_inbox"],
45
+ devlead_retract_input: ["session", "input_id"],
46
+ devlead_watch_session: ["session", "watching"],
47
+ devlead_notifications: ["limit"],
48
+ devlead_report: ["message", "kind", "summary"],
49
+ devlead_remove_workspace: ["workspace"],
50
+ devlead_archive_session: ["session", "stop_running"],
51
+ devlead_unarchive_session: ["session"]
52
+ };
53
+ function assertKnownArguments(args, allowedKeys) {
54
+ const allowed = new Set(allowedKeys);
55
+ const unknown = Object.keys(args).filter((key) => !allowed.has(key));
56
+ if (unknown.length === 0) return;
57
+ const names = unknown.map((key) => `"${key}"`).join(", ");
58
+ throw new DevLeadToolInputError(
59
+ `unknown argument${unknown.length === 1 ? "" : "s"} ${names}; accepted arguments: ${allowedKeys.length === 0 ? "(none)" : allowedKeys.join(", ")}`
60
+ );
61
+ }
25
62
  function requireAgent(agent, tool) {
26
63
  if (agent === void 0) {
27
64
  throw new HarnessError(`${tool} requires a calling Agent`, "DEVLEAD_AGENT_NOT_LIVE");
@@ -181,11 +218,34 @@ var DEVLEAD_REPORT_POLICY = `This Session is watched by the active DevLead Sessi
181
218
 
182
219
  // packages/tool/src/question-routing.ts
183
220
  import {
221
+ DEVLEAD_MESSAGE_KIND,
184
222
  DEVLEAD_REPORT_MESSAGE_MAX,
185
223
  DEVLEAD_REPORT_SUMMARY_MAX
186
224
  } from "@yankeguo/dsh-devlead-protocol";
187
225
  var ASK_USER_QUESTION_TOOL = "ask_user_question";
188
- var NON_ACTIONABLE_SOURCE_KINDS = /* @__PURE__ */ new Set(["runtime-context", "tool-registry"]);
226
+ var HUMAN_SOURCE_KINDS = /* @__PURE__ */ new Set(["user", "user-question-reply", "user-approval"]);
227
+ var NON_ACTIONABLE_SOURCE_KINDS = /* @__PURE__ */ new Set([
228
+ "runtime-context",
229
+ "tool-registry",
230
+ "time-context",
231
+ "tmux-context",
232
+ "agent-instructions",
233
+ "working-directory",
234
+ "ptc-mode",
235
+ "plan-mode",
236
+ "session-reference",
237
+ "action-cards",
238
+ "webhook"
239
+ ]);
240
+ var NON_ACTIONABLE_SOURCE_PREFIXES = ["hooks-"];
241
+ var NON_ACTIONABLE_SOURCE_FORMS = /* @__PURE__ */ new Set([
242
+ "instructions",
243
+ "catalog",
244
+ "snapshot",
245
+ "notice",
246
+ "recall",
247
+ "relay"
248
+ ]);
189
249
  var FORWARDED_REASON = "Direct user questions are disabled while this Session is watched by a DevLead. The question was forwarded to the DevLead as a question report; end your turn now and wait for the DevLead to answer in a new turn. Do not call ask_user_question again or poll for the answer.";
190
250
  var FORWARD_FAILED_REASON = "Direct user questions are disabled while this Session is watched by a DevLead, and forwarding the question failed. End your turn now and state the question in your final assistant message so the DevLead can read it from the turn notification. Do not call ask_user_question again.";
191
251
  var UNREADABLE_REASON = "Direct user questions are disabled while this Session is watched by a DevLead, and the question payload could not be read to forward it. End your turn now and state the question in your final assistant message so the DevLead can read it from the turn notification. Do not call ask_user_question again.";
@@ -252,9 +312,15 @@ function isHumanDirectedTurn(agent) {
252
312
  for (let index = events.length - 1; index > turnStart; index -= 1) {
253
313
  const event = events[index];
254
314
  if (event?.type !== "user/message") continue;
255
- const kind = event.data.source?.kind;
256
- if (typeof kind !== "string" || NON_ACTIONABLE_SOURCE_KINDS.has(kind)) continue;
257
- return kind === "user";
315
+ const source = event.data?.source;
316
+ const kind = source?.kind;
317
+ if (typeof kind !== "string") return false;
318
+ if (kind === DEVLEAD_MESSAGE_KIND) return false;
319
+ if (NON_ACTIONABLE_SOURCE_KINDS.has(kind) || NON_ACTIONABLE_SOURCE_PREFIXES.some((prefix) => kind.startsWith(prefix))) continue;
320
+ const form = source?.form;
321
+ if (typeof form === "string" && NON_ACTIONABLE_SOURCE_FORMS.has(form)) continue;
322
+ if (HUMAN_SOURCE_KINDS.has(kind)) return true;
323
+ return false;
258
324
  }
259
325
  return false;
260
326
  }
@@ -632,7 +698,7 @@ var GET_SESSION_OUTPUT = jsonOutput({
632
698
  queuedInputs: {
633
699
  type: "array",
634
700
  items: QUEUED_INPUT_SCHEMA,
635
- description: "Pending inbox inputs of the target Session, present only while it is live; queue order (next-turn rows, then next-step)."
701
+ description: "Pending inbox inputs of the target Session, present only while a live Agent owns it; queue order (next-turn rows, then next-step)."
636
702
  }
637
703
  }
638
704
  });
@@ -642,7 +708,7 @@ var PROMPT_SESSION_OUTPUT = jsonOutput({
642
708
  properties: {
643
709
  sessionId: { type: "string", required: true, description: "Addressed Session identity." },
644
710
  watched: { type: "boolean", required: true, description: "Whether the Session is watched after this call." },
645
- resumed: { type: "boolean", required: true, description: "Whether a cold Session had to be resumed to admit the prompt." },
711
+ resumed: { type: "boolean", required: true, description: "Whether the target had to be resumed because no live Agent owned the target when the prompt was admitted." },
646
712
  interrupted: {
647
713
  type: "boolean",
648
714
  required: true,
@@ -698,7 +764,7 @@ var REPORT_OUTPUT = jsonOutput({
698
764
  durable: {
699
765
  type: "boolean",
700
766
  required: true,
701
- description: "Whether the receipt is safely recoverable from durable storage across a Host restart."
767
+ description: "Whether this attempt wrote the receipt to durable storage; false means no durable receipt exists (storage absent or the outbox write failed), so the warning is a possible-loss receipt."
702
768
  },
703
769
  queued: {
704
770
  type: "boolean",
@@ -707,7 +773,7 @@ var REPORT_OUTPUT = jsonOutput({
707
773
  },
708
774
  warning: {
709
775
  type: "string",
710
- description: "Human warning shown when durable storage is unavailable and the receipt is memory-only."
776
+ description: "Human warning shown when no durable receipt was written on this attempt (storage unavailable or the outbox write failed) and the receipt is memory-only."
711
777
  }
712
778
  }
713
779
  });
@@ -973,12 +1039,12 @@ var LIST_WORKSPACES_DESCRIPTION = "List every registered DSH Workspace: its id,
973
1039
  var USE_WORKSPACE_DESCRIPTION = "Register a repository directory as a DSH Workspace so Sessions can be created in it. An already-registered path is reused idempotently. A missing directory is an error by default: set create to true only when the human explicitly asked to create that directory.";
974
1040
  var LIST_SESSIONS_DESCRIPTION = "List DSH Sessions this DevLead Session can address: whether each is live, running, watched, or archived, plus latest-turn facts when the Host knows them. Watched and running rows come first. Optionally restrict to one Workspace (by id, registered path, or exact title) or to the watched set; use devlead_get_session for a log detail with the latest turn outcome and assistant excerpt. Inspect it after a wake-up or when the human explicitly asks, not as a polling loop while waiting for a dispatched Session.";
975
1041
  var CREATE_SESSION_DESCRIPTION = "Create an ordinary DSH Session in a Workspace and optionally start it with a prompt. The Session is a real Session the human can open and take over, not a subagent. Use it to dispatch the owning Workspace's work to that Session instead of doing the work yourself from this lead session; the brief may carry open questions, because the Session owns the deeper investigation and the implementation. The child inherits the Host default model unless you explicitly pin provider/model (plus optional reasoning_effort); preset and agent_teams follow the same inherit-by-default stance. These are creation-time only settings, and each parameter states its pinning rules and what to call first. Never change the Host/profile default, and do not upgrade or downgrade a model on your own. It runs independently, so after this call end the turn instead of waiting: never sleep, never poll devlead_get_session, devlead_list_sessions, or devlead_notifications, and never call wait_agent to wait for it. A watched Session is the default, and its settled turn starts a new turn of this lead session with the wake-up message. When watched, the child can use devlead_report for mid-turn blockers, decision forks, or scheduling-critical progress; mention it only in a long-running brief whose mid-turn milestones matter, and omit that advice with watch=false (the tool is absent).";
976
- var GET_SESSION_DESCRIPTION = `Read one Session in detail: whether it is live and running, whether it is archived, and, when the Host can read the Session log, the latest turn number and outcome plus the latest error and assistant excerpts. While the target is live, the output also lists its queued inbox inputs (id, boundary, source, text excerpt, enqueue time), so stale or duplicate queued instructions can be identified before they run. Use it to inspect state after a wake-up or when the human explicitly asks, not to poll while waiting for a dispatched Session. When the target is this lead Session itself, the output also carries its ${SELF_REPORTS_LIMIT} newest retained mid-turn reports.`;
977
- var PROMPT_SESSION_DESCRIPTION = "Admit a follow-up prompt into an existing Session, resuming a cold Session first. The prompt is attributed to this DevLead Session. Archived Sessions are rejected. The Session is watched by default, so after this call end the turn instead of waiting: its settled turn starts a new turn of this lead session with the wake-up message. A watched Session gains devlead_report; in a long-running continuation whose mid-turn milestones matter, tell it to report blockers, decision forks, or scheduling-critical progress. With watch=false the tool is unavailable. Default delivery queues the prompt behind the Session's current turn; set interrupt true only to replace that work, with the exact stop-and-replace semantics described on the interrupt parameter and the inbox retention options on interrupt_inbox.";
1042
+ var GET_SESSION_DESCRIPTION = `Read one Session in detail: whether it is live and running, whether it is archived, and, when the Host can read the Session log, the latest turn number and outcome plus the latest error and assistant excerpts. While a live Agent owns the target, the output also lists its queued inbox inputs (id, boundary, source, text excerpt, enqueue time), so stale or duplicate queued instructions can be identified before they run. Use it to inspect state after a wake-up or when the human explicitly asks, not to poll while waiting for a dispatched Session. When the target is this lead Session itself, the output also carries its ${SELF_REPORTS_LIMIT} newest retained mid-turn reports.`;
1043
+ var PROMPT_SESSION_DESCRIPTION = "Admit a follow-up prompt into an existing Session, resuming a cold Session first. The prompt is attributed to this DevLead Session. Archived Sessions are rejected. The Session is watched by default, so after this call end the turn instead of waiting: its settled turn starts a new turn of this lead session with the wake-up message. A watched Session gains devlead_report; in a long-running continuation whose mid-turn milestones matter, tell it to report blockers, decision forks, or scheduling-critical progress. With watch=false this call only skips adding a watch: an already-watched Session stays watched and keeps devlead_report, so use devlead_watch_session with watching:false to remove it. Default delivery queues the prompt behind the Session's current turn; set interrupt true only to replace that work, with the exact stop-and-replace semantics described on the interrupt parameter and the inbox retention options on interrupt_inbox.";
978
1044
  var RETRACT_INPUT_DESCRIPTION = "Withdraw one queued inbox input from a Session before it runs, addressed by the id devlead_get_session reports in queuedInputs. Only relay prompts this lead Session authored can be withdrawn; human, scheduled, and other producers' queued inputs are refused with an explanation \u2014 they are not yours to remove. Idempotent: an input already consumed or withdrawn reports retracted false. The target must be live (a cold Session has no folded inbox) and cannot be this lead Session itself. Use it to clean up a stale or misdelivered instruction you queued, instead of layering another prompt on top of it.";
979
1045
  var WATCH_SESSION_DESCRIPTION = "Add one Session to, or remove it from, this DevLead Session's watch set. A watch is a one-way follow relationship, not a permission grant: it only routes turn notifications/reports and allows steering; it does not grant file access or ownership. Only watched Sessions produce wake-up notifications, so unwatch work that no longer needs attention. A Session cannot watch itself.";
980
1046
  var NOTIFICATIONS_DESCRIPTION = "Read the retained notification digest of this DevLead Session together with the current watch set. Each notification names a watched Session whose turn settled and how it ended; the reports array carries mid-turn reports from watched Sessions. Both digests are newest last. A question report means the watched Session needs a decision; answer it yourself or ask the human, then relay the answer with devlead_prompt_session. Read it after a wake-up or when the human explicitly asks, not as a polling loop while waiting for a dispatched Session.";
981
- var REPORT_DESCRIPTION = "Send a one-way mid-turn report to the single active DevLead Session that watches this Session; the lead cannot reply through the report itself. The lead is already notified when your turn settles, so do not report routine progress or a final summary here. Use it only mid-turn, on a long-running task, for a milestone the lead must know before the turn ends: a real blocker, a fork that needs the lead's decision, or progress that would change scheduling correctness if it waited; a short or linear task should not call it. Use kind question when you are blocked on missing information or a decision, then end your turn; the lead answers in a new turn (directly, or after asking the human). Keep the message concise and actionable; at most four distinct non-question reports are accepted per turn, question reports are exempt from that budget, the same kind and message in one turn is deduplicated, and no target Session can be chosen. The result carries `durable` and `queued`; when `durable` is false the Host has no durable storage and the warning must be treated as a possible-loss receipt.";
1047
+ var REPORT_DESCRIPTION = "Send a one-way mid-turn report to the single active DevLead Session that watches this Session; the lead cannot reply through the report itself. The lead is already notified when your turn settles, so do not report routine progress or a final summary here. Use it only mid-turn, on a long-running task, for a milestone the lead must know before the turn ends: a real blocker, a fork that needs the lead's decision, or progress that would change scheduling correctness if it waited; a short or linear task should not call it. Use kind question when you are blocked on missing information or a decision, then end your turn; the lead answers in a new turn (directly, or after asking the human). Keep the message concise and actionable; at most four distinct non-question reports are accepted per turn, question reports are exempt from that budget, the same kind and message in one turn is deduplicated, and no target Session can be chosen. The result carries `durable` and `queued`; `durable` false means no durable receipt was written on this attempt (durable storage is absent, or the outbox write failed), so treat the warning as a possible-loss receipt and retry when the lead is reachable.";
982
1048
  var REMOVE_WORKSPACE_DESCRIPTION = "Close (remove) a DSH Workspace registration: the DSH remove action, not a deletion. The directory, its files, and every Session log stay untouched, but the Workspace's Sessions become ungrouped: they stay openable and continuable, yet no longer appear under that Workspace, and re-registering the same directory creates a brand new Workspace that does not adopt them. Use your judgment to remove registrations that are clearly stale, duplicate, or empty, or that you created, or when the human asks to tidy up; do not remove a Workspace the human is using, and report what you closed and why. When tidying up, prefer archiving finished Sessions over unregistering their Workspace; removal has the wider blast radius. The returned workspace is the pre-removal snapshot, including the Session ids that just became ungrouped.";
983
1049
  var ARCHIVE_SESSION_DESCRIPTION = "Close (archive) one DSH Session: it disappears from the sidebar grouping while its log is kept, and devlead_unarchive_session restores it to its recorded Workspace position. Archiving is idempotent and reversible; an already archived Session is a no-op and reports stopped false. Use your judgment to archive Sessions you created or dispatched for a task once they are done, or when the human asks to wrap up or clean up. When tidying up, archive finished Sessions and keep the Workspace registration, unless the registration itself is stale, duplicate, empty, or one you created. Do not archive a Session the human is using or talking to now, and never use closing to hide a failure. By default a Session with running work (a turn, subagents, jobs, or schedules) is refused with DEVLEAD_SESSION_ACTIVE; set stop_running true only when you mean to cancel that work, with the archive-then-stop semantics described on the stop_running parameter. This lead Session cannot archive itself: ask the human to close it from the sidebar. Report what you archived and why.";
984
1050
  var UNARCHIVE_SESSION_DESCRIPTION = "Restore (unarchive) one archived DSH Session, returning it to its recorded Workspace position. Unarchiving is idempotent, and the Session log was kept while it was archived. Use it to reverse an archive you made while wrapping up, or when the human asks to restore a Session; report the restored Session.";
@@ -1001,10 +1067,13 @@ function apply(ctx) {
1001
1067
  output: LIST_WORKSPACES_OUTPUT,
1002
1068
  presentCall: presentListWorkspacesCall,
1003
1069
  isConcurrencySafe: READ_ONLY_CONCURRENCY_SAFE,
1004
- execute(_args, exec) {
1005
- return runTool(async () => ({
1006
- workspaces: (await ctx.devLead.listWorkspaces(exec.signal)).map(workspaceValue)
1007
- }));
1070
+ execute(args, exec) {
1071
+ return runTool(async () => {
1072
+ assertKnownArguments(args, TOOL_ARGUMENT_KEYS.devlead_list_workspaces);
1073
+ return {
1074
+ workspaces: (await ctx.devLead.listWorkspaces(exec.signal)).map(workspaceValue)
1075
+ };
1076
+ });
1008
1077
  }
1009
1078
  }), { when: ({ agent }) => ctx.devLead.isEnabled(agent) });
1010
1079
  ctx.tools.register(defineTool({
@@ -1014,8 +1083,9 @@ function apply(ctx) {
1014
1083
  output: LIST_MODELS_OUTPUT,
1015
1084
  presentCall: presentListModelsCall,
1016
1085
  isConcurrencySafe: READ_ONLY_CONCURRENCY_SAFE,
1017
- execute(_args, exec) {
1086
+ execute(args, exec) {
1018
1087
  return runTool(async () => {
1088
+ assertKnownArguments(args, TOOL_ARGUMENT_KEYS.devlead_list_models);
1019
1089
  const agent = requireAgent(exec.agent, "devlead_list_models");
1020
1090
  return modelCatalogValue(await ctx.devLead.listModels(agent, exec.signal));
1021
1091
  });
@@ -1028,8 +1098,9 @@ function apply(ctx) {
1028
1098
  output: LIST_AGENT_PRESETS_OUTPUT,
1029
1099
  presentCall: presentListAgentPresetsCall,
1030
1100
  isConcurrencySafe: READ_ONLY_CONCURRENCY_SAFE,
1031
- execute(_args, exec) {
1101
+ execute(args, exec) {
1032
1102
  return runTool(async () => {
1103
+ assertKnownArguments(args, TOOL_ARGUMENT_KEYS.devlead_list_agent_presets);
1033
1104
  const agent = requireAgent(exec.agent, "devlead_list_agent_presets");
1034
1105
  return agentPresetCatalogValue(await ctx.devLead.listAgentPresets(agent, exec.signal));
1035
1106
  });
@@ -1058,6 +1129,7 @@ function apply(ctx) {
1058
1129
  presentCall: presentUseWorkspaceCall,
1059
1130
  execute(args, exec) {
1060
1131
  return runTool(async () => {
1132
+ assertKnownArguments(args, TOOL_ARGUMENT_KEYS.devlead_use_workspace);
1061
1133
  const agent = requireAgent(exec.agent, "devlead_use_workspace");
1062
1134
  const path = requireAbsolutePath(args.path);
1063
1135
  const title = optionalText(args.title);
@@ -1096,6 +1168,7 @@ function apply(ctx) {
1096
1168
  isConcurrencySafe: READ_ONLY_CONCURRENCY_SAFE,
1097
1169
  execute(args, exec) {
1098
1170
  return runTool(async () => {
1171
+ assertKnownArguments(args, TOOL_ARGUMENT_KEYS.devlead_list_sessions);
1099
1172
  const agent = requireAgent(exec.agent, "devlead_list_sessions");
1100
1173
  const workspace = optionalWorkspaceRef(args.workspace);
1101
1174
  const limit = optionalPositiveInteger(args.limit, "limit");
@@ -1164,6 +1237,7 @@ function apply(ctx) {
1164
1237
  presentCall: presentCreateSessionCall,
1165
1238
  execute(args, exec) {
1166
1239
  return runTool(async () => {
1240
+ assertKnownArguments(args, TOOL_ARGUMENT_KEYS.devlead_create_session);
1167
1241
  const agent = requireAgent(exec.agent, "devlead_create_session");
1168
1242
  const created = await ctx.devLead.createSession(agent, createSessionRequest(args), exec.signal);
1169
1243
  return createdSessionValue(created);
@@ -1185,6 +1259,7 @@ function apply(ctx) {
1185
1259
  isConcurrencySafe: READ_ONLY_CONCURRENCY_SAFE,
1186
1260
  execute(args, exec) {
1187
1261
  return runTool(async () => {
1262
+ assertKnownArguments(args, TOOL_ARGUMENT_KEYS.devlead_get_session);
1188
1263
  const agent = requireAgent(exec.agent, "devlead_get_session");
1189
1264
  const session = await ctx.devLead.getSession(agent, requireSessionRef(args.session), exec.signal);
1190
1265
  const reports = String(session.sessionId) === String(agent.id) ? ctx.devLead.reports(agent, { limit: SELF_REPORTS_LIMIT }).map(reportValue) : void 0;
@@ -1232,6 +1307,7 @@ function apply(ctx) {
1232
1307
  presentCall: presentPromptSessionCall,
1233
1308
  execute(args, exec) {
1234
1309
  return runTool(async () => {
1310
+ assertKnownArguments(args, TOOL_ARGUMENT_KEYS.devlead_prompt_session);
1235
1311
  const agent = requireAgent(exec.agent, "devlead_prompt_session");
1236
1312
  const interruptInbox = optionalInterruptInbox(args.interrupt_inbox);
1237
1313
  const prompted = await ctx.devLead.promptSession(
@@ -1268,6 +1344,7 @@ function apply(ctx) {
1268
1344
  presentCall: presentRetractInputCall,
1269
1345
  execute(args, exec) {
1270
1346
  return runTool(async () => {
1347
+ assertKnownArguments(args, TOOL_ARGUMENT_KEYS.devlead_retract_input);
1271
1348
  const agent = requireAgent(exec.agent, "devlead_retract_input");
1272
1349
  return await ctx.devLead.retractQueuedInput(
1273
1350
  agent,
@@ -1297,6 +1374,7 @@ function apply(ctx) {
1297
1374
  presentCall: presentWatchSessionCall,
1298
1375
  execute(args, exec) {
1299
1376
  return runTool(async () => {
1377
+ assertKnownArguments(args, TOOL_ARGUMENT_KEYS.devlead_watch_session);
1300
1378
  const agent = requireAgent(exec.agent, "devlead_watch_session");
1301
1379
  const mutation = await ctx.devLead.watchSession(
1302
1380
  agent,
@@ -1323,6 +1401,7 @@ function apply(ctx) {
1323
1401
  isConcurrencySafe: READ_ONLY_CONCURRENCY_SAFE,
1324
1402
  execute(args, exec) {
1325
1403
  return runTool(async () => {
1404
+ assertKnownArguments(args, TOOL_ARGUMENT_KEYS.devlead_notifications);
1326
1405
  const agent = requireAgent(exec.agent, "devlead_notifications");
1327
1406
  const limit = defaultedLimit(args.limit, "limit", DEFAULT_NOTIFICATIONS_LIMIT);
1328
1407
  return {
@@ -1357,6 +1436,7 @@ function apply(ctx) {
1357
1436
  presentCall: presentReportCall,
1358
1437
  execute(args, exec) {
1359
1438
  return runTool(async () => {
1439
+ assertKnownArguments(args, TOOL_ARGUMENT_KEYS.devlead_report);
1360
1440
  const agent = requireAgent(exec.agent, "devlead_report");
1361
1441
  const receipt = await ctx.devLead.reportProgress(agent, {
1362
1442
  message: args.message,
@@ -1386,6 +1466,7 @@ function apply(ctx) {
1386
1466
  presentCall: presentRemoveWorkspaceCall,
1387
1467
  execute(args, exec) {
1388
1468
  return runTool(async () => {
1469
+ assertKnownArguments(args, TOOL_ARGUMENT_KEYS.devlead_remove_workspace);
1389
1470
  const agent = requireAgent(exec.agent, "devlead_remove_workspace");
1390
1471
  const removed = await ctx.devLead.removeWorkspace(
1391
1472
  agent,
@@ -1415,6 +1496,7 @@ function apply(ctx) {
1415
1496
  presentCall: presentArchiveSessionCall,
1416
1497
  execute(args, exec) {
1417
1498
  return runTool(async () => {
1499
+ assertKnownArguments(args, TOOL_ARGUMENT_KEYS.devlead_archive_session);
1418
1500
  const agent = requireAgent(exec.agent, "devlead_archive_session");
1419
1501
  const archived = await ctx.devLead.archiveSession(
1420
1502
  agent,
@@ -1439,6 +1521,7 @@ function apply(ctx) {
1439
1521
  presentCall: presentUnarchiveSessionCall,
1440
1522
  execute(args, exec) {
1441
1523
  return runTool(async () => {
1524
+ assertKnownArguments(args, TOOL_ARGUMENT_KEYS.devlead_unarchive_session);
1442
1525
  const agent = requireAgent(exec.agent, "devlead_unarchive_session");
1443
1526
  const unarchived = await ctx.devLead.unarchiveSession(
1444
1527
  agent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yankeguo/dsh-tool-devlead",
3
- "version": "0.3.0-rc.1",
3
+ "version": "0.3.0-rc.2",
4
4
  "description": "Model-facing DevLead tools: register and list DSH Workspaces, create and steer ordinary Sessions, read session status, watch state changes, and read the lead's notification feed.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -11,6 +11,7 @@
11
11
  "./package.json": "./package.json"
12
12
  },
13
13
  "files": [
14
+ "LICENSE",
14
15
  "lib",
15
16
  "locale/*.json",
16
17
  "README.md"
@@ -25,8 +26,8 @@
25
26
  "@deepseek-ai/schemastery": "~3.19.0"
26
27
  },
27
28
  "dependencies": {
28
- "@yankeguo/dsh-devlead": "0.3.0-rc.1",
29
- "@yankeguo/dsh-devlead-protocol": "0.3.0-rc.1"
29
+ "@yankeguo/dsh-devlead": "0.3.0-rc.2",
30
+ "@yankeguo/dsh-devlead-protocol": "0.3.0-rc.2"
30
31
  },
31
32
  "engines": {
32
33
  "dsh": ">=0.2.2-rc.1 <0.3.0"