@irtio/mcp 0.6.0 → 0.8.0

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
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createMcpServer
4
- } from "./chunk-VFNFDDNZ.js";
4
+ } from "./chunk-2IXSEPQB.js";
5
5
 
6
6
  // src/bin.ts
7
7
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
@@ -470,6 +470,15 @@ var leaderboard = {
470
470
  around: {
471
471
  type: "string",
472
472
  description: "A player id. Given, the read returns that player\u2019s neighbours and absolute rank instead of the top of the board."
473
+ },
474
+ // ---- M6 lane B: boards ----
475
+ period: {
476
+ type: "string",
477
+ description: "Which period of a rotating board to read: a day (2026-09-03), an ISO week (2026-W36), a month (2026-09), or a season name. Omit it to read whichever period the board is in now. An all-time board has only one period and takes none."
478
+ },
479
+ bucket: {
480
+ type: "string",
481
+ description: 'Which cohort of a bucketed board to read, e.g. "eu". Required on a board configured with buckets, and refused on one that is not: there is no merged read across buckets.'
473
482
  }
474
483
  },
475
484
  []
@@ -479,6 +488,8 @@ var leaderboard = {
479
488
  const around = typeof args.around === "string" ? args.around : void 0;
480
489
  const limit = typeof args.limit === "number" ? args.limit : void 0;
481
490
  const cursor = typeof args.cursor === "string" && args.cursor !== "" ? args.cursor : void 0;
491
+ const period = typeof args.period === "string" && args.period !== "" ? args.period : void 0;
492
+ const bucket = typeof args.bucket === "string" && args.bucket !== "" ? args.bucket : void 0;
482
493
  if (typeof args.board !== "string" || args.board === "") {
483
494
  const listed = await api(ctx).get(
484
495
  `/v1/projects/${id}/leaderboards`
@@ -491,17 +502,23 @@ var leaderboard = {
491
502
  };
492
503
  }
493
504
  return {
494
- summary: `${id} has ${listed.boards.length} board(s): ` + listed.boards.map((b) => `${b.board} (${b.rows} row(s), ${b.direction})`).join(", "),
505
+ summary: `${id} has ${listed.boards.length} board(s): ` + listed.boards.map(
506
+ (b) => `${b.board} (${b.rows} row(s), ${b.direction}${b.period === void 0 ? "" : `, ${b.period}, now ${b.currentPeriod}`}${b.buckets === true ? ", bucketed" : ""})`
507
+ ).join(", "),
495
508
  data: { project: id, boards: listed.boards },
496
509
  next: "Call `leaderboard` again with `board` set to read one of them."
497
510
  };
498
511
  }
499
512
  const board = args.board;
500
- const query = new URLSearchParams();
513
+ const scope = new URLSearchParams();
514
+ if (period !== void 0) scope.set("period", period);
515
+ if (bucket !== void 0) scope.set("bucket", bucket);
516
+ const query = new URLSearchParams(scope);
501
517
  if (limit !== void 0) query.set("limit", String(limit));
502
518
  if (cursor !== void 0) query.set("cursor", cursor);
503
519
  const q = query.toString();
504
- const path = around !== void 0 ? `/v1/leaderboard/${id}/${encodeURIComponent(board)}/around/${encodeURIComponent(around)}` : `/v1/leaderboard/${id}/${encodeURIComponent(board)}/top${q === "" ? "" : `?${q}`}`;
520
+ const aroundQuery = scope.toString();
521
+ const path = around !== void 0 ? `/v1/leaderboard/${id}/${encodeURIComponent(board)}/around/${encodeURIComponent(around)}${aroundQuery === "" ? "" : `?${aroundQuery}`}` : `/v1/leaderboard/${id}/${encodeURIComponent(board)}/top${q === "" ? "" : `?${q}`}`;
505
522
  const body = await api(ctx).get(path);
506
523
  if (body.entries.length === 0) {
507
524
  return {
@@ -512,11 +529,14 @@ var leaderboard = {
512
529
  }
513
530
  const leader = body.entries[0];
514
531
  return {
515
- summary: `${board} in ${id} (${body.direction} is better): ${body.entries.length} row(s), leading with ${leader?.playerId} on ${leader?.score}.` + (around !== void 0 ? ` ${around} is ranked ${String(body.rank)}.` : ""),
532
+ summary: `${board} in ${id} (${body.direction} is better)${body.period === void 0 ? "" : `, period ${body.period}`}${body.bucket === void 0 ? "" : `, bucket ${body.bucket}`}: ${body.entries.length} row(s), leading with ${leader?.playerId} on ${leader?.score}.` + (around !== void 0 ? ` ${around} is ranked ${String(body.rank)}.` : ""),
516
533
  data: {
517
534
  project: id,
518
535
  board,
519
536
  direction: body.direction,
537
+ // Absent on an all-time, unbucketed board, exactly as the route answers it.
538
+ ...body.period === void 0 ? {} : { period: body.period },
539
+ ...body.bucket === void 0 ? {} : { bucket: body.bucket },
520
540
  rank: body.rank ?? null,
521
541
  entries: body.entries,
522
542
  // Opaque, and passed straight back through `cursor` to read the next page. Absent means
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  requireClient,
11
11
  resolveAuth,
12
12
  toolByName
13
- } from "./chunk-VFNFDDNZ.js";
13
+ } from "./chunk-2IXSEPQB.js";
14
14
  export {
15
15
  LOGIN_NARRATION,
16
16
  NoCredentialError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@irtio/mcp",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "irtio MCP server: provision, deploy, observe and restore irtio rooms from a coding agent",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -23,7 +23,7 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "@modelcontextprotocol/sdk": "1.30.0",
26
- "@irtio/cli": "0.6.0"
26
+ "@irtio/cli": "0.8.0"
27
27
  },
28
28
  "scripts": {
29
29
  "build": "tsup",