feat(session): add explicit provider registry and target binding

Introduce deterministic deep-provider discovery and immutable per-target routing while retaining disjoint artifact and native capability families.

Expose provider selection consistently through MCP, CLI, environment configuration, session status, prompt completion, typed diagnostics, and generated documentation. Preserve exact provider/profile provenance without request racing or transparent fallback.

Cover overlapping providers, ambiguity, rejection details, cancellation, restoration, package installation, and real Hopper target switching.
This commit is contained in:
N0zoM1z0 authored and N0zoM1z0 committed 2026-07-15 22:13:48 +09:00
1 parent bd3cf964d6
commit 941d7101dd
174 files changed
+5370 -648

No files matched your search

@@ -12,16 +12,16 @@
<li><a href="" aria-current="page">ProviderSelectionError</a></li></ul>
<h1>Class ProviderSelectionError</h1></div>
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography"><p>No configured provider can satisfy a requested operation.</p>
<div class="tsd-comment tsd-typography"><p>No configured provider can satisfy a requested operation or target binding.</p>
</div></section>
<section class="tsd-panel tsd-hierarchy" data-refl="4545">
<section class="tsd-panel tsd-hierarchy" data-refl="4558">
<h4>Hierarchy (<a href="../hierarchy.html#domain/errors.ProviderSelectionError">View Summary</a>)</h4>
<ul class="tsd-hierarchy">
<li class="tsd-hierarchy-item"><a href="domain_errors.AnalysisError.html" class="tsd-signature-type tsd-kind-class">AnalysisError</a>
<ul class="tsd-hierarchy">
<li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">ProviderSelectionError</span></li></ul></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/domain/errors.ts#L126">src/domain/errors.ts:126</a></li></ul></aside>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/domain/errors.ts#L151">src/domain/errors.ts:151</a></li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
@@ -34,11 +34,15 @@
<section class="tsd-index-section">
<h3 class="tsd-index-heading tsd-anchor-link" id="properties">Properties<a href="#properties" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-index-list"><a href="#_tag" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_<wbr/>tag</span></a>
<a href="#candidateids" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>candidate<wbr/>Ids</span></a>
<a href="#cleanupincomplete" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>cleanup<wbr/>Incomplete</span></a>
<a href="#cleanupresources" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>cleanup<wbr/>Resources</span></a>
<a href="#operation" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>operation</span></a>
<a href="#reason" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>reason</span></a>
<a href="#rejections" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>rejections</span></a>
<a href="#requestedproviderid" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>requested<wbr/>Provider<wbr/>Id</span></a>
<a href="#usercategory" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>user<wbr/>Category</span></a>
<a href="#usermessage" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>user<wbr/>Message</span></a>
<a href="#usermessage" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>user<wbr/>Message</span></a>
</div></section></div></details></section></section>
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
<h2 class="tsd-anchor-link" id="constructors-1">Constructors<a href="#constructors-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2></summary>
@@ -47,16 +51,16 @@
<h3 class="tsd-anchor-link" id="constructor"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<ul class="tsd-signatures">
<li class="">
<div class="tsd-signature tsd-anchor-link" id="constructorproviderselectionerror"><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">ProviderSelectionError</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">operation</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="" class="tsd-signature-type tsd-kind-class">ProviderSelectionError</a><a href="#constructorproviderselectionerror" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
<div class="tsd-signature tsd-anchor-link" id="constructorproviderselectionerror"><span class="tsd-signature-keyword">new</span> <span class="tsd-kind-constructor-signature">ProviderSelectionError</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">input</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <a href="../interfaces/domain_errors.ProviderSelectionErrorOptions.html" class="tsd-signature-type tsd-kind-interface">ProviderSelectionErrorOptions</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="" class="tsd-signature-type tsd-kind-class">ProviderSelectionError</a><a href="#constructorproviderselectionerror" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div>
<div class="tsd-description">
<div class="tsd-parameters">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li><span><span class="tsd-kind-parameter">operation</span>: <span class="tsd-signature-type">string</span></span></li></ul></div>
<li><span><span class="tsd-kind-parameter">input</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <a href="../interfaces/domain_errors.ProviderSelectionErrorOptions.html" class="tsd-signature-type tsd-kind-interface">ProviderSelectionErrorOptions</a></span></li></ul></div>
<h4 class="tsd-returns-title">Returns <a href="" class="tsd-signature-type tsd-kind-class">ProviderSelectionError</a></h4><aside class="tsd-sources">
<p>Overrides <a href="domain_errors.AnalysisError.html">AnalysisError</a>.<a href="domain_errors.AnalysisError.html#constructor">constructor</a></p>
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/domain/errors.ts#L129">src/domain/errors.ts:129</a></li></ul></aside></div></li></ul></section></section></details>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/domain/errors.ts#L160">src/domain/errors.ts:160</a></li></ul></aside></div></li></ul></section></section></details>
<details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>
<h2 class="tsd-anchor-link" id="properties-1">Properties<a href="#properties-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2></summary>
<section>
@@ -65,7 +69,12 @@
<div class="tsd-signature"><span class="tsd-kind-property">_tag</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;ProviderSelectionError&quot;</span></div><aside class="tsd-sources">
<p>Overrides <a href="domain_errors.AnalysisError.html">AnalysisError</a>.<a href="domain_errors.AnalysisError.html#_tag">_tag</a></p>
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/domain/errors.ts#L127">src/domain/errors.ts:127</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/domain/errors.ts#L152">src/domain/errors.ts:152</a></li></ul></aside></section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="candidateids"><code class="tsd-tag">Readonly</code><span>candidate<wbr/>Ids</span><a href="#candidateids" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">candidateIds</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">readonly</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/domain/errors.ts#L156">src/domain/errors.ts:156</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-is-inherited">
<h3 class="tsd-anchor-link" id="cleanupincomplete"><code class="tsd-tag">Readonly</code><span>cleanup<wbr/>Incomplete</span><a href="#cleanupincomplete" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">cleanupIncomplete</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div><aside class="tsd-sources">
@@ -82,19 +91,34 @@
<h3 class="tsd-anchor-link" id="operation"><code class="tsd-tag">Readonly</code><span>operation</span><a href="#operation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">operation</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/domain/errors.ts#L129">src/domain/errors.ts:129</a></li></ul></aside></section>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/domain/errors.ts#L153">src/domain/errors.ts:153</a></li></ul></aside></section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="reason"><code class="tsd-tag">Readonly</code><span>reason</span><a href="#reason" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">reason</span><span class="tsd-signature-symbol">:</span> <a href="../types/domain_errors.ProviderSelectionFailureReason.html" class="tsd-signature-type tsd-kind-type-alias">ProviderSelectionFailureReason</a></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/domain/errors.ts#L154">src/domain/errors.ts:154</a></li></ul></aside></section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="rejections"><code class="tsd-tag">Readonly</code><span>rejections</span><a href="#rejections" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">rejections</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">readonly</span> <a href="../interfaces/domain_errors.ProviderSelectionRejection.html" class="tsd-signature-type tsd-kind-interface">ProviderSelectionRejection</a><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/domain/errors.ts#L157">src/domain/errors.ts:157</a></li></ul></aside></section>
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="requestedproviderid"><code class="tsd-tag">Readonly</code><span>requested<wbr/>Provider<wbr/>Id</span><a href="#requestedproviderid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">requestedProviderId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/domain/errors.ts#L155">src/domain/errors.ts:155</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-is-inherited">
<h3 class="tsd-anchor-link" id="usercategory"><code class="tsd-tag">Readonly</code><span>user<wbr/>Category</span><a href="#usercategory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">userCategory</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;permission_required&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;cancelled&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> = undefined</span></div><aside class="tsd-sources">
<p>Inherited from <a href="domain_errors.AnalysisError.html">AnalysisError</a>.<a href="domain_errors.AnalysisError.html#usercategory">userCategory</a></p>
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/domain/errors.ts#L50">src/domain/errors.ts:50</a></li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-is-inherited">
<section class="tsd-panel tsd-member">
<h3 class="tsd-anchor-link" id="usermessage"><code class="tsd-tag">Readonly</code><span>user<wbr/>Message</span><a href="#usermessage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3>
<div class="tsd-signature"><span class="tsd-kind-property">userMessage</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> = undefined</span></div><aside class="tsd-sources">
<p>Inherited from <a href="domain_errors.AnalysisError.html">AnalysisError</a>.<a href="domain_errors.AnalysisError.html#usermessage">userMessage</a></p>
<div class="tsd-signature"><span class="tsd-kind-property">userMessage</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
<p>Overrides <a href="domain_errors.AnalysisError.html">AnalysisError</a>.<a href="domain_errors.AnalysisError.html#usermessage">userMessage</a></p>
<ul>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/domain/errors.ts#L49">src/domain/errors.ts:49</a></li></ul></aside></section></section></details></div>
<li>Defined in <a href="https://github.com/morluto/rea/blob/main/src/domain/errors.ts#L158">src/domain/errors.ts:158</a></li></ul></aside></section></section></details></div>
<div class="col-sidebar">
<div class="page-menu">
<div class="tsd-navigation settings">
@@ -112,7 +136,7 @@
<details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary>
<div><a href="#constructor"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Constructor"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details>
<details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary>
<div><a href="#_tag"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_<wbr/>tag</span></a><a href="#cleanupincomplete" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>cleanup<wbr/>Incomplete</span></a><a href="#cleanupresources" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>cleanup<wbr/>Resources</span></a><a href="#operation"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>operation</span></a><a href="#usercategory" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>user<wbr/>Category</span></a><a href="#usermessage" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>user<wbr/>Message</span></a></div></details></div></details></div>
<div><a href="#_tag"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>_<wbr/>tag</span></a><a href="#candidateids"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>candidate<wbr/>Ids</span></a><a href="#cleanupincomplete" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>cleanup<wbr/>Incomplete</span></a><a href="#cleanupresources" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>cleanup<wbr/>Resources</span></a><a href="#operation"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>operation</span></a><a href="#reason"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>reason</span></a><a href="#rejections"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>rejections</span></a><a href="#requestedproviderid"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>requested<wbr/>Provider<wbr/>Id</span></a><a href="#usercategory" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>user<wbr/>Category</span></a><a href="#usermessage"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>user<wbr/>Message</span></a></div></details></div></details></div>
<div class="site-menu">
<nav class="tsd-navigation"><a href="../index.html">rea-agents - v1.6.0</a>
<ul class="tsd-small-nested-navigation" id="tsd-nav-container">