Skip to content

Latest commit

 

History

History
81 lines (50 loc) · 2.16 KB

AGENTS.md

File metadata and controls

81 lines (50 loc) · 2.16 KB

Instructions for AI Agents

Overview

Credentials management utilities shared by the RabbitMQ Java libraries (token refresh, OAuth 2 client credentials support).

This library is meant only for the RabbitMQ Java libraries (e.g. the AMQP 1.0 Java client and the stream Java client). Its API is not public and not considered stable.

Supported Java Versions

This library supports Java 8+. Main and test code must compile with --release 8: do not use Java 9+ APIs.

Build

./mvnw clean test-compile

Sanity Check

./mvnw test-compile

Running Tests

Tests do not need any external service:

./mvnw verify

To run a single test:

./mvnw test -Dtest=TokenCredentialsManagerTest

Repository Layout

  • src/main/java/com/rabbitmq/client/credentials: credentials manager contract and token refresh
  • src/main/java/com/rabbitmq/client/credentials/oauth2: OAuth 2 support
  • src/test/java: tests

Key Files

Under src/main/java/com/rabbitmq/client/credentials/:

  • CredentialsManager.java: contract to authenticate and re-authenticate components (e.g. connections)
  • TokenCredentialsManager.java: credentials manager that requests and refreshes tokens
  • oauth2/HttpTokenRequester.java: OAuth 2 token requester over HTTP(S)
  • oauth2/GsonTokenParser.java: OAuth 2 token response parser

Code Style

  • Format code with ./mvnw spotless:apply at the end of each task (requires JDK 17+)

Comments

  • Only add very important comments, both in tests and in the implementation

Git Instructions

  • Never add yourself to the list of commit co-authors
  • Never mention yourself in commit messages in any way (no "Generated by", no AI tool links, etc)

Style Guide

  • Never add full stops to Markdown list items

After Completing a Task

Iterative Reviews

After completing a task, perform up to twenty iterative reviews of your changes. In every iteration, look for meaningful improvements that were missed, for gaps in test coverage, and for deviations from the instructions in this file.

If no meaningful improvements are found for three iterations in a row, report it and stop iterating.