Skip to content

feat: sctx-map-views render plugin - #37

Draft
mindsocket wants to merge 1 commit into
mainfrom
claude/project-thread-tmn7yk
Draft

mindsocket wants to merge 1 commit into
mainfrom
claude/project-thread-tmn7yk

Conversation

@mindsocket

Copy link
Copy Markdown
Owner

What

sctx-map-views, a structured-context render plugin. sctx render <space> map-views.html -o map.html writes the space and its map views as one self-contained interactive HTML file (scripts and styles inlined, no CDN).

How

  • New package packages/sctx-map-views, bundled with Bun. It inlines the library's page template (structured-context-map-views/page.html) and /node entry; structured-context is imported for types only.
  • It reads everything through core 0.24.0's render callbacks: exportGraph(), validate(options) and resourceDirs('map-views'). Validation options come from -d (semantic, depth, ruleFilter, includeGated), so severity stays core's.
  • map-views: the definition-reading loop in node/index.ts is now readDefinitionFolders, shared by loadMapViewDefinitions and the plugin. fillPage is exported from /node, and page.html from the package exports.
  • Build: build:library is build without the CDN-checking artifact page, so CI, the pre-push hook and the plugin build can use it. The hook now links the plugin's node_modules and builds the library before checking.

Checks

  • Tests for the plugin (page contents, -d options, missing callbacks); full suite, typecheck and lint pass.
  • Rendered the launch-playbook sample through sctx render with a definition in .sctx/map-views/: 48 cards, no console errors.

Not in this PR

  • How sctx-map-views is published (the release workflow only publishes packages/map-views).
  • Core bundling the plugin (slice 5).
  • Plugin-shipped definitions via sctx["map-views"] in a plugin's package.json (this repo's loader still reads sctx.mapViews).

Generated by Claude Code

… HTML file

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019XphpeFwEYm8K11SoT9ewz

This branch has not been deployed

No deployments
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.

2 participants