Repository tooling for the hosted product. Almost everything here is reached through a
pnpm script in the root package.json; run those from OpenScience/. There is no
desktop packaging, and nothing here builds or signs an installer.
Generators whose output is committed, so a check can tell "someone edited the source and
forgot to regenerate" from "nothing changed". Except for vendor-geo-skills.mjs, each takes
--check, which CI runs.
generate-capability-manifests.mjsturns everycapabilities/*/capability.yamlinto the JSON the runtime image carries and validates it (pnpm build:capabilities,pnpm check:capabilities).generate-design-tokens.mjswrites the design tokens intoapps/web/src/index.css(pnpm tokens:css,pnpm check:tokens-css).generate-skill-packages.mjswritespackages/domain/src/skill-packages.json, the record of every package that ships a skill or capability (pnpm generate:skill-packages,pnpm check:skill-packages).generate-runtime-inventory.mjswritespackages/domain/src/runtime-inventory.json, what a runtime session of the image is made of (the composition snapshot's bundles and rows, the agent preset, the tool sets, the skill roots, the LoopX CLI's skills) — the list the plugins page is held to byruntime-inventory-zh.json(pnpm generate:runtime-inventory,pnpm check:runtime-inventory).generate-vcr-scenario-help.mjsrenders the 虚拟临床研究 engine scenario help the research MCP server reads (pnpm generate:vcr-scenario-help,pnpm check:vcr-scenario-help).generate-tcm-caution-rules.mjsderives the 十八反 / 十九畏 rules inclinical-safety-rules.jsonfrom a curated matrix in the git-ignored data directory; where that data is absent its check says so and exits 0.repin-curated-skill-digests.mjsre-pins the curated-skill inventory digests (pnpm check:skill-digests);rewrite-skill-vocabulary.mjskeeps tool names in everySKILL.mdspelled the way the model sees them (pnpm check:skill-vocabulary).vendor-geo-skills.mjsis a local step that unpacks the proprietary GEO method pack, which is not in this repository, into the git-ignoredruntime/skills/geo-private/, and writesgeo-pack-index.jsonbeside it (name and one sentence per skill,geo-pack-index.mjs): the web image carries that index and none of the pack (--indexwrites it for a root already vendored).
Local development helpers.
start-evimed-local.mjs(pnpm dev:evimed) starts the control plane for local use, with password login, on port 8798;configure-local-secrets.mjs(pnpm configure:evimed-local) creates the local signing secrets under.evimed-local/secrets/and reports which keys are still missing.fetch-skills.shfetches the pinned external skill pack intoruntime/skills/external/and appliespatch-ai4s-integrity-auditor.pyto it; the image build and CI run it too.vendor-community-skills.mjsvendors the community skills named inruntime/skills/community/sources.jsonat their pinned commits (pnpm vendor:community-skills,pnpm check:community-skills);try-community-bundles.mjsinstalls tool-form community bundles into a scratch kernel profile to see whether they compose.build-tool-graph.mjs,collect-executed-edges.mjsandgenerate-briefs.mjsbuild the evaluation corpus's per-capability tool graph and brief drafts (pnpm check:tool-graph,pnpm collect:tool-edges).open-evolution-pr.mjsandopen-method-pr.mjsare run by an operator: they turn a staged proposal into a branch, a commit and a pull-request body, and refuse one that touches more than it owns.test_domain_check.py,test_large_file_probe.py,test_pdf_extract.pyandtest_stats_integrity.pyare standard-libraryunittestfiles for the core skills underruntime/skills/core/; run each directly withpython. They are not wired into apnpmscript.
Operations, release and acceptance tooling for hosted deployments, by purpose.
- Configuration and gates:
configure-*.mjs(monitoring, backup, local auth, OIDC, production state) with their--checkmodes,audit-hosted-compliance.mjs,audit-saas-alignment.mjs,audit-source-secrets.mjs,check-*.mjs(kernel defaults, pin inventory, relational integrity, research billing, runtime image and skill digests, evidence connectors),host-preflight.mjs,deployment-smoke.mjs. - Kernel and upstream pins:
kernel-install.mjs,verify-harness-seams.mjs,verify-composition-references.mjs,wire-surface.mjs,record-dsh-golden-frames.mjs,upstream-compat-matrix.mjs,deepseek-compatibility-preflight.mjs,deepseek-kernel-release-gate.mjs;skill-catalogue-size.mjsmeasures what the model's skill catalogue costs per root, for a GEO project's runtime and for every other. - Release and host deployment:
generate-release-manifest.mjs,release-images.mjs,release-full-build.mjs,release-retention.mjs,release-receipt-scheduler.mjs,host-delta-release.sh,host-release-switch.sh,host-engine-delta.sh,host-flatten-runtime-image.sh, thehost-knowledge-plugin-*.shpair, and the AgentBay runtime image and bring-up scripts (agentbay-*). - Backup and restore:
backup-data.sh,backup-archive.mjs,backup-retention.mjs,backup-scheduler.mjs,object-backup.mjs,restore-data.sh,restore-drill.sh,postgres-backup.py,recovery-volume.py,migrate-data-dir.sh, and thevcr-backup*andvcr-restore-drill.mjsmembers for the 虚拟临床研究 data plane. - Index rebuilds and data repair:
rebuild-memory-index.mjs,rebuild-kb-index.mjs,rebuild-frontier-index.mjs, and one-off corrections for memory, sources and the GEO module, most of which report first and change data only when given--apply. - Acceptance and walks:
capability-acceptance.mjs,hosted-production-e2e.mjs,ui-walk.mjs,gallery-shot.mjs,session-stream-acceptance.mjs, theevolution-*andextension-saas-acceptance*families,gate-health.mjsandreplay-clinical-gate.mjs. test/holds the unit tests of these scripts (pnpm test:ops),fixtures/the inputs of the extension acceptance campaign, andnative-ui-local/a disposable local fixture of the kernel's own interface; that fixture is never for production.
validate-personal-skill.mjsis the fixed entry the control plane runs in a disposable container to validate a researcher's personal skill from a read-only input mount.extensions/cowork/prepares the Cowork document tools as an isolated extension: a pinned source manifest, a trusted-operator build, an overlay, a policy and their tests. Its descriptor records it as not yet wired into serving.
runServerTests.mjsbackspnpm test:server, keeping the PostgreSQL integration files apart from each other when a test database is configured.localhostProbeGuard.mjsis preloaded before every Node test file so that a developer tool's port scan cannot make a fake server in a test count a request it never saw.
Checks and one-off tools for the 虚拟临床研究 module and its R engine: verify.sh runs
everything the module can be checked by, ci-system-deps.sh and r-library.sh prepare and
verify the engine's R library, check-numeric-log.sh and check-method-references.mjs read
the numerical validation run, migrate-check.mjs rehearses the module's database migration on
a clone, live-acceptance.mjs is a live ordinary-user acceptance, and
backfill-result-subjects.mjs, rename-from-definition.mjs and profile_snapshot.py are
data and profiling helpers.
evals/export-evidence-incidents.mjs turns recorded evidence incidents into eval cases under
evals/evidence-incidents/cases/. release/ holds only a .gitkeep; release tooling lives in
ops/.