@rse/ase 0.0.22 → 0.0.23

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.
Files changed (2) hide show
  1. package/dst/ase-service.js +25 -0
  2. package/package.json +1 -1
@@ -16,6 +16,7 @@ import prettyMs from "pretty-ms";
16
16
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
17
17
  import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
18
18
  import { z } from "zod";
19
+ import { DateTime } from "luxon";
19
20
  import { Config, configSchema, parseScope } from "./ase-config.js";
20
21
  import { renderDiagram, detectTermWidth, detectTermHeight } from "./ase-diagram.js";
21
22
  import { taskLoad, taskSave, taskDelete, taskList } from "./ase-task.js";
@@ -201,6 +202,30 @@ export default class ServiceCommand {
201
202
  content: [{ type: "text", text: JSON.stringify(status) }]
202
203
  };
203
204
  });
205
+ mcp.registerTool("timestamp", {
206
+ title: "ASE timestamp",
207
+ description: "Return the current local date/time formatted via a Luxon format string. " +
208
+ "Pass the Luxon format tokens as `format` (default: `yyyy-LL-dd HH:mm`). " +
209
+ "Returns the formatted timestamp as `text`.",
210
+ inputSchema: {
211
+ format: z.string().default("yyyy-LL-dd HH:mm")
212
+ .describe("Luxon format tokens (default: `yyyy-LL-dd HH:mm`)")
213
+ }
214
+ }, async (args) => {
215
+ try {
216
+ const text = DateTime.now().toFormat(args.format);
217
+ return {
218
+ content: [{ type: "text", text }]
219
+ };
220
+ }
221
+ catch (err) {
222
+ const message = err instanceof Error ? err.message : String(err);
223
+ return {
224
+ isError: true,
225
+ content: [{ type: "text", text: `timestamp: format failed: ${message}` }]
226
+ };
227
+ }
228
+ });
204
229
  mcp.registerTool("diagram", {
205
230
  title: "ASE diagram render",
206
231
  description: "Render a Mermaid diagram as Unicode/ASCII art. " +
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "homepage": "http://github.com/rse/ase",
7
7
  "repository": { "url": "git+https://github.com/rse/ase.git", "type": "git" },
8
8
  "bugs": { "url": "http://github.com/rse/ase/issues" },
9
- "version": "0.0.22",
9
+ "version": "0.0.23",
10
10
  "license": "GPL-3.0-only",
11
11
  "author": {
12
12
  "name": "Dr. Ralf S. Engelschall",