Module: DatagroutConduit::Onramp
- Defined in:
- lib/datagrout_conduit/onramp.rb
Overview
Autonomous agent self-registration (onramp) for DataGrout.
The onramp flow lets a machine intelligence register itself with DG without a human in the loop, using only plain HTTP JSON — no MCP client required.
Flow
-
POST to
/onrampwith agent identity metadata (no auth). -
DG returns a short-lived
session_token(5 minutes). -
POST to
/onramp/completewith Authorization: Bearer <session_token>. -
DG issues provisional
client_id+client_secret(restricted scopes).
Example
opts = DatagroutConduit::Onramp::OnrampOptions.new(
gateway: "https://app.datagrout.ai",
agent_name: "my-research-agent",
agent_type: "claude-sonnet-4-6"
)
client = DatagroutConduit::Client.bootstrap_onramp(opts: opts, url: nil)
Defined Under Namespace
Classes: OnrampCredentials, OnrampError, OnrampOptions
Class Method Summary collapse
-
.register_and_exchange(opts) ⇒ Array(OnrampCredentials, String)
Perform the full onramp handshake and OAuth token exchange.
-
.register_only(opts) ⇒ OnrampCredentials
Perform the onramp handshake and return provisional OAuth credentials.
Class Method Details
.register_and_exchange(opts) ⇒ Array(OnrampCredentials, String)
Perform the full onramp handshake and OAuth token exchange.
71 72 73 74 75 |
# File 'lib/datagrout_conduit/onramp.rb', line 71 def self.register_and_exchange(opts) creds = register(opts) token = exchange_token(creds) [creds, token] end |
.register_only(opts) ⇒ OnrampCredentials
Perform the onramp handshake and return provisional OAuth credentials.
Low-level entry point. Most callers should use Client.bootstrap_onramp instead.
63 64 65 |
# File 'lib/datagrout_conduit/onramp.rb', line 63 def self.register_only(opts) register(opts) end |