chore: add npm package manifest for the tracing plugin - #62
Open
milanagm wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs LFE-15729. Step 1 of moving this plugin to npm distribution. No user-facing change in this PR.
Why
Codex has supported npm plugin sources since codex-cli 0.143.0 (2026-07-08), so the plugin no longer has to be delivered as a bundle committed to git. Moving to npm resolves several current problems, but this PR only lays the groundwork for it.
What this PR does
Adds
plugins/tracing/package.jsonso the plugin directory is a publishable npm package, and makes the repo root a private workspace root.plugins/tracing/package.json(new):@langfuse/codex-observability-plugin, version kept in sync with.codex-plugin/plugin.json,files: [".codex-plugin", "hooks", "dist"], and aprepackbuild so a stale bundle cannot be published. No dependencies —dist/index.mjsis a self-contained bundle, because Codex never installs a plugin's dependencies.package.json(root):private: trueand renamed tocodex-observability-plugin-workspace. The publishable name had to move toplugins/tracing, since Codex expects.codex-plugin/plugin.jsonat the package root, and two packages in one workspace cannot share a name. The root keeps all dependencies and scripts for building and testing.Verified
Package built and installed end to end without publishing, using a local HTTPS mock registry and an isolated
CODEX_HOME(codex-cli 0.149.0, npm 11.13.0, node 24.16.0):npm pack --ignore-scripts.codex-plugin/plugin.jsonincluded, nosrc/testcodex plugin addfrom an npm-source marketplacenode_modulesparsed 1 turn(s),POST /api/public/otel/v1/traces, 5,173 Bprepackon a realnpm packpnpm run lint,pnpm testAt version
0.1.0the npm cache path is identical to the path currently hard-coded inhooks.json, so the hook command string does not change and no hook re-trust is needed.