Shared runtime for the HPC MCP agent family: SSH middleware, PSI/J-style job models, scheduler backends, docs RAG, doctor, and serving, reused across per-machine plugins (Rikyu, HOKUSAI, Octopus, ...).
Project description
hpc-agent-core
Shared runtime for the HPC MCP agent family — the Claude Code / Codex plugins that let an agent submit and monitor Slurm/Grid Engine jobs, manage files, and search documentation on a supercomputer (Rikyu, HOKUSAI BigWaterfall2, Octopus, R-CCS Cloud, TSUBAME4, and others).
Each of those plugins used to be a full copy-pasted fork of the same
template. This package extracts the parts that were already generic in
practice — SSH middleware, PSI/J-style job models, scheduler backends, the
docs RAG pipeline, health checks (doctor), and the MCP serving glue — so a
machine repo becomes a thin "skin": its own <machine>_config.json, a
hand-written guide, skills, and packaging, depending on this package for
everything else.
See PLAN.md in the merge_computers workspace for the full
design rationale and migration plan. This repo implements that plan's Phase
1 (extract the generic modules) — it is not yet a drop-in replacement
for any machine repo's server code; nothing currently depends on it yet.
What's here (Phase 1)
config.py— generic env/file/default settings resolution. A machine's ownconfig.pycallshpc_agent_core.config.configure(...)once to register its SSH default, embedding endpoint, and docs source.middleware.py— the SSH execution layer (base64 payloads, login shell, clean error surfacing). Never touches config or the network above module scope — the MCP server must never fail to start just because config is missing (see PORTING.md's invariant in every machine repo).models.py— PSI/J-styleJobSpec/ResourceSpec/JobAttributes/Job/JobState, with no per-machine defaults baked in.compute/base.py— theSchedulerBackendABC and scheduler-neutral script-body rendering (env vars, container wrapping, launcher prefix).compute/slurm.py— a Slurm backend matching the Rikyu/HOKUSAI dialect (accounting on, job-total--gpus=N). Not yet the fully config-driven backend the plan describes (accounting on/off,--gresvs--gpus, GPU-vendor container flags) — that generalization is the next step.rag/— embedding client, BM25 + vector docs index, and an ingest pipeline that only ever chunks a bundled local guide (never clones a remote docs site — see the module docstring for why).docs_server.py,doctor.py,serving.py— generic FastMCP docs server, health checks, and CLI entry point.
What's deliberately not here yet
hpc_server.py(the IRI-grouped Slurm/filesystem tool surface) and amachine_profile.pythat turns<machine>_config.jsoninto config-driven scheduler dispatch — these need thehas_accounting/gpu_request_style/gpu_vendor_mapschema design worked out first.compute/gridengine.py— promoting shinobulab's Grid Engine backend.- Repointing any machine repo at this package as a dependency.
Development
python3 -m venv .venv && .venv/bin/pip install -e .
No machine repo depends on this yet, so there isn't a meaningful smoke test to run standalone — validate changes against a machine repo once one is repointed here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hpc_agent_core-0.1.0.tar.gz.
File metadata
- Download URL: hpc_agent_core-0.1.0.tar.gz
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09b43acbe33d4471f2ceaa7a132f06dbd125e098fb364ea87a8403db744bfe60
|
|
| MD5 |
9f462a8b7e0dcde2a082021c4170b1c0
|
|
| BLAKE2b-256 |
f23f5e66fb83dc6ae36d185ec2db65a1121d17b701fe10e1a2e7f32c00262906
|
Provenance
The following attestation bundles were made for hpc_agent_core-0.1.0.tar.gz:
Publisher:
publish.yml on william-dawson/hpc-agent-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hpc_agent_core-0.1.0.tar.gz -
Subject digest:
09b43acbe33d4471f2ceaa7a132f06dbd125e098fb364ea87a8403db744bfe60 - Sigstore transparency entry: 2126408519
- Sigstore integration time:
-
Permalink:
william-dawson/hpc-agent-core@537963641a8d0399c55d9d02c1ac56263e8e19cf -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/william-dawson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@537963641a8d0399c55d9d02c1ac56263e8e19cf -
Trigger Event:
release
-
Statement type:
File details
Details for the file hpc_agent_core-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hpc_agent_core-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10c327cb62bb1915c88c6f12b81b587be465abbbd8a311958256c6c84451a381
|
|
| MD5 |
74dd32fb54f8a498e938be1f9a10fb6b
|
|
| BLAKE2b-256 |
49d0a0285e0e1921c6cac1dedeed5acb204fb45911a338fbd20c5f6ba12bc4d8
|
Provenance
The following attestation bundles were made for hpc_agent_core-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on william-dawson/hpc-agent-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hpc_agent_core-0.1.0-py3-none-any.whl -
Subject digest:
10c327cb62bb1915c88c6f12b81b587be465abbbd8a311958256c6c84451a381 - Sigstore transparency entry: 2126408661
- Sigstore integration time:
-
Permalink:
william-dawson/hpc-agent-core@537963641a8d0399c55d9d02c1ac56263e8e19cf -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/william-dawson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@537963641a8d0399c55d9d02c1ac56263e8e19cf -
Trigger Event:
release
-
Statement type: