@rallycry/conveyor-agent 11.1.5 → 11.1.6

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.
@@ -97,9 +97,10 @@ import {
97
97
  stageAndCommit,
98
98
  statWorkspacePath,
99
99
  subProjectScopePaths,
100
+ toMemberMentionRows,
100
101
  updateRemoteToken,
101
102
  verifyGitCredential
102
- } from "./chunk-TPOWIJ5P.js";
103
+ } from "./chunk-GNUXQJR6.js";
103
104
  import {
104
105
  reportBootMilestone
105
106
  } from "./chunk-VIUZS7V4.js";
@@ -118,7 +119,7 @@ import {
118
119
  import {
119
120
  LoopLagMonitor,
120
121
  loopStatusForRunnerStatus
121
- } from "./chunk-MILKMRPU.js";
122
+ } from "./chunk-PIHFGSXB.js";
122
123
  import {
123
124
  getWorkbenchClient
124
125
  } from "./chunk-SQM2BQ7H.js";
@@ -7142,6 +7143,7 @@ ${context.agentInstructions}`);
7142
7143
  `
7143
7144
  Your turn output appears ONLY in the live agent terminal \u2014 it is NOT posted to the task chat. The team does NOT see your replies unless you post them.`,
7144
7145
  `Use post_to_chat (omit task_id \u2192 your own task's chat) to share meaningful status as you work, a summary when you finish, and any blocker or question you need a human to answer.`,
7146
+ `To loop in a specific teammate, mention them in post_to_chat as @[user:<name, email or user id>]; list_project_members gives exact tokens. A mention pings that person in Slack/Discord and in Conveyor, so use it only when you need them. Never write raw Slack IDs.`,
7145
7147
  `A question you need answered goes through AskUserQuestion \u2014 that is what pages a person. post_to_chat with milestone: "blocked" records that you are parked and does not page anyone.`,
7146
7148
  `Pass task_id only to reach a DIFFERENT card: a child task's chat on post_to_chat and read_task_chat, or any card in this project's files on list_task_files and get_attachment (a pack parent's source documents, for example). Omit it for your own card.`,
7147
7149
  `Use read_task_chat only if you need to re-read earlier messages beyond the chat context above.`,
@@ -7537,6 +7539,29 @@ var mcpProjectId = f.optional(f.string({ desc: "Target Conveyor project ID" }));
7537
7539
  var cardDescriptionDesc = (lead) => `${lead} \u2014 ${CARD_DESCRIPTION_FIELD_HINT}`;
7538
7540
  var storyPointValueDesc = "Story point value (1=Common, 2=Magic, 3=Rare, 5=Unique)";
7539
7541
  var priorityValueDesc = "Priority value from manage_priorities list (1 = the project's highest level; seeded defaults are 1=High, 2=Medium, 3=Low)";
7542
+ var MENTION_HOW = "To mention a teammate, write @[user:<name, email or user id>]; list_project_members gives exact tokens.";
7543
+ var MENTION_STRICT = "A name that matches nobody, or several people, fails the post with suggestions. Never write raw Slack or Discord IDs (<@U\u2026>).";
7544
+ var CHAT_MENTION_GUIDANCE = `${MENTION_HOW} Conveyor turns it into a real Slack/Discord mention plus an in-app alert. ${MENTION_STRICT}`;
7545
+ var CHANNEL_MENTION_GUIDANCE = `${MENTION_HOW} Conveyor turns it into a real Slack/Discord mention. ${MENTION_STRICT}`;
7546
+ var MEMBERS_DESCRIPTION = "List this project's members, the people you can mention, assign, or add as reviewer. Each row has userId, name, email, access level, and a ready-to-paste `mention` token (@[user:<id>]). Pass query to filter by name or email.";
7547
+ var QUERY_DESC = "Keep only members whose name or email contains this text, case-insensitively. Omit to list everyone.";
7548
+ var listProjectMembersContract = defineToolContract({
7549
+ name: "list_project_members",
7550
+ agent: {
7551
+ description: MEMBERS_DESCRIPTION,
7552
+ fields: {
7553
+ query: f.optional(f.string({ desc: QUERY_DESC, max: 100 }))
7554
+ }
7555
+ },
7556
+ mcp: {
7557
+ description: `${MEMBERS_DESCRIPTION} Pass projectId to target a specific project; otherwise the configured default project is used.`,
7558
+ fields: {
7559
+ projectId: mcpProjectId,
7560
+ query: f.optional(f.string({ desc: QUERY_DESC, max: 100 }))
7561
+ }
7562
+ }
7563
+ });
7564
+ var membersContracts = [listProjectMembersContract];
7540
7565
  var getTaskContract = defineToolContract({
7541
7566
  name: "get_task",
7542
7567
  agent: {
@@ -7563,7 +7588,9 @@ var postToChatContract = defineToolContract({
7563
7588
  agent: {
7564
7589
  description: "Post a message to the task chat for the team to see. Your turn output is NOT shown in chat, so this is the only way the team sees your status, summaries, and questions. Omit task_id to post to the current task's chat; pass a child's ID to message its chat.",
7565
7590
  fields: {
7566
- message: f.optional(f.string({ desc: "The message to post to the team" })),
7591
+ message: f.optional(
7592
+ f.string({ desc: `The message to post to the team. ${CHAT_MENTION_GUIDANCE}` })
7593
+ ),
7567
7594
  content: f.optional(
7568
7595
  f.string({
7569
7596
  desc: "Alias of `message` (the external conveyor-mcp surface names this field `content`). Provide exactly one of the two."
@@ -7586,7 +7613,7 @@ var postToChatContract = defineToolContract({
7586
7613
  fields: {
7587
7614
  projectId: mcpProjectId,
7588
7615
  taskId: f.string({ desc: "The task ID" }),
7589
- content: f.optional(f.string({ desc: "Message content" })),
7616
+ content: f.optional(f.string({ desc: `Message content. ${CHAT_MENTION_GUIDANCE}` })),
7590
7617
  message: f.optional(
7591
7618
  f.string({
7592
7619
  desc: "Alias of `content` (the in-pod agent surface names this field `message`). Provide exactly one of the two."
@@ -8803,6 +8830,7 @@ var createPullRequestContract = defineToolContract({
8803
8830
  var pullRequestContracts = [createPullRequestContract];
8804
8831
  var REGISTRY_RULE = "Only channels an admin registered as work channels in project settings are reachable \u2014 an unregistered channel is invisible here no matter what the bot can see in the workspace, and the card-sync channels are NOT automatically included.";
8805
8832
  var NO_STORAGE = "Messages are fetched live from Slack/Discord on every call and are never stored by Conveyor.";
8833
+ var READ_MENTIONS = "People who are Conveyor users appear in `text` as @[user:<id>] tokens instead of raw Slack or Discord ids, and `authorMention` is the author's token when the author is one. Reuse those tokens to mention people back.";
8806
8834
  var listProjectIntegrationsContract = defineToolContract({
8807
8835
  name: "list_project_integrations",
8808
8836
  agent: {
@@ -8837,7 +8865,7 @@ var THREAD_DESC = "Read one thread instead of the channel surface. Pass a `threa
8837
8865
  var readChannelMessagesContract = defineToolContract({
8838
8866
  name: "read_channel_messages",
8839
8867
  agent: {
8840
- description: `Read recent messages from a registered work channel, newest first \u2014 to catch up on a discussion, find the context behind a decision, or check whether something was already raised. Each message reports its author, whether that author is a bot (Conveyor's own card feed posts show up here too, so check this before treating a message as a teammate's), its text, and a cursor for paging further back. ${REGISTRY_RULE} ${NO_STORAGE}`,
8868
+ description: `Read recent messages from a registered work channel, newest first \u2014 to catch up on a discussion, find the context behind a decision, or check whether something was already raised. Each message reports its author, whether that author is a bot (Conveyor's own card feed posts show up here too, so check this before treating a message as a teammate's), its text, and a cursor for paging further back. ${READ_MENTIONS} ${REGISTRY_RULE} ${NO_STORAGE}`,
8841
8869
  fields: {
8842
8870
  channelId: f.string({ desc: CHANNEL_ID_DESC }),
8843
8871
  limit: f.optional(f.number({ desc: LIMIT_DESC, int: true, min: 1, max: 50 })),
@@ -8847,7 +8875,7 @@ var readChannelMessagesContract = defineToolContract({
8847
8875
  }
8848
8876
  },
8849
8877
  mcp: {
8850
- description: `Read recent messages from a project's registered work channel, newest first. Each message carries author name, a bot flag, text, a provider-native cursor, and a timestamp; the response carries an olderCursor for paging back. ${REGISTRY_RULE} ${NO_STORAGE} Pass projectId to target a specific project; otherwise the configured default project is used.`,
8878
+ description: `Read recent messages from a project's registered work channel, newest first. Each message carries author name, a bot flag, text, a provider-native cursor, and a timestamp; the response carries an olderCursor for paging back. ${READ_MENTIONS} ${REGISTRY_RULE} ${NO_STORAGE} Pass projectId to target a specific project; otherwise the configured default project is used.`,
8851
8879
  fields: {
8852
8880
  projectId: mcpProjectId,
8853
8881
  channelId: f.string({ desc: CHANNEL_ID_DESC }),
@@ -8858,7 +8886,7 @@ var readChannelMessagesContract = defineToolContract({
8858
8886
  }
8859
8887
  }
8860
8888
  });
8861
- var POST_TEXT_DESC = "What to say, in plain text or light markdown. An attribution footer naming you is appended automatically, so do not sign the message yourself. Channel-wide pings (@everyone, @here, <!channel>) are rendered as ordinary text and will not notify anyone.";
8889
+ var POST_TEXT_DESC = `What to say, in plain text or light markdown. An attribution footer naming you is appended automatically, so do not sign the message yourself. ${CHANNEL_MENTION_GUIDANCE} Channel-wide and group pings (@everyone, @here, <!channel>, <!subteam^\u2026>) are rendered as ordinary text and will not notify anyone.`;
8862
8890
  var POST_THREAD_DESC = "Reply inside a thread rather than to the channel. Prefer this when responding to a specific message \u2014 pass the `threadTs` from the message you are answering.";
8863
8891
  var POST_WARNING = "This is visible to everyone in the channel and cannot be edited or deleted afterwards. Posting requires a per-channel grant that is OFF by default, separate from read access, so most registered channels will refuse it.";
8864
8892
  var postChannelMessageContract = defineToolContract({
@@ -9670,6 +9698,7 @@ var TOOL_CONTRACTS = Object.fromEntries(
9670
9698
  ...decisionsContracts,
9671
9699
  ...pullRequestContracts,
9672
9700
  ...integrationsContracts,
9701
+ ...membersContracts,
9673
9702
  ...driveContracts,
9674
9703
  ...meetingsContracts,
9675
9704
  ...logsContracts,
@@ -10231,6 +10260,7 @@ function buildPostToChatTool(connection) {
10231
10260
  await connection.call("postToChat", { message: text, milestone });
10232
10261
  return textResult(JSON.stringify({ posted: true }));
10233
10262
  } catch (error) {
10263
+ if (!task_id) connection.untrackRecentMessage(text);
10234
10264
  return textResult(
10235
10265
  `Failed to post message: ${error instanceof Error ? error.message : "Unknown error"}`
10236
10266
  );
@@ -11891,6 +11921,22 @@ function buildListProjectIntegrationsTool(connection, projectId) {
11891
11921
  }
11892
11922
  });
11893
11923
  }
11924
+ function buildListProjectMembersTool(connection, projectId) {
11925
+ return defineContractTool(listProjectMembersContract, async (input) => {
11926
+ try {
11927
+ const members = await connection.call("listProjectMembers", { projectId });
11928
+ const rows = toMemberMentionRows(members, input.query);
11929
+ if (rows.length === 0 && input.query) {
11930
+ return textResult(
11931
+ `No member's name or email contains "${input.query}". Call list_project_members without a query to see everyone you can mention.`
11932
+ );
11933
+ }
11934
+ return textResult(JSON.stringify(rows, null, 2));
11935
+ } catch (error) {
11936
+ return errText3("Failed to list project members", error);
11937
+ }
11938
+ });
11939
+ }
11894
11940
  function buildListProjectChannelsTool(connection, projectId) {
11895
11941
  return defineContractTool(listProjectChannelsContract, async () => {
11896
11942
  try {
@@ -12402,6 +12448,7 @@ function connectedToolsFor(connection, context, config) {
12402
12448
  return [
12403
12449
  ...context.googleDriveConnected ? buildDriveTools(connection, projectId) : [],
12404
12450
  buildListProjectIntegrationsTool(connection, projectId),
12451
+ buildListProjectMembersTool(connection, projectId),
12405
12452
  ...context.chatChannelsConfigured ? buildChannelTools(connection, projectId) : [],
12406
12453
  ...context.meetingsAvailable ? buildMeetingTools(connection, projectId) : [],
12407
12454
  // Always available: the decision tables exist on every project, and a fork