Skip to content

refactor(modules): prefix library-only modules with lib- - #1194

Draft
phorcys420 wants to merge 2 commits into
mainfrom
refactor/lib-prefix-modules
Draft

phorcys420 wants to merge 2 commits into
mainfrom
refactor/lib-prefix-modules

Conversation

@phorcys420

Copy link
Copy Markdown
Member

Summary

Renames the three modules that exist only to be consumed by other modules so they're clearly identifiable as libraries:

Old New
coder/coder-utils coder/lib-coder-utils
coder/agentapi coder/lib-agentapi
coder/vscode-desktop-core coder/lib-vscode-desktop-core

These are the only modules tagged [internal, library] and the only registry modules consumed by other modules' source blocks (a full scan found no other module used exclusively by modules).

Changes

  • git mv each module directory to its lib- name (no content changes beyond the items below).
  • Updated each library's README usage examples to the lib-* registry address and its test describe names.
  • Updated test-util imports (../lib-agentapi/test-util) in the 13 modules that import them.
  • Updated registry.coder.com/modules/coder/... links in consumer READMEs.
  • AGENTS.md / coder-modules skill: point at the new path and document the lib- prefix convention.

Intentionally not changed

  • Consumer source addresses and pinned versions (37 modules). The lib-* addresses don't exist until release tags are pushed, and consumers pin older versions (e.g. coder-utils 0.0.1, agentapi 2.0.0) that won't exist under the new names. Migrating them is a follow-up.
  • Local module block labels (e.g. module "vscode-desktop-core"), to avoid changing resource addresses in existing workspaces.
  • Prose comments that refer to "coder-utils" as a concept.

Before merging

  • Confirm registry.coder.com keeps serving the old coder-utils / agentapi / vscode-desktop-core addresses once their directories are gone from the repo. Consumers and external users still depend on them.
  • Plan release tags under the new names at current versions: release/coder/lib-coder-utils/v0.0.2, release/coder/lib-agentapi/v2.4.1, release/coder/lib-vscode-desktop-core/v1.2.1.

Follow-up

Point consumers at lib-* with currently published versions and bump each consumer's version.

Validation

  • terraform test: lib-coder-utils (17), lib-agentapi (3), lib-vscode-desktop-core (3) pass.
  • bun test: the three libraries plus every module whose import changed (goose, aider, claude-code, agent-firewall, auggie, codex, cursor-cli, opencode, sourcegraph-amp, pi, copilot) pass.
  • README validation and bun run fmt clean.

Generated with Xum using Claude

Rename coder-utils, agentapi and vscode-desktop-core to lib-coder-utils,
lib-agentapi and lib-vscode-desktop-core. These modules are tagged
[internal, library] and are only meant to be consumed by other modules.

Consumer modules keep their existing registry source addresses and pinned
versions; they move to the lib-* addresses in a follow-up once the new
release tags are published.
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.

1 participant