@dcl/jarvis
v1.7.0
Published
Decentraland services and UI manifests
Readme
@dcl/jarvis
Auto-generated service manifests for the Decentraland platform. An AI agent clones each repository, reads its code and workspace documentation, and produces a structured YAML manifest describing the service's domain, API, dependencies, events, and configuration.
What's inside
manifests/<service>.yaml— one manifest per repository, following a strict schema (src/manifest.example.yaml)manifests/graph.yaml— cross-service dependency graph (who calls whom, event flows)manifests/index.yaml— compact service index optimized for minimal token consumption
Install
npm install @dcl/jarvisThe published package includes only the manifests/ directory.
Development
Prerequisites
npm installCopy .env.example to .env and fill in the values:
| Variable | Description |
|---|---|
| GITHUB_TOKEN | Fine-grained token with repo read access (for cloning + GitHub API) |
| ANTHROPIC_OAUTH_REFRESH_TOKEN | Seeds .auth.json for the Claude agent (first run only) |
Generate manifests
npm run generateThis will:
- Check each repo in
src/repos.tsfor new commits via the GitHub API - For repos with changes, clone the repo and its workspace(s)
- Run a Claude agent that reads the code + workspace README and writes a manifest YAML
- After all manifests are processed, regenerate
graph.yamlandindex.yaml
Repos that haven't changed since the last run are skipped (tracked via lastCommit in src/repos.ts).
Authentication (OAuth)
All Anthropic auth uses OAuth — there is no API key path.
- A refresh token is exchanged for a short-lived access token on each API call.
- The SDK may rotate the refresh token after use, so the original token becomes invalid.
- The current auth state (refresh + access + expiry) is persisted in
.auth.json.
- First run — set
ANTHROPIC_OAUTH_REFRESH_TOKENin.env. The generator writes.auth.jsonon startup and uses that going forward. - Existing session — copy
.auth.jsonfrom another pi-agent or OpenDCL session into the project root. No env var needed.
Why .auth.json matters: because refresh tokens rotate on use, the file is the source of truth. The env var is only a seed for first-time setup.
Project structure
src/
repos.ts # List of repositories + workspace URLs
generate.ts # Main generation pipeline
manifest.example.yaml # Schema for service manifests
graph.example.yaml # Schema for the dependency graph
index.example.yaml # Schema for the service index
prompts/
system.md # System prompt for the manifest-generation agent
manifests/ # Generated output (published via npm)License
Apache-2.0
