Project Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
LM Studio plugin that exposes date and time utilities to local LLMs, built on @lmstudio/sdk.
npm run dev — run plugin in LM Studio dev mode (lms dev)npm run push — publish to LM Studio Hub (lms push)npm run lint / npm run lint:fix — ESLint on src/**/*.tsnpm run format / npm run format:check — Prettiernpm run knip — dead-code / unused-export checkNo test suite is configured. TypeScript targets ES2023. Requires Node >= 22.
Entry point src/index.ts registers a config schematic and a tools provider with the LM Studio SDK.
src/config/config-schematics.ts declares the plugin UI fields. The "auto" sentinel from src/config/auto-sentinel.ts marks fields whose effective value should fall back to a runtime default rather than a plugin-set constant — the timezone resolver treats it as "use the host system zone."
ESLint enforces two rules on src/tools/*-tool.ts: the file must contain exactly one exported create<Name>Tool factory returning Tool, and module-level function declarations other than that factory are banned. Per-tool helpers either live in a sibling module under src/ or are inlined inside the implementation arrow. Interfaces at module scope are allowed.
@lmstudio/sdk — plugin/tool registrationzod — tool parameter schemascreateCurrentDateTool). Per-call config resolves via resolveConfig in src/config/resolve-config.ts, merging plugin UI settings from src/config/config-schematics.ts with caller overrides.Intl.DateTimeFormat.formatToolError in src/errors/tool-error.ts converts thrown errors into user-facing strings, including abort-detection via DOMException.name === "AbortError". The InvalidTimezoneError class in src/errors/invalid-timezone-error.ts carries the rejected timezone name through to the formatter.