Skip to content

feat: set meta.configKey in every module - #259

Merged
kodiakhq[bot] merged 2 commits into
mainfrom
feat/modules-config-key
Oct 20, 2026
Merged

kodiakhq[bot] merged 2 commits into
mainfrom
feat/modules-config-key

Conversation

@RedStar071

@RedStar071 RedStar071 commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

🔗 Linked issue

Refs #258

🧭 Context

A module's options currently go through the [specifier, options] tuple in modules, so the list that installs modules also carries their configuration. @wolfstar/kit 0.2 can read a module's options from its own top-level stars.config key (meta.configKey), but none of the modules here set one.

The two shared packages named in the issue (shared-http-pieces, shared-influx-pieces) live in stars-components and get a separate PR there, so this one does not close the issue.

📚 Description

Every module in packages/ now sets meta.configKey and types it in defineConfig by augmenting StarsConfig from @wolfstar/schema. Options written under the key are merged over the module's defaults, and the tuple, which still works, is merged over the key and wins.

Package Key
plugin-api api
plugin-broker broker
plugin-cache cache
plugin-gateway gateway
plugin-i18next i18n
plugin-logger logger
plugin-scheduled-tasks scheduledTasks
plugin-sharder sharder
plugin-subcommands-advanced subcommandsAdvanced

cache, gateway, sharder and subcommandsAdvanced take no options yet, so their key only reserves the name and is typed as an empty object. I included them to keep the convention uniform. What sits under a key still ends up in the built entry, so it has to be JSON. For broker that excludes redis, which stays in ClientOptions.broker.

Departures from the Pullfrog plan:

  • @wolfstar/schema (^0.9.0) is added as an optional peer and devDependency of each package, because the declare module "@wolfstar/schema" augmentation does not resolve from the package otherwise. The plan did not mention it.
  • The kit range moves to ^0.2.0, the first version that reads configKey. A project on kit 0.1 has to update it, which the changeset calls out.
  • The new root test needs @wolfstar/kit and @wolfstar/schema as root devDependencies.

Key changes

  • meta.configKey and the StarsConfig augmentation in each src/module.ts.
  • @wolfstar/kit to ^0.2.0 and @wolfstar/schema as an optional peer in the nine packages.
  • READMEs show the key form first and say the tuple still works and wins.
  • tests/module-config-keys.test.ts runs every module through kit's setupModules: keys are unique and not built-in, options under a key reach setup, and the tuple wins.
  • AGENTS.md lists the keys and the kit requirement.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation change
  • Workflow / CI change

Pre-flight Checklist

  • I have read the Contributing Guidelines (if applicable)
  • My code follows the code style of this project
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly
  • I added a changeset with pnpm changeset (or pnpm changeset add --empty if no release is needed). See .changeset/README.md.

🤖 AI disclosure: Claude Code was used on this PR. Code written with claude-sonnet-5-5; PR description written with claude-sonnet-5-5. AI policy.

Each module owns a top-level key of stars.config (api, broker, cache, gateway,
i18n, logger, scheduledTasks, sharder, subcommandsAdvanced), typed through a
StarsConfig augmentation, so options no longer have to go through the
[specifier, options] tuple, which still works and wins over the key.

Requires @wolfstar/kit ^0.2.0, the first version that reads configKey, and
adds @wolfstar/schema as an optional peer for the augmentation.

Refs #258
@RedStar071 RedStar071 added packages:plugin-api Changes in plugin-api packages:plugin-i18next Changes in plugin-i18next packages:plugin-logger Changes in plugin-logger packages:plugin-cache Changes in plugin-cache packages:plugin-gateway Changes in plugin-gateway packages:plugin-sharder Changes in plugin-sharder packages:plugin-broker Changes in plugin-broker packages:plugin-scheduled-tasks Changes in plugin-scheduled-tasks labels Oct 20, 2026
@coldtea-pr-lens

coldtea-pr-lens Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
  • Redraw · drawn at fc51f0d, the branch has moved on

Architecture

Architecture diagram for wolfstar-project/plugins at fc51f0d

Play the walkthrough

Inside the changed components — 1 view

Component view — Module registrations

Every plugin module now sets meta.configKey and augments StarsConfig in @⁠wolfstar/schema.

Architecture view of Component view — Module registrations in wolfstar-project/plugins

Data flow

Data flow diagram for wolfstar-project/plugins at fc51f0d

Follow each request


Tip

Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and your model provider's key as its api-key to run PR Lens from your own CI. Any /chat/completions endpoint works

🪧 More tips
  • Run npx skills add coldteadotai/pr-lens, then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Run npx @coldtea/pr-lens-cli analyze --base origin/main on a branch, then npx @coldtea/pr-lens-cli render .pr-lens/graph.json. Same lenses, your own model key, before the pull request exists
  • Click the link under each diagram to open it on a canvas you can zoom, pan and step through
  • The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change
  • Open a diagram on the canvas, then press W or click play to walk through the change one step at a time
  • The CLI's render reads .github/pr-lens.yml and applies your renames, exclusions and lane pins at draw time
  • Set github.comment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture and data flow row. Drawing still runs as before
  • Set github.draw: on-demand in .github/pr-lens.yml and PR Lens stops drawing pull requests on its own. Comment @pr-lens draw on a pull request when you want that one drawn
  • After a push, tick Redraw to draw the latest commit
  • Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion

Thanks for using PR Lens! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out on X, Bluesky, Mastodon, Reddit or LinkedIn

@wolfstar-github-agent

wolfstar-github-agent Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🤖 REVIEW PAUSED

Wolfstar Agent Kit posted this automated status. AI open source policy.

This pull request is from an outside contributor.

Add the wolfstar-agent-review label to approve automated review and verified repairs.
Approval covers head commit a2911e513a37.

  • Review and repair

Only Wolfstar's click starts work. It adds the wolfstar-agent-review label.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Reviewed the full diff of the single commit adding meta.configKey to every module.

  • meta.configKey per module: all nine src/module.ts files set a unique key and augment StarsConfig from @wolfstar/schema; cache, gateway, sharder and subcommandsAdvanced reserve their key with an empty-object type.
  • Dependency ranges: @wolfstar/kit moves to ^0.2.0 and @wolfstar/schema ^0.9.0 is added as an optional peer and devDependency in each package, plus root devDependencies for the new test.
  • Tests: tests/module-config-keys.test.ts runs each module through kit's setupModules (key uniqueness, not built-in, options under the key reach setup, the tuple wins, non-object key is rejected); tests/module-entries.test.ts asserts the new peer.
  • Docs and changeset: READMEs, JSDoc and AGENTS.md show the key form first, and one minor changeset covers all nine packages and calls out the kit 0.2 requirement.

Locally, the three affected test files pass (61 tests) and pnpm lint reports no errors. pnpm typecheck only fails on unbuilt workspace dependencies (@wolfstar/plugin-cache not resolvable without a prior build), with no errors in any module.ts.

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

@pkg-pr-new

pkg-pr-new Bot commented Oct 20, 2026

Copy link
Copy Markdown

Open in StackBlitz

@wolfstar/plugin-api

pnpm add https://pkg.pr.new/@wolfstar/plugin-api@259

@wolfstar/plugin-broker

pnpm add https://pkg.pr.new/@wolfstar/plugin-broker@259

@wolfstar/plugin-cache

pnpm add https://pkg.pr.new/@wolfstar/plugin-cache@259

@wolfstar/plugin-gateway

pnpm add https://pkg.pr.new/@wolfstar/plugin-gateway@259

@wolfstar/plugin-i18next

pnpm add https://pkg.pr.new/@wolfstar/plugin-i18next@259

@wolfstar/plugin-logger

pnpm add https://pkg.pr.new/@wolfstar/plugin-logger@259

@wolfstar/plugin-scheduled-tasks

pnpm add https://pkg.pr.new/@wolfstar/plugin-scheduled-tasks@259

@wolfstar/plugin-sharder

pnpm add https://pkg.pr.new/@wolfstar/plugin-sharder@259

@wolfstar/plugin-subcommands-advanced

pnpm add https://pkg.pr.new/@wolfstar/plugin-subcommands-advanced@259

commit: a2911e5

@kodiakhq
kodiakhq Bot merged commit e9c503d into main Oct 20, 2026
15 of 16 checks passed
@kodiakhq
kodiakhq Bot deleted the feat/modules-config-key branch October 20, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages:plugin-api Changes in plugin-api packages:plugin-broker Changes in plugin-broker packages:plugin-cache Changes in plugin-cache packages:plugin-gateway Changes in plugin-gateway packages:plugin-i18next Changes in plugin-i18next packages:plugin-logger Changes in plugin-logger packages:plugin-scheduled-tasks Changes in plugin-scheduled-tasks packages:plugin-sharder Changes in plugin-sharder

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant