@tempo-ai/mcp 0.0.105-staging.2 → 0.0.105

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/bin.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { createRequire as __tempoCreateRequire } from 'node:module'; const require = __tempoCreateRequire(import.meta.url);
3
3
  import {
4
4
  run
5
- } from "./chunk-TK5FCMCH.js";
5
+ } from "./chunk-DBGXBZSQ.js";
6
6
  import "./chunk-KFUOQZBJ.js";
7
7
 
8
8
  // src/bin.ts
@@ -8,7 +8,7 @@ import {
8
8
  import { Client } from "@modelcontextprotocol/sdk/client/index.js";
9
9
  import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
10
10
  async function connectAggregate(options) {
11
- const { createTempoAggregate } = await import("./serve-AGHNN3WQ.js");
11
+ const { createTempoAggregate } = await import("./serve-E62XRLQQ.js");
12
12
  const handle = await createTempoAggregate(options);
13
13
  const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
14
14
  const client = new Client({ name: "tempo-mcp-cli", version: "0" });
@@ -127,4 +127,4 @@ export {
127
127
  runCall,
128
128
  runTools
129
129
  };
130
- //# sourceMappingURL=call-O6MXQFN2.js.map
130
+ //# sourceMappingURL=call-BE2JZROL.js.map
@@ -157,7 +157,7 @@ async function run(argv) {
157
157
  process.stderr.write(USAGE);
158
158
  return 1;
159
159
  }
160
- const { runServe } = await import("./serve-AGHNN3WQ.js");
160
+ const { runServe } = await import("./serve-E62XRLQQ.js");
161
161
  return await runServe(options);
162
162
  }
163
163
  switch (subcommand) {
@@ -172,11 +172,11 @@ async function run(argv) {
172
172
  return await runToken(rest);
173
173
  }
174
174
  case "tools": {
175
- const { runTools } = await import("./call-O6MXQFN2.js");
175
+ const { runTools } = await import("./call-BE2JZROL.js");
176
176
  return await runTools(rest);
177
177
  }
178
178
  case "call": {
179
- const { runCall } = await import("./call-O6MXQFN2.js");
179
+ const { runCall } = await import("./call-BE2JZROL.js");
180
180
  return await runCall(rest);
181
181
  }
182
182
  default:
@@ -195,4 +195,4 @@ async function run(argv) {
195
195
  export {
196
196
  run
197
197
  };
198
- //# sourceMappingURL=chunk-TK5FCMCH.js.map
198
+ //# sourceMappingURL=chunk-DBGXBZSQ.js.map
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __tempoCreateRequire } from 'node:module'; const require = __tempoCreateRequire(import.meta.url);
2
2
  import {
3
3
  run
4
- } from "./chunk-TK5FCMCH.js";
4
+ } from "./chunk-DBGXBZSQ.js";
5
5
  import "./chunk-KFUOQZBJ.js";
6
6
  export {
7
7
  run
@@ -8291,6 +8291,9 @@ function registerArtifactTools(server, deps) {
8291
8291
  // ../issues-mcp/tools/board.ts
8292
8292
  import { z as z7 } from "zod";
8293
8293
  var DAY_MS = 864e5;
8294
+ function normalizeWorkflowState(value) {
8295
+ return value.trim().toLowerCase().replace(/\s+/g, "-");
8296
+ }
8294
8297
  function registerBoardTools(server, deps) {
8295
8298
  const { convex } = deps;
8296
8299
  server.tool(
@@ -8351,7 +8354,7 @@ function registerBoardTools(server, deps) {
8351
8354
  );
8352
8355
  server.tool(
8353
8356
  "issues_get_pr_review_report_data",
8354
- "Get exact pull-request lifecycle data attributed through Tempo Issues assignments. Joins this board's issue\u2194branch links to Tempo's stored PR snapshots and returns one row per linked issue/PR with the issue's current assigneeIds plus PR createdAt, mergedAt, closedAt, status, URL, and number. Use this for PR opened/merged/closed/outstanding reports by Tempo assignee; do not substitute GitHub authors, assignees, or requested reviewers. A PR linked to multiple issues may appear more than once \u2014 report consumers should dedupe per assignee by repoKey + prNumber.",
8357
+ `Get exact pull-request lifecycle data attributed through Tempo Issues assignments. Joins this board's issue\u2194branch links to Tempo's stored PR snapshots and returns one row per linked issue/PR with the issue's current assigneeIds plus PR createdAt, mergedAt, closedAt, status, URL, and number. Use this for PR opened/merged/closed/outstanding reports by Tempo assignee; do not substitute GitHub authors, assignees, or requested reviewers. A PR linked to multiple issues may appear more than once \u2014 report consumers should dedupe per assignee by repoKey + prNumber. NOT for issue workflow questions: "which issues moved to Merged/Done" is issue stage/status history \u2014 use issues_get_issue_lifecycle_report_data.`,
8355
8358
  {},
8356
8359
  async (_args, ctx) => {
8357
8360
  try {
@@ -8445,26 +8448,31 @@ function registerBoardTools(server, deps) {
8445
8448
  );
8446
8449
  server.tool(
8447
8450
  "issues_get_issue_lifecycle_report_data",
8448
- "Get exact issue lifecycle data for engineering workload reports. Returns every current issue on the active board plus time-bounded status and assignee history, allowing consumers to reconstruct who owned an issue when it entered or left a queue. Done and Cancelled come from issue status transitions; no PR link or PR snapshot is required.",
8451
+ `Issue WORKFLOW history \u2014 status and stage transitions over a time window. This is the tool for "which issues moved to Merged / Done / In Review / any other state": in Tempo, "merged" usually means the issue's stage, NOT a pull-request merge (PR reporting is issues_get_pr_review_report_data). Pass toStates for a compact server-filtered answer \u2014 strongly recommended, especially from chat clients: without it the report returns EVERY current issue on the active board plus status+assignee history (for workload reconstruction) and can be hundreds of KB.`,
8449
8452
  {
8450
- days: z7.number().int().min(2).max(60).optional().describe("History window in days (default 15; max 60).")
8453
+ days: z7.number().int().min(2).max(60).optional().describe("History window in days (default 15; max 60)."),
8454
+ toStates: z7.array(z7.string().min(1)).min(1).max(20).optional().describe(
8455
+ 'Server-side filter: return only the status/stage transition events that LANDED in one of these workflow states (e.g. ["merged", "done"]), plus one compact row per affected issue. Case-insensitive; spaces normalize to hyphens ("In Review" \u2192 "in-review"). Custom stages match by the stage id from issues_list_stages.'
8456
+ )
8451
8457
  },
8452
8458
  async (args, ctx) => {
8453
8459
  try {
8454
8460
  const generatedAt = Date.now();
8455
8461
  const days = args.days ?? 15;
8456
8462
  const since = generatedAt - days * DAY_MS;
8463
+ const toStates = args.toStates?.length ? [...new Set(args.toStates.map(normalizeWorkflowState))] : null;
8457
8464
  if (ctx.boardId === null) {
8458
8465
  return jsonResult({
8459
8466
  generatedAt,
8460
8467
  since,
8468
+ ...toStates ? { toStates } : {},
8461
8469
  issues: [],
8462
8470
  events: [],
8463
8471
  totalIssues: 0,
8464
8472
  totalEvents: 0
8465
8473
  });
8466
8474
  }
8467
- const [issues, statusEvents, assigneeEvents, board, labels] = await Promise.all([
8475
+ const [issues, statusEvents, secondEvents, board, labels] = await Promise.all([
8468
8476
  convex.query(api.issues.getIssues, {
8469
8477
  organizationId: ctx.orgId,
8470
8478
  boardId: ctx.boardId
@@ -8476,7 +8484,7 @@ function registerBoardTools(server, deps) {
8476
8484
  }),
8477
8485
  convex.query(api.issues_mcp.getIssueLifecycleEvents, {
8478
8486
  organizationId: ctx.orgId,
8479
- field: "assigneeId",
8487
+ field: toStates ? "stage" : "assigneeId",
8480
8488
  since
8481
8489
  }),
8482
8490
  convex.query(api.issues.getBoard, {
@@ -8510,13 +8518,41 @@ function registerBoardTools(server, deps) {
8510
8518
  updatedAt: issue.updatedAt
8511
8519
  }));
8512
8520
  const issueIds = new Set(reportIssues.map((issue) => issue.id));
8513
- const reportEvents = [...statusEvents, ...assigneeEvents].filter((event) => issueIds.has(event.issueId)).sort((a, b2) => a.createdAt - b2.createdAt).map((event) => ({
8521
+ const reportEvents = [...statusEvents, ...secondEvents].filter((event) => issueIds.has(event.issueId)).sort((a, b2) => a.createdAt - b2.createdAt).map((event) => ({
8514
8522
  issueId: event.issueId,
8515
8523
  field: event.field,
8516
8524
  from: event.from,
8517
8525
  to: event.to,
8518
8526
  createdAt: event.createdAt
8519
8527
  }));
8528
+ if (toStates) {
8529
+ const wanted = new Set(toStates);
8530
+ const matching = reportEvents.filter(
8531
+ (event) => wanted.has(normalizeWorkflowState(String(event.to ?? "")))
8532
+ );
8533
+ const matchedIssueIds = new Set(
8534
+ matching.map((event) => event.issueId)
8535
+ );
8536
+ const slimIssues = reportIssues.filter((issue) => matchedIssueIds.has(issue.id)).map((issue) => ({
8537
+ id: issue.id,
8538
+ humanId: issue.humanId,
8539
+ title: issue.title,
8540
+ type: issue.type,
8541
+ status: issue.status,
8542
+ stage: issue.stage,
8543
+ priority: issue.priority,
8544
+ assigneeIds: issue.assigneeIds
8545
+ }));
8546
+ return jsonResult({
8547
+ generatedAt,
8548
+ since,
8549
+ toStates,
8550
+ issues: slimIssues,
8551
+ events: matching,
8552
+ totalIssues: slimIssues.length,
8553
+ totalEvents: matching.length
8554
+ });
8555
+ }
8520
8556
  return jsonResult({
8521
8557
  generatedAt,
8522
8558
  since,
@@ -45943,7 +45979,7 @@ function buildBackends(runtime, toolsets, workspace) {
45943
45979
  }
45944
45980
 
45945
45981
  // src/version.ts
45946
- var CLI_VERSION = "0.0.105-staging.2";
45982
+ var CLI_VERSION = "0.0.105";
45947
45983
 
45948
45984
  // src/canvas-hooks.ts
45949
45985
  var import_pngjs3 = __toESM(require_png(), 1);
@@ -48097,4 +48133,4 @@ export {
48097
48133
  runServe,
48098
48134
  scopeParamsFor
48099
48135
  };
48100
- //# sourceMappingURL=serve-AGHNN3WQ.js.map
48136
+ //# sourceMappingURL=serve-E62XRLQQ.js.map