Skip to content

feat(harness): let glaze:inspect take a module inside an installed package - #118

Merged
tenphi merged 1 commit into
mainfrom
claude/ecstatic-cori-peq9hk
Nov 21, 2026
Merged

tenphi merged 1 commit into
mainfrom
claude/ecstatic-cori-peq9hk

Conversation

@tenphi

@tenphi tenphi commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes #117.

  • 📦 glaze:inspect resolves a <theme> that is not a file as a package path, as tasty:styles --setup does: through the package's exports, then by walking up the node_modules folders for a file the exports do not list. It looks from the current folder, then from HARNESSPM_PROJECT_DIR. #exportName still works after a package path, and a missing module gets an error that names it and the folder.
  • 🔢 The text header rounds a theme's seed hue and saturation to one decimal. --json and the public measuring module (@tenphi/glaze/harness/measure) keep exact values.

Why

@tenphi/cookbook ships harness/dev.harnesspm/theme.mjs, which exports a Cookbook site's palette as a Glaze theme. Its rule had to tell agents glaze:inspect node_modules/@tenphi/cookbook/harness/dev.harnesspm/theme.mjs, which is wrong in a monorepo that hoists packages. Now it can say glaze:inspect @tenphi/cookbook/harness/dev.harnesspm/theme.mjs (tenphi/cookbook#210).

Changes

  • harness/dev.harnesspm/scripts/cli.mjs: resolveModule(), shared and tested.
  • harness/dev.harnesspm/scripts/inspect.mjs: uses it; the usage text mentions package paths; the header rounds.
  • harness/skills/glaze-theme/SKILL.md and AGENTS.md: say that glaze:inspect takes a package path too.
  • src/harness.test.ts: an exported path, a path the exports map does not list, a plain file, #exportName, and a missing module, in a temporary folder with a fake package.
  • @types/node is now a dev dependency, for those tests. tsconfig.json sets "types": [], so Node types stay out of the library.

Checks

pnpm typecheck, pnpm lint, pnpm format:check, pnpm test (880 pass), pnpm build, pnpm exec harnesspm check.


Generated by Claude Code

…ckage

- glaze:inspect resolves a <theme> that is not a file as a package path, as tasty:styles --setup does: the package's exports, then the node_modules folders (#117).
- The text header rounds the theme's hue and saturation; --json and the measuring module keep exact values.
- @types/node is a dev dependency for the new tests; the library's tsconfig keeps Node types out.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
@github-actions

Copy link
Copy Markdown
Contributor

📦 Snapshot release

Published 0.0.0-snapshot.4f60ba4.

pnpm add @tenphi/[email protected]

@tenphi
tenphi merged commit c5dbafb into main Nov 21, 2026
3 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 21, 2026

This branch was previously deployed

1 inactive deployment
release — cff6e7b9 Deployed Nov 21, 2026 by tenphi via Build & snapshot release #309
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

glaze:inspect: accept a module inside an installed package, as tasty:styles --setup does

2 participants