move openclaw tlon plugin to the monorepo#5930
Conversation
Flat copy of tloncorp/openclaw-tlon@9871a16 into packages/openclaw, following the tlon-skill import precedent (db3477d). Dropped at import: standalone lockfiles and pnpm-workspace.yaml, .npmrc and .tool-versions (root governs), oxlint/oxfmt configs (converting to ESLint/Prettier), .npmignore (publish stages through .publish/), .github workflows (ported separately), and the dev npm-link scripts for @tloncorp/api / @tloncorp/tlon-skill (obsoleted by workspace deps).
Mechanical reformat (quotes, import sorting) — no logic changes.
- @tloncorp/api (was npm dist-tag 'presence') and @tloncorp/tlon-skill now resolve via workspace:^; add scripts/resolve-workspace-deps.mjs to substitute concrete versions wherever the package.json leaves the workspace (publish staging, Docker container installs) - prepare-publish-package.js resolves workspace deps into .publish/ and fails on any leftover workspace: spec - dev/test entrypoints copy the plugin to /workspace/tlon (container-local) before installing, since workspace deps can't resolve from the bare package mount; node_modules volumes repointed accordingly - restore package .npmrc (node-linker=hoisted) — required by the standalone container installs for tlon-skill binary hydration - split vitest config: default covers src/ only (keeps the monorepo's recursive test sweep away from Docker integration tests); integration suite moves to vitest.integration.config.ts - lint/format scripts now use monorepo ESLint/Prettier; drop oxlint/oxfmt - repoint tlonbot/tlon-apps/tlon-skill path assumptions for the new location (TLONBOT_DIR defaults to a checkout next to the monorepo root; api/skill overrides come from the containing repo) - update repository field, drop packageManager, add publishConfig
- root build:openclaw script; lockfile picks up the new package - pin vite ^8 in openclaw devDeps: vitest 4 declares vite as a peer and pnpm would otherwise satisfy it with the workspace's hoisted vite 5, which lacks the module-runner export vitest needs - adapt src/monitor/media.ts to @tloncorp/api 0.0.8 (workspace), whose post-blob union gained the a2ui entry type (no fileUri/size/name): skip a2ui in attachment downloads - fix import cycle in test/lib (fixtures -> index -> fixtures) and two prefer-const errors surfaced by the ESLint conversion - root .eslintrc.cjs: scope no-inner-declarations off for the package (legal block-scoped ESM declarations; avoids churning the monitor loop while openclaw-tlon PRs are still being ported over)
Port of openclaw-tlon's ci.yml: unit + security tests and the Docker integration suite, running only on PRs that touch the plugin or its workspace deps (packages/api, packages/tlon-skill). The integration job's TEST_STORAGE_* env vars map onto the E2E_S3_* secrets already configured for the tlon-web e2e suite (same S3-compatible ship-storage setup); only OPENROUTER_API_KEY, TLONBOT_TOKEN, and BRAVE_API_KEY need to be added to this repo.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 22a6ec3b73
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
# Conflicts: # pnpm-lock.yaml
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a503703eca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Moves the Tlon plugin for OpenClaw (
@tloncorp/openclaw, npm v0.4.3) from the standalonetloncorp/openclaw-tlonrepo into this monorepo atpackages/openclaw, following the tlon-skill import precedent (#5892) and the plan inpackages/tlon-skill/MONOREPO_PROPOSAL.md. The plugin's two Tlon dependencies (@tloncorp/api,@tloncorp/tlon-skill) already live here; this removes the stale npm dist-tag pin on@tloncorp/api(presence= 0.0.7) and ends the need for multi-PR cross-repo changes. Source: openclaw-tlon master @9871a16e3c76f0558d4e85935a7dbea415362534(flat copy, no history rewrite).Changes
Structured as 5 commits, best reviewed in order:
import openclaw-tlon plugin into monorepo: faithful flat copy (139 files). Dropped repo-level files that don't apply here: lockfiles,pnpm-workspace.yaml,.tool-versions, oxlint/oxfmt configs,.npmignore, old GitHub workflows, and npm-link dev scripts (obsoleted by workspace deps).openclaw: reformat with monorepo prettier: mechanical reformat only (108 files), plus regenerated.prettierignore.openclaw: convert package to monorepo conventions: the substantive diff.workspace:^.scripts/resolve-workspace-deps.mjsrewrites workspace specs to concrete semver in publish staging and Docker container installs (npm publish and bare-mounted containers don't understand the workspace protocol);prepare-publish-package.jsresolves and fails on any leftoverworkspace:spec./workspace/tlonbefore installing, since workspace deps can't be installed from a bare package mount, and this avoids mutating the host checkout..npmrc(node-linker=hoisted, required for tlon-skill binary hydration in standalone container installs).src/only so the monorepo recursive test sweep never touches Docker integration tests; the integration suite usesvitest.integration.config.ts.TLONBOT_DIRdefaults to a sibling of the monorepo root, tlon-apps/tlon-skill overrides come from the containing repo).openclaw: wire into monorepo root; fix build/lint under workspace deps: rootbuild:openclawscript; pinned vite^8in devDeps (vitest 4 declares vite as a peer and pnpm satisfied it with the hoisted workspace vite 5, which lacks the module-runner export and crashed on startup); adaptedsrc/monitor/media.tsto@tloncorp/api0.0.8, whose post-blob union gained thea2uientry type (skipped in attachment downloads; generatedopenclaw.plugin.jsonis byte-identical so the config schema is unchanged); fixed an import cycle intest/liband twoprefer-consterrors; root.eslintrc.cjsscopesno-inner-declarationsoff forpackages/openclaw(legal block-scoped ESM declarations; avoids churning the monitor loop while old-repo PRs are still being ported).ci: add path-filtered OpenClaw plugin workflow:.github/workflows/openclaw-ci.ymlruns on PRs touchingpackages/openclaw,packages/api, orpackages/tlon-skill, porting the old repo's unit + security test and Docker integration jobs. The integration job'sTEST_STORAGE_*env vars map onto theE2E_S3_*secrets this repo already has for the tlon-web e2e suite (same S3-compatible ship-storage setup);.env.exampleandtest/README.mddocument the mapping (plus remaining tlonbot-path doc fixes).How did I test?
pnpm installclean (postinstall generatessrc/version.generated.ts)pnpm --filter @tloncorp/openclaw buildclean; regeneratedopenclaw.plugin.jsonbyte-identical to the old repo'stest/cases/pnpm -r tsc(package) clean; lint 0 errors; prettier check and prettierignore idempotence pass@tloncorp/openclaw@0.4.3: file list identical exceptdist/src/shared-state.js(added on master post-0.4.3);package.jsondiffers only in the repository field, dep specs (presencetag to^0.0.8,^0.3.6to^0.4.0),publishConfig, and the openclaw peer range master had already bumped; zeroworkspace:stringsbash -non all modified shell scripts;docker compose configvalidation for dev/test/local compose filespnpm test:integrationwith.envcredentials): all green — validates the new copy-to-/workspace/tlon+ workspace-dep-resolution entrypoint flow end to endRisks and impact
packages/openclaw), CI workflows, root ESLint configKnown gaps and follow-ups:
OPENROUTER_API_KEYandE2E_S3_*already existed, andTLONBOT_TOKEN(fresh fine-grained PAT scoped to tloncorp/tlonbot, Contents: read) andBRAVE_API_KEYwere added for this PR. This PR's CI run is the first live validation of theE2E_S3_*→TEST_STORAGE_*mapping against the shared bucket.@tloncorp/apijumps from 0.0.7 (presencedist-tag) to 0.0.8. The only type-level impact found was thea2uiblob entry (handled), but api owners should confirm 0.0.8 supersedes thepresencedist-tag features..git, soPLUGIN_COMMITreports "unknown" in dev containers. CI publishes still get the real SHA.tloncorp/tlon-appsbefore the first monorepo publish. The old repo stays open during a transition window with 7 open PRs to land or port (sync recipe: copy changed files from the old repo at the merge commit,prettier --write, review the reduced diff).Rollback plan
Revert.