@nullplatform/mcp 0.1.5 → 0.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.
package/dist/md.js CHANGED
@@ -1,4 +1,4 @@
1
- import { translate } from "./i18n.js";
1
+ import { currentLocale, translate } from "./i18n.js";
2
2
  /**
3
3
  * The output design language. Every tool answer is markdown a developer scans in a
4
4
  * terminal or chat pane: a bold header line, tight tables, one status glyph per row,
@@ -47,7 +47,8 @@ export function statusLabel(status) {
47
47
  export function ago(iso) {
48
48
  if (!iso)
49
49
  return "";
50
- const elapsedMs = Date.now() - new Date(iso).getTime();
50
+ const date = new Date(iso);
51
+ const elapsedMs = Date.now() - date.getTime();
51
52
  if (!Number.isFinite(elapsedMs) || elapsedMs < 0)
52
53
  return "";
53
54
  const minutes = Math.floor(elapsedMs / 60_000);
@@ -56,9 +57,18 @@ export function ago(iso) {
56
57
  if (minutes < 60)
57
58
  return translate("md.minutesAgo", { count: minutes });
58
59
  const hours = Math.round(minutes / 60);
59
- if (hours < 48)
60
+ if (hours < 24)
60
61
  return translate("md.hoursAgo", { count: hours });
61
- return translate("md.daysAgo", { count: Math.round(hours / 24) });
62
+ const days = Math.round(hours / 24);
63
+ if (days < 7)
64
+ return translate("md.daysAgo", { count: days });
65
+ // GitHub-style: a week or older shows an absolute calendar date (current year omitted), localized.
66
+ const sameYear = date.getFullYear() === new Date().getFullYear();
67
+ return new Intl.DateTimeFormat(currentLocale(), {
68
+ month: "short",
69
+ day: "numeric",
70
+ ...(sameYear ? {} : { year: "numeric" }),
71
+ }).format(date);
62
72
  }
63
73
  export function table(headers, rows) {
64
74
  if (rows.length === 0)
@@ -12,7 +12,7 @@ You run in the developer's own environment, so fuse the local repo with platform
12
12
 
13
13
  Every tool accepts \`language\`: ALWAYS set it to the language the user is conversing in (ISO code, e.g. "es", "en") — answers come back in the user's language.
14
14
 
15
- Most tools render an interactive panel in clients that support it — the user sees apps, status, logs, metrics and parameters as live UI. When that panel renders, the user can already see the result: do NOT restate or summarise it in text (no re-listing applications, reprinting tables, or repeating status/metrics). Reply with at most one short sentence — the single key takeaway or next step — or nothing at all. Add prose only for something the panel doesn't already show.
15
+ Most tools render an interactive panel in clients that support it — apps, status, builds, releases, deployments, logs, metrics, parameters and approvals all appear as live UI. **When a tool's panel renders, that panel IS the answer: do not reproduce its data in your text reply.** The user already sees every row, status and value. NEVER print a markdown table of the same rows, re-list the items, or restate per-row status — duplicating the panel in text is the single most common mistake. Reply with AT MOST one short sentence — the one key takeaway or the next step — or nothing at all. A one-line insight the panel doesn't itself show is fine ("builds 3 and 5 were never released"); re-rendering the list as a table is not.
16
16
 
17
17
  When the user wants to create, scaffold, set up or import an application, call \`application_create\` right away — pass a name if they gave one, otherwise no arguments. Its panel is an interactive FORM that collects the namespace, template and repository itself. Do NOT gather those details in conversation first, and while that form is on screen do NOT ask the user clarifying questions or use any question-asking tool for fields the form already covers (namespace, template, new-vs-import repository, monorepo path) — the form is the input surface. Just call \`application_create\` and let it drive; react only to what it reports back.
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nullplatform/mcp",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "nullplatform from your code assistant — an MCP server that replaces the dashboard for the everyday developer journey",
5
5
  "license": "MIT",
6
6
  "author": "nullplatform",