@rallycry/conveyor-agent 11.1.12 → 11.1.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/{chunk-5VXHCD4V.js → chunk-UQ6RRH4Y.js} +1 -1
- package/dist/{chunk-HF4HW4LR.js → chunk-VRHVMKIK.js} +184 -14
- package/dist/{chunk-F3OXRZBO.js → chunk-XSJCJGQZ.js} +6774 -6575
- package/dist/cli.js +4 -4
- package/dist/index.js +2 -2
- package/dist/{serve-boot-4YQ6JVKU.js → serve-boot-X3N62MJB.js} +2 -2
- package/package.json +1 -1
- package/skills/conveyor-consensus/SKILL.md +1 -1
- package/skills/conveyor-local-loop/SKILL.md +6 -3
- package/skills/conveyor-manager/SKILL.md +261 -0
- package/skills/conveyor-manager/references/briefs.md +155 -0
- package/skills/conveyor-manager/references/charter.md +150 -0
- package/skills/conveyor-manager/references/landing.md +111 -0
- package/skills/conveyor-manager/references/lanes.md +211 -0
- package/skills/conveyor-manager/references/owner.md +114 -0
- package/skills/conveyor-manager/references/recovery.md +122 -0
- package/skills/conveyor-plan/references/plan-format.md +4 -0
- package/skills/conveyor-prune/SKILL.md +4 -1
- package/skills/conveyor-start/SKILL.md +9 -2
- package/skills/conveyor-workflows/SKILL.md +5 -1
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
BRAINSTORM_TOOL_LIST_DEFAULT,
|
|
42
42
|
BRAINSTORM_TOOL_LIST_MAX,
|
|
43
43
|
CARD_DESCRIPTION_FIELD_HINT,
|
|
44
|
+
CARD_DESCRIPTION_MAX,
|
|
44
45
|
CONTEXT_LINK_LOCATOR_MAX,
|
|
45
46
|
CRITICAL_AUTOMATED_SOURCES,
|
|
46
47
|
DEFAULT_CI_WAIT_TIMEOUT_MINUTES,
|
|
@@ -106,7 +107,7 @@ import {
|
|
|
106
107
|
toMemberMentionRows,
|
|
107
108
|
updateRemoteToken,
|
|
108
109
|
verifyGitCredential
|
|
109
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-XSJCJGQZ.js";
|
|
110
111
|
import {
|
|
111
112
|
reportBootMilestone
|
|
112
113
|
} from "./chunk-74BAVQKD.js";
|
|
@@ -7580,8 +7581,17 @@ function compileShape(z11, fields) {
|
|
|
7580
7581
|
function defineToolContract(contract) {
|
|
7581
7582
|
return contract;
|
|
7582
7583
|
}
|
|
7584
|
+
function defineMcpToolContract(contract) {
|
|
7585
|
+
return contract;
|
|
7586
|
+
}
|
|
7583
7587
|
var mcpProjectId = f.optional(f.string({ desc: "Target Conveyor project ID" }));
|
|
7584
7588
|
var cardDescriptionDesc = (lead) => `${lead} \u2014 ${CARD_DESCRIPTION_FIELD_HINT}`;
|
|
7589
|
+
var mcpCardDescription = (lead) => f.optional(f.string({ desc: cardDescriptionDesc(lead), max: CARD_DESCRIPTION_MAX }));
|
|
7590
|
+
var mcpTextPath = (field, what) => f.optional(
|
|
7591
|
+
f.string({
|
|
7592
|
+
desc: `Absolute path to a local file holding the ${what}, read by the MCP server, instead of \`${field}\`: pass one of the two. At most 256 KB, UTF-8, not empty. The result ends with the sent text's length and sha256.`
|
|
7593
|
+
})
|
|
7594
|
+
);
|
|
7585
7595
|
var storyPointValueDesc = "Story point value (1=Common, 2=Magic, 3=Rare, 5=Unique)";
|
|
7586
7596
|
var priorityValueDesc = "Priority value from manage_priorities list (1 = the project's highest level; seeded defaults are 1=High, 2=Medium, 3=Low)";
|
|
7587
7597
|
var MENTION_HOW = "To mention a teammate, write @[user:<name, email or user id>]; list_project_members gives exact tokens.";
|
|
@@ -7624,7 +7634,12 @@ var getTaskContract = defineToolContract({
|
|
|
7624
7634
|
// project, where a bare slug already resolves, so the `agent` half of
|
|
7625
7635
|
// this contract deliberately says nothing about it.
|
|
7626
7636
|
desc: "The task ID or slug (the value in a card URL, /cards/<slug>), or a path-form reference '<project-slug>/<card-slug>' from the board's Copy path action"
|
|
7627
|
-
})
|
|
7637
|
+
}),
|
|
7638
|
+
view: f.optional(
|
|
7639
|
+
f.enum(["full", "plan", "summary"], {
|
|
7640
|
+
desc: '"full" (default) is the whole card. "plan" leaves out the chat messages; "summary" leaves out the chat messages and the plan.'
|
|
7641
|
+
})
|
|
7642
|
+
)
|
|
7628
7643
|
}
|
|
7629
7644
|
}
|
|
7630
7645
|
});
|
|
@@ -7663,7 +7678,8 @@ var postToChatContract = defineToolContract({
|
|
|
7663
7678
|
f.string({
|
|
7664
7679
|
desc: "Alias of `content` (the in-pod agent surface names this field `message`). Provide exactly one of the two."
|
|
7665
7680
|
})
|
|
7666
|
-
)
|
|
7681
|
+
),
|
|
7682
|
+
contentPath: mcpTextPath("content", "message")
|
|
7667
7683
|
}
|
|
7668
7684
|
}
|
|
7669
7685
|
});
|
|
@@ -7685,7 +7701,16 @@ var readTaskChatContract = defineToolContract({
|
|
|
7685
7701
|
fields: {
|
|
7686
7702
|
projectId: mcpProjectId,
|
|
7687
7703
|
taskId: f.string({ desc: "The task ID" }),
|
|
7688
|
-
limit: f.optional(f.number({ desc: "Max messages to return (default 50)" }))
|
|
7704
|
+
limit: f.optional(f.number({ desc: "Max messages to return (default 50, at most 200)" })),
|
|
7705
|
+
before: f.optional(
|
|
7706
|
+
f.string({
|
|
7707
|
+
desc: "Only messages older than this message id or ISO time: pass the first message's id to page back"
|
|
7708
|
+
})
|
|
7709
|
+
),
|
|
7710
|
+
messageId: f.optional(f.string({ desc: "Read exactly this message, whole" })),
|
|
7711
|
+
full: f.optional(
|
|
7712
|
+
f.boolean({ desc: "Return each message whole instead of cut at 2,000 characters" })
|
|
7713
|
+
)
|
|
7689
7714
|
}
|
|
7690
7715
|
}
|
|
7691
7716
|
});
|
|
@@ -7847,8 +7872,9 @@ var updateTaskContract = defineToolContract({
|
|
|
7847
7872
|
projectId: mcpProjectId,
|
|
7848
7873
|
taskId: f.string({ desc: "The task ID" }),
|
|
7849
7874
|
title: f.optional(f.string({ desc: "New title" })),
|
|
7850
|
-
description:
|
|
7875
|
+
description: mcpCardDescription("New description"),
|
|
7851
7876
|
plan: f.optional(f.string({ desc: "New plan (markdown)" })),
|
|
7877
|
+
planPath: mcpTextPath("plan", "new plan (markdown)"),
|
|
7852
7878
|
status: f.optional(f.enum(STATUS_ENUM, { desc: "New status" })),
|
|
7853
7879
|
risk: f.optional(
|
|
7854
7880
|
f.nullable(
|
|
@@ -8204,8 +8230,9 @@ var createSubtaskContract = defineToolContract({
|
|
|
8204
8230
|
projectId: mcpProjectId,
|
|
8205
8231
|
parentTaskId: f.string({ desc: "The parent task ID" }),
|
|
8206
8232
|
title: f.string({ desc: "Subtask title" }),
|
|
8207
|
-
description:
|
|
8233
|
+
description: mcpCardDescription("Subtask description"),
|
|
8208
8234
|
plan: f.optional(f.string({ desc: "Subtask implementation plan (markdown)" })),
|
|
8235
|
+
planPath: mcpTextPath("plan", "subtask's plan (markdown)"),
|
|
8209
8236
|
ordinal: f.optional(f.number({ desc: "Ordering position among siblings" })),
|
|
8210
8237
|
storyPointValue: f.optional(f.number({ desc: SP_DESCRIPTION })),
|
|
8211
8238
|
followParentStatus: f.optional(f.boolean({ desc: MCP_FOLLOW_PARENT_STATUS })),
|
|
@@ -8257,8 +8284,9 @@ var updateSubtaskContract = defineToolContract({
|
|
|
8257
8284
|
projectId: mcpProjectId,
|
|
8258
8285
|
subtaskId: f.string({ desc: "The subtask ID" }),
|
|
8259
8286
|
title: f.optional(f.string({ desc: "New title" })),
|
|
8260
|
-
description:
|
|
8287
|
+
description: mcpCardDescription("New description"),
|
|
8261
8288
|
plan: f.optional(f.string({ desc: "New plan (markdown)" })),
|
|
8289
|
+
planPath: mcpTextPath("plan", "new plan (markdown)"),
|
|
8262
8290
|
status: f.optional(f.enum(MCP_STATUS_ENUM, { desc: "New status" })),
|
|
8263
8291
|
ordinal: f.optional(f.number({ desc: "New ordering position among siblings" })),
|
|
8264
8292
|
storyPointValue: f.optional(f.number({ desc: SP_DESCRIPTION })),
|
|
@@ -8300,10 +8328,13 @@ var listSubtasksContract = defineToolContract({
|
|
|
8300
8328
|
}
|
|
8301
8329
|
},
|
|
8302
8330
|
mcp: {
|
|
8303
|
-
description: "List all subtasks of a parent task with their status and ordering. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
8331
|
+
description: "List all subtasks of a parent task with their status and ordering. Rows are summaries: each says whether the subtask has a plan (hasPlan), its story points and branch, and its dependencies; get_task reads one subtask's plan. Pass includePlans to get every plan inline (large on a big pack). Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
8304
8332
|
fields: {
|
|
8305
8333
|
projectId: mcpProjectId,
|
|
8306
|
-
taskId: f.string({ desc: "The parent task ID" })
|
|
8334
|
+
taskId: f.string({ desc: "The parent task ID" }),
|
|
8335
|
+
includePlans: f.optional(
|
|
8336
|
+
f.boolean({ desc: "Include each subtask's plan text. Default: summaries only." })
|
|
8337
|
+
)
|
|
8307
8338
|
}
|
|
8308
8339
|
}
|
|
8309
8340
|
});
|
|
@@ -8876,6 +8907,7 @@ var pullRequestContracts = [createPullRequestContract];
|
|
|
8876
8907
|
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.";
|
|
8877
8908
|
var NO_STORAGE = "Messages are fetched live from Slack/Discord on every call and are never stored by Conveyor.";
|
|
8878
8909
|
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.";
|
|
8910
|
+
var READ_FILES = "A message with attachments lists them in `files` (fileId, name, type, size); open one with get_channel_file, passing the message's `id` and `threadTs`. A file whose `unavailable` is set cannot be opened, and the value says why.";
|
|
8879
8911
|
var listProjectIntegrationsContract = defineToolContract({
|
|
8880
8912
|
name: "list_project_integrations",
|
|
8881
8913
|
agent: {
|
|
@@ -8906,11 +8938,11 @@ var CHANNEL_ID_DESC = "Provider channel id, exactly as list_project_channels rep
|
|
|
8906
8938
|
var LIMIT_DESC = "How many messages to return, newest first. Defaults to 25, maximum 50. Prefer a small read plus a follow-up over one large one \u2014 channel history spends context fast.";
|
|
8907
8939
|
var BEFORE_DESC = "Page further back: return messages older than this cursor. Pass the `olderCursor` from a previous call; a null cursor there means you have reached the start of the channel.";
|
|
8908
8940
|
var AFTER_DESC = "Return only messages newer than this cursor. Use to catch up on a channel.";
|
|
8909
|
-
var THREAD_DESC = "Read one thread instead of the channel surface. Pass
|
|
8941
|
+
var THREAD_DESC = "Read one thread instead of the channel surface. Pass the `threadTs` a previous read reported on a message: the thread that message lives in, or the one it started.";
|
|
8910
8942
|
var readChannelMessagesContract = defineToolContract({
|
|
8911
8943
|
name: "read_channel_messages",
|
|
8912
8944
|
agent: {
|
|
8913
|
-
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}`,
|
|
8945
|
+
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} ${READ_FILES} ${REGISTRY_RULE} ${NO_STORAGE}`,
|
|
8914
8946
|
fields: {
|
|
8915
8947
|
channelId: f.string({ desc: CHANNEL_ID_DESC }),
|
|
8916
8948
|
limit: f.optional(f.number({ desc: LIMIT_DESC, int: true, min: 1, max: 50 })),
|
|
@@ -8920,7 +8952,7 @@ var readChannelMessagesContract = defineToolContract({
|
|
|
8920
8952
|
}
|
|
8921
8953
|
},
|
|
8922
8954
|
mcp: {
|
|
8923
|
-
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.`,
|
|
8955
|
+
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} ${READ_FILES} ${REGISTRY_RULE} ${NO_STORAGE} Pass projectId to target a specific project; otherwise the configured default project is used.`,
|
|
8924
8956
|
fields: {
|
|
8925
8957
|
projectId: mcpProjectId,
|
|
8926
8958
|
channelId: f.string({ desc: CHANNEL_ID_DESC }),
|
|
@@ -8931,6 +8963,32 @@ var readChannelMessagesContract = defineToolContract({
|
|
|
8931
8963
|
}
|
|
8932
8964
|
}
|
|
8933
8965
|
});
|
|
8966
|
+
var FILE_MESSAGE_DESC = "The `id` of the message the file is attached to, exactly as read_channel_messages reported it.";
|
|
8967
|
+
var FILE_ID_DESC = "The file's `fileId` from that message's `files` list.";
|
|
8968
|
+
var FILE_THREAD_DESC = "The message's `threadTs`, exactly as read_channel_messages reported it. Pass it whenever the message had one: a file on a thread reply cannot be found without it.";
|
|
8969
|
+
var FILE_RULES = "Reading must be enabled for the channel: the same grant read_channel_messages needs. A file whose `unavailable` was set on the read cannot be opened (a canvas, an external link, a deleted or hidden file, or one over 25 MB). The file is fetched live from Slack/Discord on every call and Conveyor never stores it.";
|
|
8970
|
+
var getChannelFileContract = defineToolContract({
|
|
8971
|
+
name: "get_channel_file",
|
|
8972
|
+
agent: {
|
|
8973
|
+
description: `Open a file attached to a message in a registered work channel \u2014 a PDF, a screenshot, a log a teammate shared \u2014 after read_channel_messages listed it in the message's \`files\`. The file is saved into this workspace and the tool returns its path: open it with the Read tool (images and PDFs render there) or process it with Bash. ${FILE_RULES} ${REGISTRY_RULE}`,
|
|
8974
|
+
fields: {
|
|
8975
|
+
channelId: f.string({ desc: CHANNEL_ID_DESC, min: 1, max: 100 }),
|
|
8976
|
+
messageId: f.string({ desc: FILE_MESSAGE_DESC, min: 1, max: 100 }),
|
|
8977
|
+
fileId: f.string({ desc: FILE_ID_DESC, min: 1, max: 100 }),
|
|
8978
|
+
threadTs: f.optional(f.string({ desc: FILE_THREAD_DESC, max: 100 }))
|
|
8979
|
+
}
|
|
8980
|
+
},
|
|
8981
|
+
mcp: {
|
|
8982
|
+
description: `Download a file attached to a message in a project's registered work channel, after read_channel_messages listed it in the message's \`files\`. The file is saved under the system temp directory and the result names its path; a small image is also shown inline, and a small text file is inlined. ${FILE_RULES} ${REGISTRY_RULE} Pass projectId to target a specific project; otherwise the configured default project is used.`,
|
|
8983
|
+
fields: {
|
|
8984
|
+
projectId: mcpProjectId,
|
|
8985
|
+
channelId: f.string({ desc: CHANNEL_ID_DESC, min: 1, max: 100 }),
|
|
8986
|
+
messageId: f.string({ desc: FILE_MESSAGE_DESC, min: 1, max: 100 }),
|
|
8987
|
+
fileId: f.string({ desc: FILE_ID_DESC, min: 1, max: 100 }),
|
|
8988
|
+
threadTs: f.optional(f.string({ desc: FILE_THREAD_DESC, max: 100 }))
|
|
8989
|
+
}
|
|
8990
|
+
}
|
|
8991
|
+
});
|
|
8934
8992
|
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.`;
|
|
8935
8993
|
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.";
|
|
8936
8994
|
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.";
|
|
@@ -8979,6 +9037,7 @@ var integrationsContracts = [
|
|
|
8979
9037
|
listProjectIntegrationsContract,
|
|
8980
9038
|
listProjectChannelsContract,
|
|
8981
9039
|
readChannelMessagesContract,
|
|
9040
|
+
getChannelFileContract,
|
|
8982
9041
|
postChannelMessageContract,
|
|
8983
9042
|
getAnalyticsSummaryContract
|
|
8984
9043
|
];
|
|
@@ -9735,14 +9794,14 @@ var listSiteAssetTargetsContract = defineToolContract({
|
|
|
9735
9794
|
var uploadSiteAssetsContract = defineToolContract({
|
|
9736
9795
|
name: "upload_site_assets",
|
|
9737
9796
|
agent: {
|
|
9738
|
-
description: "Upload up to 50 workspace image or
|
|
9797
|
+
description: "Upload up to 50 workspace image, video or PDF files (25 MiB each) to a registered site using Conveyor identity. Call list_site_asset_targets first for the registered siteId. Returns verified immutable keys and public URLs per file.",
|
|
9739
9798
|
fields: {
|
|
9740
9799
|
siteId: f.string({ min: 1, max: 100 }),
|
|
9741
9800
|
paths: f.array(f.string({ min: 1 }), { min: 1, max: 50 })
|
|
9742
9801
|
}
|
|
9743
9802
|
},
|
|
9744
9803
|
mcp: {
|
|
9745
|
-
description: "Upload up to 50 workspace image or
|
|
9804
|
+
description: "Upload up to 50 workspace image, video or PDF files (25 MiB each) to a registered site using Conveyor identity. Call list_site_asset_targets first for the registered siteId. Returns verified immutable keys and public URLs per file.",
|
|
9746
9805
|
fields: {
|
|
9747
9806
|
projectId: mcpProjectId,
|
|
9748
9807
|
siteId: f.string({ min: 1, max: 100 }),
|
|
@@ -9824,6 +9883,76 @@ async function transferSiteAsset(capability, bytes, expected) {
|
|
|
9824
9883
|
status: put.status === 201 ? "uploaded" : "existing"
|
|
9825
9884
|
};
|
|
9826
9885
|
}
|
|
9886
|
+
var TASK_ID = f.string({ desc: "The task ID" });
|
|
9887
|
+
var messageAgentContract = defineMcpToolContract({
|
|
9888
|
+
name: "message_agent",
|
|
9889
|
+
mcp: {
|
|
9890
|
+
description: "Send a message to a card's agent and wake it. The message is stored in the card's chat as post_to_chat stores it, then delivered: to the live agent at once, or to its slept environment, which wakes on your account and reads it. It never boots a card that has no environment (start_task does that), and it wakes nothing while a code review runs on the card or when the card's builder did not push its pull request. Use post_to_chat to leave a note without waking anything. Pass interrupt to reach a busy agent in its running turn instead of after it. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
9891
|
+
fields: {
|
|
9892
|
+
projectId: mcpProjectId,
|
|
9893
|
+
taskId: TASK_ID,
|
|
9894
|
+
content: f.string({
|
|
9895
|
+
desc: "The message. Mention people as @[user:<name, email or id>].",
|
|
9896
|
+
min: 1
|
|
9897
|
+
}),
|
|
9898
|
+
interrupt: f.optional(
|
|
9899
|
+
f.boolean({ desc: "Deliver into the agent's running turn rather than after it." })
|
|
9900
|
+
)
|
|
9901
|
+
}
|
|
9902
|
+
}
|
|
9903
|
+
});
|
|
9904
|
+
var answerAgentQuestionContract = defineMcpToolContract({
|
|
9905
|
+
name: "answer_agent_question",
|
|
9906
|
+
mcp: {
|
|
9907
|
+
description: `Answer the question a card's agent is blocked on. The open question is the card's chat message whose metadata.type is "agent_question" (read_task_chat shows it): its metadata carries the requestId and each question with its options. The answers post as your chat message and reach the agent, waking its environment if it slept. A question answered already is refused. For anything that is not an answer, use message_agent.`,
|
|
9908
|
+
fields: {
|
|
9909
|
+
taskId: TASK_ID,
|
|
9910
|
+
requestId: f.string({ desc: "The requestId in the agent_question message's metadata" }),
|
|
9911
|
+
answers: f.array(
|
|
9912
|
+
f.object({
|
|
9913
|
+
question: f.string({ desc: "The question's exact text: its `question` field" }),
|
|
9914
|
+
answer: f.string({ desc: "The chosen option's label, or your own words" })
|
|
9915
|
+
}),
|
|
9916
|
+
{ desc: "One answer per question", min: 1 }
|
|
9917
|
+
)
|
|
9918
|
+
}
|
|
9919
|
+
}
|
|
9920
|
+
});
|
|
9921
|
+
var agentMessagingContracts = [
|
|
9922
|
+
messageAgentContract,
|
|
9923
|
+
answerAgentQuestionContract
|
|
9924
|
+
];
|
|
9925
|
+
var getBoardDigestContract = defineMcpToolContract({
|
|
9926
|
+
name: "get_board_digest",
|
|
9927
|
+
mcp: {
|
|
9928
|
+
description: "Read the whole board in one call: every card in Planning, Open, InProgress or ReviewPR, plus any card that is new, moved, merged or got a person's post since `since`, each with its pull request, pod, agent, review and open-question signals; the card counts per status; the project's review mode, auto-merge, open pull request limit and idle window; and your free pod slots. Pass the previous read's `asOf` as `since` to see only what changed. Returns compact text, about one line a card; format \"json\" returns the rows, about 1 KB a card, so pair it with a small limit. A change from up to two minutes before since can show again. Pass projectId to target a specific project; otherwise the configured default project is used.",
|
|
9929
|
+
fields: {
|
|
9930
|
+
projectId: mcpProjectId,
|
|
9931
|
+
since: f.optional(
|
|
9932
|
+
f.string({
|
|
9933
|
+
desc: "An ISO time, usually the previous digest's asOf: what changed after it"
|
|
9934
|
+
})
|
|
9935
|
+
),
|
|
9936
|
+
scope: f.optional(
|
|
9937
|
+
f.enum(["all", "mine"], {
|
|
9938
|
+
desc: '"mine": only cards you created or are assigned. Default "all"'
|
|
9939
|
+
})
|
|
9940
|
+
),
|
|
9941
|
+
format: f.optional(
|
|
9942
|
+
f.enum(["text", "json"], { desc: "Compact text (default) or the JSON rows" })
|
|
9943
|
+
),
|
|
9944
|
+
limit: f.optional(
|
|
9945
|
+
f.number({
|
|
9946
|
+
desc: "At most this many cards (default 300, at most 500)",
|
|
9947
|
+
int: true,
|
|
9948
|
+
min: 1,
|
|
9949
|
+
max: 500
|
|
9950
|
+
})
|
|
9951
|
+
)
|
|
9952
|
+
}
|
|
9953
|
+
}
|
|
9954
|
+
});
|
|
9955
|
+
var boardContracts = [getBoardDigestContract];
|
|
9827
9956
|
var TOOL_CONTRACTS = Object.fromEntries(
|
|
9828
9957
|
[
|
|
9829
9958
|
...tasksContracts,
|
|
@@ -9849,6 +9978,9 @@ var TOOL_CONTRACTS = Object.fromEntries(
|
|
|
9849
9978
|
...siteAssetsContracts
|
|
9850
9979
|
].map((contract) => [contract.name, contract])
|
|
9851
9980
|
);
|
|
9981
|
+
var MCP_TOOL_CONTRACTS = Object.fromEntries(
|
|
9982
|
+
[...agentMessagingContracts, ...boardContracts].map((contract) => [contract.name, contract])
|
|
9983
|
+
);
|
|
9852
9984
|
|
|
9853
9985
|
// src/tools/contract-tool.ts
|
|
9854
9986
|
import { z as z3 } from "zod";
|
|
@@ -12116,6 +12248,43 @@ function buildReadChannelMessagesTool(connection, projectId) {
|
|
|
12116
12248
|
}
|
|
12117
12249
|
});
|
|
12118
12250
|
}
|
|
12251
|
+
function buildGetChannelFileTool(connection, projectId) {
|
|
12252
|
+
return defineContractTool(getChannelFileContract, async (input) => {
|
|
12253
|
+
let located;
|
|
12254
|
+
try {
|
|
12255
|
+
located = await connection.call("getChannelFile", {
|
|
12256
|
+
projectId,
|
|
12257
|
+
channelId: input.channelId,
|
|
12258
|
+
messageId: input.messageId,
|
|
12259
|
+
fileId: input.fileId,
|
|
12260
|
+
threadTs: input.threadTs
|
|
12261
|
+
});
|
|
12262
|
+
} catch (error) {
|
|
12263
|
+
return errText3("Failed to get the channel file", error);
|
|
12264
|
+
}
|
|
12265
|
+
const { agentDownloadUrl, ...shown } = located;
|
|
12266
|
+
const header = JSON.stringify(shown, null, 2);
|
|
12267
|
+
try {
|
|
12268
|
+
const saved = await saveAttachmentToDisk({
|
|
12269
|
+
url: agentDownloadUrl,
|
|
12270
|
+
fileId: `ch-${located.provider}-${located.file.fileId}`,
|
|
12271
|
+
fileName: located.file.name
|
|
12272
|
+
});
|
|
12273
|
+
return textResult(
|
|
12274
|
+
`${header}
|
|
12275
|
+
|
|
12276
|
+
Saved to ${saved.path} (${saved.bytes} bytes). Open it with the Read tool (images and PDFs render there; a PDF over 10 pages needs the pages parameter) or process it with Bash.`
|
|
12277
|
+
);
|
|
12278
|
+
} catch (error) {
|
|
12279
|
+
const code = error instanceof AttachmentSaveError ? error.code : "network";
|
|
12280
|
+
return textResult(
|
|
12281
|
+
`${header}
|
|
12282
|
+
|
|
12283
|
+
Could not save the file (${code}). Call get_channel_file again; each call mints a fresh 5-minute link.`
|
|
12284
|
+
);
|
|
12285
|
+
}
|
|
12286
|
+
});
|
|
12287
|
+
}
|
|
12119
12288
|
function buildPostChannelMessageTool(connection, projectId) {
|
|
12120
12289
|
return defineContractTool(postChannelMessageContract, async (input) => {
|
|
12121
12290
|
try {
|
|
@@ -12152,6 +12321,7 @@ function buildChannelTools(connection, projectId) {
|
|
|
12152
12321
|
return [
|
|
12153
12322
|
buildListProjectChannelsTool(connection, projectId),
|
|
12154
12323
|
buildReadChannelMessagesTool(connection, projectId),
|
|
12324
|
+
buildGetChannelFileTool(connection, projectId),
|
|
12155
12325
|
buildPostChannelMessageTool(connection, projectId)
|
|
12156
12326
|
];
|
|
12157
12327
|
}
|