oss-watch · Open Source Component Upgrade Monitoring and Execution Skill
One-line usage: Tell the AI Coding Agent in this repository "Upgrade open source components", and it will automatically run the full process: scan → generate plan → you select scope → upgrade item by item → gating → release. Discipline: Scanning is automatic; upgrades go through separate PRs—"Update plan batching → Gating tests → Merge per agreement §1/§9.5"; destructive/major version upgrades require human review per §3, humans retain the right to halt and rollback. Direct
pnpm updatecommits are forbidden. Optional reminder: This mechanism is an optional capability—when the developer does not initiate it, the repository does not perform any mandatory component checks or upgrade blocks; if you want to know if there are updates, just runpnpm oss:planat any time.
0. Repository Identity
This repository belongs to the WorkLoom Zhìyuán open-source base family (Agent IM universal base and industry distributions). This skill only manages the component health of this current repository—you don't need to and don't have permission to care about other repositories.
1. Mechanism Quartet (Within the Repository)
| Item | Path | Function |
|---|---|---|
| Component Inventory | oss-components.json (repo root) | Monitored components: name / repo (GitHub URL) / channel / current / cadence / gate / notes |
| Scanner | scripts/oss-watch.sh | Checks the latest version upstream based on cadence expiry, produces update plan; read-only, does not modify dependencies |
| Update Plan | docs/oss-update-plan.md (scan artifact) | "Who has a new version, how far behind, how to upgrade, what gates to pass, new capability assessment" execution ticket |
| State Ledger | .oss-watch-state.json (git-tracked) | Last scan time / last discovered version, ensuring cadence discipline continuity across sessions |
pnpm oss:watch # One-click trigger: scan expired components → generate/refresh "Open Source Component Update Plan"
pnpm oss:plan # Only view current plan (no scan)
2. Registration Discipline for Component Repository Addresses (Answering "What happens if I don't include the URL")
It has an impact, and differs by channel—every component in the inventory must fill in the repo field:
| channel | Update check depends on | Consequence of missing repo address |
|---|---|---|
npm (react/hono/dsh, etc.) | npm registry, not dependent on repo | Version comparison unaffected, but cannot jump to CHANGELOG for breaking changes, cannot determine repository health—major version upgrades become blind |
github (stagehand/gui-agents, etc.) | git ls-remote --tags <repo>, strongly dependent | The component becomes blind directly, scanner downgrades to "manual review" |
docker (litellm/pgvector, etc.) | Image tags + repository releases, strongly dependent | Can only manually verify; missing address means loss of contact |
skill (computer-use, etc.) | Skill source snapshot diff, strongly dependent | Cannot trace back updates |
Repositories with multi-namespace tags (e.g., tauri's tauri-v2.x and v1.x coexisting) must add a tag_prefix field (tauri in the inventory already has tauri-v), otherwise semver sorting may select the wrong namespace.
3. Cadence Strategy (cadence)
| Cadence | Target | Expiry determination |
|---|---|---|
| weekly | Fast-iteration stars: @deepseek-ai/dsh, vite, playwright/computer-use, stagehand, browser-use | ≥7 days |
| monthly | Stable mainstream libraries and self-hosted services (react/trpc/hono/pg/zod/litellm/langfuse, etc.) | ≥30 days |
| event | Components with poisoning history / in KEV list (litellm) | No waiting period, check on alert |
Components that haven't reached their cadence are automatically skipped—large component lists won't disrupt development rhythm.
4. Standard Process (Agent Execution Script)
0. Environment Precheck (Always run before executing upgrades, distilled from 2026-08-26 combat experience)
# ① Node version: project engines requires >=24 (dsh rc.2+ has hard dependency on node:zlib's zstd API)
node -v # Must be ≥24; if not: NVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node nvm install 24 && corepack enable
# ② corepack/pnpm proxy (necessary when direct connection to npmjs is unavailable):
export COREPACK_NPM_REGISTRY=https://registry.npmmirror.com COREPACK_INTEGRITY_KEYS=0
# ③ Database: docker start workloom-im-pg
# Note container maps 5432 but .env uses 5433—if forwarding is missing: socat TCP-LISTEN:5433,fork,reuseaddr TCP:127.0.0.1:5432 &
# ④ Clear residual services before tests/suites (prevent port conflicts):
pkill -f "[t]sx.*src/index"; pkill -f "[v]ite"
# ⚠ pkill patterns must use [t] character class—bare pkill -f "tsx.*" will match pkill's own command line causing suicide
# ⑤ Suite must run isolated in a clean repository: dirty repo reset = drop/create database → pnpm db:migrate → pnpm db:seed → run once
1. Scan: pnpm oss:watch → read out the plan (component/current version/latest version/gap/suggestion) → user selects scope
2. Upgrade Item by Item (one commit per batch, dsh is always a separate batch)
| Type | Action |
|---|---|
| npm pinned dependency | pnpm update <pkg>@<target> --filter <workspace> (if filter doesn't match, use pnpm -C <package-dir> update ) → sync inventory current |
| dsh version lock | Separate batch → update packages/runtime/dsh-gate pin → check dependency changes (rc.2 removed node-pty, dsh-gate.sh has conditional handling; when upgrading further, first diff the dependency tree) |
| External service selection | Only update inventory registration and suggested image tags, don't modify runtime |
3. Gating Matrix (Must pass after upgrade, execute all gates for component upgrades, not just smoke)
| gate | command | applicable to |
|---|---|---|
| smoke | pnpm typecheck | typescript/@types and other pure type components |
| standard | typecheck + pnpm test | General npm dependencies |
| full | standard + pnpm suite (full scenario suite) | Runtime path components (trpc/hono/react/pg/react-router) |
| runtime-gate | full + bash scripts/dsh-gate.sh (E6: fence waterfall + hash chain + H-5 kill -9 replay) | dsh and Agent runtime related |
Any failure → immediately rollback that batch, mark in plan as "⛔ Blocked + reason", forbid release with issues.
4. Release
- All green → commit (
chore(oss): <pkg> a→b (gating details)) → push → mark as "✅ Released (hash)" indocs/oss-update-plan.md - It is recommended to take a complete snapshot of the repository (git bundle/mirror rep) before release, so that the whole thing can be rolled back in case of incidents
5. New Capability Assessment (Required for every upgrade plan · Human decision)
Bottom-level component upgrades often bring new capabilities, not just fixes. The "New Capability Assessment" section in the plan lists clues; productization is judged by humans. Example from the 2026-08 batch:
| Component | New capability clues | Productization idea (pending human decision) |
|---|---|---|
| vite 8.2.2 | rolldown kernel + native codeSplitting configuration | Build speedup; fix large chunk warnings with route-level splitting |
| typescript 7.0.2 | Native toolchain, order-of-magnitude typecheck speed | Can increase all-repo typecheck frequency to every commit |
| react-router 8.3.0 | Enhanced data routing/middleware capabilities | Data-heavy pages can use server-side data flow, reduce initial loading time |
| vitest 4.1.11 | Enhanced browser mode/concurrency isolation | e2e can migrate to browser mode, add Canvas visual regression |
| @deepseek-ai/dsh rc.2 | zstd session persistence + removed node-pty dependency | Audit chain storage cost reduction; long session archiving enables timeline replay |
| react-query 5.102.5 | Incremental query/cache detail optimization | Heartbeat polling can have more granular invalidation |
6. Historical Pitfalls (Re-read before every upgrade)
- Node version is a hard gate: dsh rc.2+ requires Node ≥24 (
createZstdDecompress); lower versions thrownode:zlib does not provide export—align engines before upgrading. findsilent abort underset -euo pipefail:PTY=$(find non-existent-dir ...)returns non-zero, killing the script—fallback with|| true(already fixed in dsh-gate.sh).- Fixture gating mutual interference: "Only seed if empty table" collided with "pre-populate during extended runtime state" → e2e failed 7 times in a row on fresh install (D36). Idempotent fixtures must not use empty-table gating (fixed).
- Residual services write to wrong DB: Suite targets a different service process (concurrency limits falsely reported, simulated/real cross-contamination)—must
pkill -f "[t]sx.*src/index"before testing. - Suite state residue: Mode-switching test cases require isolated clean repositories; when failing, first think "is the repository clean", then think about code.
- corepack dual trap: Default registry can't fetch pnpm + image signature verification fails—always set
COREPACK_NPM_REGISTRY+COREPACK_INTEGRITY_KEYS=0. pnpm --filterpackage name matching unstable: For private workspace packages, usepnpm -C <dir>directly.- Tag namespace: tauri dual-track tags (tauri-v2/v1.x)—configure
tag_prefixin inventory. - Forwarding interrupted by sandbox sleep: 5433 suddenly ECONNREFUSED—first check socat process, don't suspect the code.
- Interruption residue misdiagnosis: Test rows left by a previously interrupted suite can pollute subsequent assertions—clean repository is the highest priority troubleshooting action.
7. Registration Discipline
- New runtime dependencies must be registered in
oss-components.jsonsimultaneously (including repo address); AGPL licenses only in separate processes and explicitly noted. - Archived/discontinued upstream repositories should be reviewed for activity quarterly; supply chain/CVE events trigger the event channel for immediate checks.
- This mechanism is distributed with the repository's open source: in your own fork/clone, you only need to manage this single repository for changing inventory, adjusting cadence, and running upgrades.