@indexnetwork/protocol 10.1.0-rc.450.1 → 10.1.2-rc.452.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/IMPLEMENTATION.md +8 -7
  3. package/dist/capabilities/opportunities.safety.facade.d.ts +1 -1
  4. package/dist/capabilities/opportunities.safety.facade.js +1 -1
  5. package/dist/chat/chat.agent.d.ts +3 -4
  6. package/dist/chat/chat.agent.js +3 -4
  7. package/dist/maintenance/maintenance.graph.js +2 -2
  8. package/dist/negotiation/index.d.ts +0 -24
  9. package/dist/negotiation/index.js +0 -24
  10. package/dist/negotiation/negotiation.attribution.d.ts +1 -1
  11. package/dist/opportunity/application/opportunity.graph.js +9 -9
  12. package/dist/opportunity/domain/opportunity.state.d.ts +4 -4
  13. package/dist/opportunity/index.d.ts +0 -8
  14. package/dist/opportunity/index.js +0 -8
  15. package/dist/opportunity/radar/radar.graph.js +6 -6
  16. package/dist/opportunity/radar/radar.health.js +1 -1
  17. package/dist/shared/agent/canonical-guidance.d.ts +1 -1
  18. package/dist/shared/agent/canonical-guidance.js +8 -11
  19. package/dist/shared/agent/tool.helpers.d.ts +1 -1
  20. package/dist/shared/interfaces/agent-dispatcher.interface.d.ts +1 -1
  21. package/dist/signals/domain/intent.state.d.ts +2 -2
  22. package/package.json +4 -3
  23. package/dist/agent/agent.tools.d.ts +0 -11
  24. package/dist/agent/agent.tools.js +0 -11
  25. package/dist/contact/contact.inviter.d.ts +0 -10
  26. package/dist/contact/contact.inviter.js +0 -9
  27. package/dist/contact/contact.tools.d.ts +0 -9
  28. package/dist/contact/contact.tools.js +0 -9
  29. package/dist/integration/integration.tools.d.ts +0 -9
  30. package/dist/integration/integration.tools.js +0 -9
  31. package/dist/intent/intent.clarifier.d.ts +0 -3
  32. package/dist/intent/intent.clarifier.js +0 -2
  33. package/dist/intent/intent.graph.d.ts +0 -5
  34. package/dist/intent/intent.graph.js +0 -5
  35. package/dist/intent/intent.indexer.d.ts +0 -2
  36. package/dist/intent/intent.indexer.js +0 -2
  37. package/dist/intent/intent.inferrer.d.ts +0 -2
  38. package/dist/intent/intent.inferrer.js +0 -2
  39. package/dist/intent/intent.reconciler.d.ts +0 -2
  40. package/dist/intent/intent.reconciler.js +0 -2
  41. package/dist/intent/intent.specificity.d.ts +0 -2
  42. package/dist/intent/intent.specificity.js +0 -2
  43. package/dist/intent/intent.state.d.ts +0 -10
  44. package/dist/intent/intent.state.js +0 -10
  45. package/dist/intent/intent.tools.d.ts +0 -6
  46. package/dist/intent/intent.tools.js +0 -6
  47. package/dist/intent/intent.verifier.d.ts +0 -2
  48. package/dist/intent/intent.verifier.js +0 -2
  49. package/dist/negotiation/insight.generator.d.ts +0 -5
  50. package/dist/negotiation/insight.generator.js +0 -5
  51. package/dist/negotiation/negotiation.agent.d.ts +0 -5
  52. package/dist/negotiation/negotiation.agent.js +0 -5
  53. package/dist/negotiation/negotiation.consultation-policy.d.ts +0 -5
  54. package/dist/negotiation/negotiation.consultation-policy.js +0 -5
  55. package/dist/negotiation/negotiation.deadlock.contracts.d.ts +0 -5
  56. package/dist/negotiation/negotiation.deadlock.contracts.js +0 -5
  57. package/dist/negotiation/negotiation.deadlock.d.ts +0 -5
  58. package/dist/negotiation/negotiation.deadlock.js +0 -5
  59. package/dist/negotiation/negotiation.detail-reader.d.ts +0 -5
  60. package/dist/negotiation/negotiation.detail-reader.js +0 -5
  61. package/dist/negotiation/negotiation.graph.d.ts +0 -5
  62. package/dist/negotiation/negotiation.graph.js +0 -5
  63. package/dist/negotiation/negotiation.intent-snapshot-provenance.d.ts +0 -5
  64. package/dist/negotiation/negotiation.intent-snapshot-provenance.js +0 -5
  65. package/dist/negotiation/negotiation.lifecycle-narration.d.ts +0 -5
  66. package/dist/negotiation/negotiation.lifecycle-narration.js +0 -5
  67. package/dist/negotiation/negotiation.memory.d.ts +0 -7
  68. package/dist/negotiation/negotiation.memory.js +0 -7
  69. package/dist/negotiation/negotiation.protocol.d.ts +0 -5
  70. package/dist/negotiation/negotiation.protocol.js +0 -5
  71. package/dist/negotiation/negotiation.question-safety.d.ts +0 -5
  72. package/dist/negotiation/negotiation.question-safety.js +0 -5
  73. package/dist/negotiation/negotiation.reflect.d.ts +0 -6
  74. package/dist/negotiation/negotiation.reflect.js +0 -6
  75. package/dist/negotiation/negotiation.screen.d.ts +0 -8
  76. package/dist/negotiation/negotiation.screen.js +0 -8
  77. package/dist/negotiation/negotiation.state.d.ts +0 -5
  78. package/dist/negotiation/negotiation.state.js +0 -5
  79. package/dist/negotiation/negotiation.summarizer.d.ts +0 -5
  80. package/dist/negotiation/negotiation.summarizer.js +0 -5
  81. package/dist/negotiation/negotiation.task-lock-policy.d.ts +0 -5
  82. package/dist/negotiation/negotiation.task-lock-policy.js +0 -5
  83. package/dist/negotiation/negotiation.tools.d.ts +0 -5
  84. package/dist/negotiation/negotiation.tools.js +0 -5
  85. package/dist/network/indexer/indexer.graph.d.ts +0 -5
  86. package/dist/network/indexer/indexer.graph.js +0 -5
  87. package/dist/network/indexer/indexer.state.d.ts +0 -5
  88. package/dist/network/indexer/indexer.state.js +0 -5
  89. package/dist/network/membership/membership.graph.d.ts +0 -5
  90. package/dist/network/membership/membership.graph.js +0 -5
  91. package/dist/network/membership/membership.state.d.ts +0 -5
  92. package/dist/network/membership/membership.state.js +0 -5
  93. package/dist/network/network.graph.d.ts +0 -5
  94. package/dist/network/network.graph.js +0 -5
  95. package/dist/network/network.recommender.d.ts +0 -5
  96. package/dist/network/network.recommender.js +0 -5
  97. package/dist/network/network.state.d.ts +0 -5
  98. package/dist/network/network.state.js +0 -5
  99. package/dist/network/network.tools.d.ts +0 -5
  100. package/dist/network/network.tools.js +0 -5
  101. package/dist/opportunity/delivery-card.cache.d.ts +0 -5
  102. package/dist/opportunity/delivery-card.cache.js +0 -5
  103. package/dist/opportunity/discovery-question.helper.d.ts +0 -5
  104. package/dist/opportunity/discovery-question.helper.js +0 -5
  105. package/dist/opportunity/negotiation-context.loader.d.ts +0 -5
  106. package/dist/opportunity/negotiation-context.loader.js +0 -5
  107. package/dist/opportunity/negotiation-summary.builder.d.ts +0 -5
  108. package/dist/opportunity/negotiation-summary.builder.js +0 -5
  109. package/dist/opportunity/opportunity.actor.d.ts +0 -5
  110. package/dist/opportunity/opportunity.actor.js +0 -5
  111. package/dist/opportunity/opportunity.card-presentation.d.ts +0 -5
  112. package/dist/opportunity/opportunity.card-presentation.js +0 -5
  113. package/dist/opportunity/opportunity.claim-safety.d.ts +0 -5
  114. package/dist/opportunity/opportunity.claim-safety.js +0 -5
  115. package/dist/opportunity/opportunity.discovery-negotiation-summary.d.ts +0 -5
  116. package/dist/opportunity/opportunity.discovery-negotiation-summary.js +0 -5
  117. package/dist/opportunity/opportunity.enricher.d.ts +0 -5
  118. package/dist/opportunity/opportunity.enricher.js +0 -5
  119. package/dist/opportunity/opportunity.evaluator.d.ts +0 -5
  120. package/dist/opportunity/opportunity.evaluator.js +0 -5
  121. package/dist/opportunity/opportunity.evidence.d.ts +0 -5
  122. package/dist/opportunity/opportunity.evidence.js +0 -5
  123. package/dist/opportunity/opportunity.existing-negotiation.d.ts +0 -5
  124. package/dist/opportunity/opportunity.existing-negotiation.js +0 -5
  125. package/dist/opportunity/opportunity.feed-selection.d.ts +0 -5
  126. package/dist/opportunity/opportunity.feed-selection.js +0 -5
  127. package/dist/opportunity/opportunity.graph.d.ts +0 -5
  128. package/dist/opportunity/opportunity.graph.js +0 -5
  129. package/dist/opportunity/opportunity.introducer.d.ts +0 -5
  130. package/dist/opportunity/opportunity.introducer.js +0 -5
  131. package/dist/opportunity/opportunity.labels.d.ts +0 -5
  132. package/dist/opportunity/opportunity.labels.js +0 -5
  133. package/dist/opportunity/opportunity.lifecycle.d.ts +0 -5
  134. package/dist/opportunity/opportunity.lifecycle.js +0 -5
  135. package/dist/opportunity/opportunity.newborn-stamping.d.ts +0 -5
  136. package/dist/opportunity/opportunity.newborn-stamping.js +0 -5
  137. package/dist/opportunity/opportunity.owner-approval.d.ts +0 -5
  138. package/dist/opportunity/opportunity.owner-approval.js +0 -5
  139. package/dist/opportunity/opportunity.pending-questions.d.ts +0 -5
  140. package/dist/opportunity/opportunity.pending-questions.js +0 -5
  141. package/dist/opportunity/opportunity.persist.d.ts +0 -5
  142. package/dist/opportunity/opportunity.persist.js +0 -5
  143. package/dist/opportunity/opportunity.persistence-admission.d.ts +0 -5
  144. package/dist/opportunity/opportunity.persistence-admission.js +0 -5
  145. package/dist/opportunity/opportunity.presentation-cache.d.ts +0 -5
  146. package/dist/opportunity/opportunity.presentation-cache.js +0 -5
  147. package/dist/opportunity/opportunity.presentation.d.ts +0 -5
  148. package/dist/opportunity/opportunity.presentation.js +0 -5
  149. package/dist/opportunity/opportunity.presenter.d.ts +0 -12
  150. package/dist/opportunity/opportunity.presenter.js +0 -12
  151. package/dist/opportunity/opportunity.safe-presentation.d.ts +0 -5
  152. package/dist/opportunity/opportunity.safe-presentation.js +0 -5
  153. package/dist/opportunity/opportunity.state.d.ts +0 -5
  154. package/dist/opportunity/opportunity.state.js +0 -5
  155. package/dist/opportunity/opportunity.tools.d.ts +0 -5
  156. package/dist/opportunity/opportunity.tools.js +0 -5
  157. package/dist/opportunity/opportunity.update-admission.d.ts +0 -5
  158. package/dist/opportunity/opportunity.update-admission.js +0 -5
  159. package/dist/opportunity/opportunity.utils.d.ts +0 -5
  160. package/dist/opportunity/opportunity.utils.js +0 -5
  161. package/dist/questioner/questioner.agent.d.ts +0 -6
  162. package/dist/questioner/questioner.agent.js +0 -5
  163. package/dist/questioner/questioner.ask.tool.d.ts +0 -5
  164. package/dist/questioner/questioner.ask.tool.js +0 -5
  165. package/dist/questioner/questioner.discovery.prompt.d.ts +0 -5
  166. package/dist/questioner/questioner.discovery.prompt.js +0 -5
  167. package/dist/questioner/questioner.env.d.ts +0 -5
  168. package/dist/questioner/questioner.env.js +0 -5
  169. package/dist/questioner/questioner.presets.d.ts +0 -6
  170. package/dist/questioner/questioner.presets.js +0 -5
  171. package/dist/questioner/questioner.qud.d.ts +0 -5
  172. package/dist/questioner/questioner.qud.js +0 -5
  173. package/dist/questioner/questioner.tools.d.ts +0 -5
  174. package/dist/questioner/questioner.tools.js +0 -5
  175. package/dist/questioner/questioner.types.d.ts +0 -6
  176. package/dist/questioner/questioner.types.js +0 -5
package/CHANGELOG.md CHANGED
@@ -67,6 +67,9 @@ pin a supported release, use `latest`.
67
67
  `SynthesisResult` types. Minor bump: additive surface only.
68
68
 
69
69
  ### Changed
70
+ - Remove unsupported deprecated source/deep forwarding shims after migrating repository consumers to canonical modules; stable package-root exports are unchanged.
71
+ - Add a fail-closed isolated provider-free test gate (10.1.1). Tooling-only
72
+ safety foundation; no runtime or public API behavior changes.
70
73
  - Share capability classification metadata between the existing architecture
71
74
  boundary gate and the protocol atlas generator; allowed dependency directions
72
75
  are unchanged.
package/IMPLEMENTATION.md CHANGED
@@ -18,6 +18,10 @@ deep imports are not part of the contract. Every symbol is re-exported explicitl
18
18
  See [STABILITY.md](./STABILITY.md) for the full policy and the deprecation path,
19
19
  and [CHANGELOG.md](./CHANGELOG.md) for release history.
20
20
 
21
+ Internal source is domain-first: `signals`, `communities`, `questions`,
22
+ `participant-agents`, `contacts`, and `integrations`; opportunity and negotiation
23
+ place state/contracts in `domain/` and workflows/tools in `application/`.
24
+
21
25
  ## Source-map publication policy
22
26
 
23
27
  Published `@indexnetwork/protocol` tarballs contain **no source maps**: neither
@@ -94,7 +98,6 @@ The package defines interfaces — your application provides the concrete implem
94
98
  | `AgentDispatcher` | Resolves and invokes personal agents during negotiation turns — required to register the negotiation tools |
95
99
  | `McpAuthResolver` | Resolves `{ userId, agentId }` from an incoming MCP HTTP request (MCP server only) |
96
100
  | `DeliveryLedger` | Commits OpenClaw opportunity-delivery rows |
97
- | `DiscoveryRunStore` / `DiscoveryRunQueue` | Persist and execute async MCP discovery runs |
98
101
  | `EnrichmentRunStore` / `EnrichmentRunQueue` | Persist and execute async MCP enrichment runs |
99
102
  | `MintConnectLink` | Mints short connect links for opportunity accepts |
100
103
  | `ChatSummaryReader` | Read-through chat-session digest |
@@ -138,7 +141,6 @@ const tools = await createChatTools({
138
141
  agentDatabase, // AgentDatabase — agent registry
139
142
  agentDispatcher, // AgentDispatcher — routes negotiation turns to personal agents
140
143
  deliveryLedger, // DeliveryLedger — OpenClaw delivery commits
141
- discoveryRuns, // DiscoveryRunStore (+ discoveryRunQueue) — async MCP discovery
142
144
  enrichmentRuns, // EnrichmentRunStore (+ enrichmentRunQueue) — async MCP enrichment runs
143
145
  mintConnectLink, // short connect links for opportunity accepts
144
146
  modelConfig, // override chat model / reasoning effort (see above)
@@ -148,10 +150,9 @@ const tools = await createChatTools({
148
150
  ```
149
151
 
150
152
  `createChatTools` accepts a single `ToolContext` object. The required adapters
151
- above are always needed; the optional capabilities default to a degraded-but-
152
- functional mode when omitted (e.g. without `agentDispatcher` the negotiation
153
- tools are not registered, and without `discoveryRuns` MCP discovery runs
154
- synchronously).
153
+ above are always needed; optional capabilities default to a degraded-but-
154
+ functional mode when omitted (for example, without `agentDispatcher` the
155
+ negotiation tools are not registered).
155
156
 
156
157
  ## Graphs
157
158
 
@@ -181,7 +182,7 @@ Each factory takes its typed dependencies in the constructor and exposes a
181
182
  |---|---|
182
183
  | `ChatGraphFactory` | ReAct chat loop — LLM calls tools, responds to the user |
183
184
  | `IntentGraphFactory` | Clarify, infer, verify felicity, reconcile, and persist intents |
184
- | `OpportunityGraphFactory` | HyDE-based discovery: search, evaluate (valency), rank, persist |
185
+ | `OpportunityGraphFactory` | Background matching: search, evaluate (valency), rank, persist |
185
186
  | `EnrichmentGraphFactory` | Enrich users (scrape + embed) and decompose into premises |
186
187
  | `PremiseGraphFactory` | Decompose and index a user's premises |
187
188
  | `NegotiationGraphFactory` | Multi-turn bilateral negotiation flows |
@@ -1,2 +1,2 @@
1
1
  /** Narrow opportunities safety port for text that may leave another capability. */
2
- export { hasUnsupportedOpportunityClaim, stripUnsupportedOpportunityClaims } from "../opportunity/opportunity.claim-safety.js";
2
+ export { hasUnsupportedOpportunityClaim, stripUnsupportedOpportunityClaims } from "../opportunity/domain/opportunity.claim-safety.js";
@@ -1,2 +1,2 @@
1
1
  /** Narrow opportunities safety port for text that may leave another capability. */
2
- export { hasUnsupportedOpportunityClaim, stripUnsupportedOpportunityClaims } from "../opportunity/opportunity.claim-safety.js";
2
+ export { hasUnsupportedOpportunityClaim, stripUnsupportedOpportunityClaims } from "../opportunity/domain/opportunity.claim-safety.js";
@@ -242,9 +242,8 @@ export declare class ChatAgent {
242
242
  */
243
243
  private executeToolCalls;
244
244
  /**
245
- * Check whether any tool call produced valid opportunity blocks.
246
- * Both `discover_opportunities` and `list_opportunities` can return
247
- * ```opportunity code blocks — either one counts as a valid source.
245
+ * Check whether `list_opportunities` returned valid opportunity blocks.
246
+ * Persisted cards from that tool are the only valid source.
248
247
  */
249
248
  private static hasOpportunitySource;
250
249
  /**
@@ -278,7 +277,7 @@ export declare class ChatAgent {
278
277
  private static readonly STEP_NAME_MAX;
279
278
  /**
280
279
  * Post-process a tool result: strip _graphTimings, extract summary/debugSteps,
281
- * and optionally run discover_opportunities create_intent callback.
280
+ * and optionally normalize a tool result before a create_intent callback.
282
281
  *
283
282
  * Returns the normalized result string and extracted debug metadata so both
284
283
  * the normal streaming tool loop and the hallucination-recovery branch
@@ -359,9 +359,8 @@ export class ChatAgent {
359
359
  return results;
360
360
  }
361
361
  /**
362
- * Check whether any tool call produced valid opportunity blocks.
363
- * Both `discover_opportunities` and `list_opportunities` can return
364
- * ```opportunity code blocks — either one counts as a valid source.
362
+ * Check whether `list_opportunities` returned valid opportunity blocks.
363
+ * Persisted cards from that tool are the only valid source.
365
364
  */
366
365
  static hasOpportunitySource(toolsUsed) {
367
366
  return toolsUsed.some((t) => t.name === "list_opportunities" &&
@@ -431,7 +430,7 @@ export class ChatAgent {
431
430
  }
432
431
  /**
433
432
  * Post-process a tool result: strip _graphTimings, extract summary/debugSteps,
434
- * and optionally run discover_opportunities create_intent callback.
433
+ * and optionally normalize a tool result before a create_intent callback.
435
434
  *
436
435
  * Returns the normalized result string and extracted debug metadata so both
437
436
  * the normal streaming tool loop and the hallucination-recovery branch
@@ -9,8 +9,8 @@
9
9
  import { StateGraph, START, END } from '@langchain/langgraph';
10
10
  import { MaintenanceGraphState } from './maintenance.state.js';
11
11
  import { computeRadarHealth } from '../opportunity/radar/radar.health.js';
12
- import { canUserSeeOpportunity, classifyOpportunity, isActionableForViewer, RADAR_SOFT_TARGETS } from '../opportunity/opportunity.utils.js';
13
- import { shouldRunIntroducerDiscovery, runIntroducerDiscovery } from '../opportunity/opportunity.introducer.js';
12
+ import { canUserSeeOpportunity, classifyOpportunity, isActionableForViewer, RADAR_SOFT_TARGETS } from '../opportunity/domain/opportunity.utils.js';
13
+ import { shouldRunIntroducerDiscovery, runIntroducerDiscovery } from '../opportunity/application/opportunity.introducer.js';
14
14
  import { isIntroducerDiscoveryEnabled } from '../opportunity/application/opportunity.introducer-feature.js';
15
15
  import { protocolLogger } from '../shared/observability/protocol.logger.js';
16
16
  const logger = protocolLogger('MaintenanceGraph');
@@ -21,29 +21,5 @@
21
21
  * └── index.ts — this file
22
22
  * ```
23
23
  *
24
- * ## Legacy paths (thin inward shims)
25
- *
26
- * The following old flat-file paths are preserved as thin re-export shims for
27
- * backward compatibility with test files and runtime composition:
28
- * - negotiation/negotiation.state.ts → domain
29
- * - negotiation/negotiation.protocol.ts → domain
30
- * - negotiation/negotiation.deadlock.ts → domain
31
- * - negotiation/negotiation.deadlock.contracts.ts → domain
32
- * - negotiation/negotiation.lifecycle-narration.ts → domain
33
- * - negotiation/negotiation.task-lock-policy.ts → domain
34
- * - negotiation/negotiation.intent-snapshot-provenance.ts → domain
35
- * - negotiation/negotiation.consultation-policy.ts → domain
36
- * - negotiation/negotiation.question-safety.ts → domain
37
- * - negotiation/negotiation.memory.ts → domain
38
- * - negotiation/negotiation.graph.ts → application
39
- * - negotiation/negotiation.agent.ts → application
40
- * - negotiation/negotiation.screen.ts → application (+ screen contracts from domain)
41
- * - negotiation/negotiation.reflect.ts → application
42
- * - negotiation/negotiation.summarizer.ts → application
43
- * - negotiation/negotiation.tools.ts → application
44
- * - negotiation/negotiation.detail-reader.ts → application
45
- * - negotiation/insight.generator.ts → application
46
- * - capabilities/negotiation*.facade.ts → public surface
47
- * - capabilities/negotiation.tools.port.ts → ports
48
24
  */
49
25
  export * from "./public/index.js";
@@ -21,29 +21,5 @@
21
21
  * └── index.ts — this file
22
22
  * ```
23
23
  *
24
- * ## Legacy paths (thin inward shims)
25
- *
26
- * The following old flat-file paths are preserved as thin re-export shims for
27
- * backward compatibility with test files and runtime composition:
28
- * - negotiation/negotiation.state.ts → domain
29
- * - negotiation/negotiation.protocol.ts → domain
30
- * - negotiation/negotiation.deadlock.ts → domain
31
- * - negotiation/negotiation.deadlock.contracts.ts → domain
32
- * - negotiation/negotiation.lifecycle-narration.ts → domain
33
- * - negotiation/negotiation.task-lock-policy.ts → domain
34
- * - negotiation/negotiation.intent-snapshot-provenance.ts → domain
35
- * - negotiation/negotiation.consultation-policy.ts → domain
36
- * - negotiation/negotiation.question-safety.ts → domain
37
- * - negotiation/negotiation.memory.ts → domain
38
- * - negotiation/negotiation.graph.ts → application
39
- * - negotiation/negotiation.agent.ts → application
40
- * - negotiation/negotiation.screen.ts → application (+ screen contracts from domain)
41
- * - negotiation/negotiation.reflect.ts → application
42
- * - negotiation/negotiation.summarizer.ts → application
43
- * - negotiation/negotiation.tools.ts → application
44
- * - negotiation/negotiation.detail-reader.ts → application
45
- * - negotiation/insight.generator.ts → application
46
- * - capabilities/negotiation*.facade.ts → public surface
47
- * - capabilities/negotiation.tools.port.ts → ports
48
24
  */
49
25
  export * from "./public/index.js";
@@ -1,4 +1,4 @@
1
- import type { NegotiationTurn } from "./negotiation.state.js";
1
+ import type { NegotiationTurn } from "./domain/negotiation.state.js";
2
2
  /**
3
3
  * Prior-dialogue attribution (IND-569).
4
4
  *
@@ -2230,15 +2230,15 @@ export class OpportunityGraphFactory {
2230
2230
  // represented user (from-introducer, via onBehalfOfUserId).
2231
2231
  initiatorUserId: discoveryUserId,
2232
2232
  onCandidateResolved });
2233
- // MCP-only: race the whole negotiate phase against a budget. When the
2234
- // timer wins we return early with a `timed_out` trace; the unresolved
2235
- // promise keeps running in the Bun event loop and each candidate's
2236
- // finalize node updates its opp status in the DB. We deliberately do
2237
- // NOT await it, NOT abort it, and NOT mutate state.opportunities
2238
- // the MCP tool handler refreshes statuses from the DB before
2239
- // responding. Bounded blast radius: at most ~20 s of background work
2240
- // per request; orphans heal via maintenance scripts or IND-279 when
2241
- // it lands.
2233
+ // Optionally bound this opportunity-matching continuation phase. When
2234
+ // the timer wins, return a `timed_out` trace while the unresolved
2235
+ // continuation keeps running in the Bun event loop; each candidate's
2236
+ // finalize node persists its opportunity status in the DB. Deliberately
2237
+ // do NOT await it, abort it, or add unfinished results to
2238
+ // state.opportunities: later opportunity reads observe the persisted
2239
+ // continuation state. The budget limits this invocation's wait, not
2240
+ // background matching work; orphans heal via maintenance scripts or
2241
+ // IND-279 when it lands.
2242
2242
  const budgetMs = state.options.negotiateTimeoutMs;
2243
2243
  let acceptedResults;
2244
2244
  if (budgetMs !== undefined) {
@@ -131,12 +131,12 @@ export interface OpportunityGraphOptions {
131
131
  /** Chat session ID for draft opportunities; stored as context.conversationId for visibility filtering. */
132
132
  conversationId?: string;
133
133
  /**
134
- * MCP-only: cap the negotiate-phase wall-clock at this many milliseconds.
134
+ * Cap the negotiate-phase wall-clock at this many milliseconds.
135
135
  * When set, `negotiateNode` races `negotiateCandidates(...)` against a timer;
136
136
  * if the timer wins, the node returns early with a `timed_out` trace and the
137
- * unawaited negotiation chains finalize each opp's DB status in the
138
- * background. Set to 20_000 by the MCP `discover_opportunities` handler.
139
- * Chat, ambient queue, and all other callers omit this — existing behavior.
137
+ * unawaited negotiation chains finalize each opportunity's DB status in the
138
+ * background. Foreground callers omit this; background matching supplies it
139
+ * only where its bounded execution requires it.
140
140
  */
141
141
  negotiateTimeoutMs?: number;
142
142
  }
@@ -25,13 +25,5 @@
25
25
  * - negotiation-evidence/ — Lens C evidence extraction and mining
26
26
  * - outcome/ — Lens B outcome hypothesis mining
27
27
  * - radar/ — radar graph (flat presenter-card list) and radar health
28
- *
29
- * ## Legacy paths (thin inward shims)
30
- * The following old flat-file paths are preserved as thin re-export shims for
31
- * backward compatibility with test files and runtime composition. All shims
32
- * delegate to opportunity/domain or opportunity/application.
33
- *
34
- * IND-551 completion gate: remove compatibility shims only after an approved
35
- * deprecation/SemVer plan is in place.
36
28
  */
37
29
  export * from "./public/index.js";
@@ -25,13 +25,5 @@
25
25
  * - negotiation-evidence/ — Lens C evidence extraction and mining
26
26
  * - outcome/ — Lens B outcome hypothesis mining
27
27
  * - radar/ — radar graph (flat presenter-card list) and radar health
28
- *
29
- * ## Legacy paths (thin inward shims)
30
- * The following old flat-file paths are preserved as thin re-export shims for
31
- * backward compatibility with test files and runtime composition. All shims
32
- * delegate to opportunity/domain or opportunity/application.
33
- *
34
- * IND-551 completion gate: remove compatibility shims only after an approved
35
- * deprecation/SemVer plan is in place.
36
28
  */
37
29
  export * from "./public/index.js";
@@ -12,12 +12,12 @@
12
12
  */
13
13
  import { StateGraph, START, END } from '@langchain/langgraph';
14
14
  import { RadarGraphState } from './radar.state.js';
15
- import { OpportunityPresenter, gatherPresenterContext } from '../opportunity.presenter.js';
16
- import { loadNegotiationContext } from '../negotiation-context.loader.js';
17
- import { canUserSeeOpportunity, isActionableForViewer, selectByComposition } from '../opportunity.utils.js';
18
- import { getPrimaryActionLabel, SECONDARY_ACTION_LABEL } from '../opportunity.labels.js';
19
- import { safeFallbackSummary } from '../opportunity.safe-presentation.js';
20
- import { buildRadarCardPresentationCacheKey } from '../opportunity.presentation-cache.js';
15
+ import { OpportunityPresenter, gatherPresenterContext } from '../application/opportunity.presenter.js';
16
+ import { loadNegotiationContext } from '../application/negotiation-context.loader.js';
17
+ import { canUserSeeOpportunity, isActionableForViewer, selectByComposition } from '../domain/opportunity.utils.js';
18
+ import { getPrimaryActionLabel, SECONDARY_ACTION_LABEL } from '../domain/opportunity.labels.js';
19
+ import { safeFallbackSummary } from '../domain/opportunity.safe-presentation.js';
20
+ import { buildRadarCardPresentationCacheKey } from '../domain/opportunity.presentation-cache.js';
21
21
  import { protocolLogger } from '../../shared/observability/protocol.logger.js';
22
22
  import { timed } from '../../shared/observability/performance.js';
23
23
  import { requestContext } from "../../shared/observability/request-context.js";
@@ -1,4 +1,4 @@
1
- import { RADAR_SOFT_TARGETS } from '../opportunity.utils.js';
1
+ import { RADAR_SOFT_TARGETS } from '../domain/opportunity.utils.js';
2
2
  const WEIGHT_COMPOSITION = 0.4;
3
3
  const WEIGHT_FRESHNESS = 0.3;
4
4
  const WEIGHT_EXPIRATION = 0.3;
@@ -22,7 +22,7 @@ export type CanonicalGuidanceTopic = (typeof CANONICAL_GUIDANCE_TOPICS)[number];
22
22
  * Never mentions retired contact/Gmail/scrape/profile/ghost-user guidance.
23
23
  * Optimized to ~1900 chars to leave room for MCP_INSTRUCTIONS context budget.
24
24
  */
25
- export declare const CANONICAL_GUIDANCE_SUMMARY = "# Index Network Protocol\n\nIndex Network is a private, intent-driven discovery protocol. Users express signals (intents), agents find matches within shared networks, and decisions proceed through clear gates.\n\n## Core Concepts\n\n**Identity & Context** \u2014 User profile (name, bio, skills, interests, location) and current scope (networks, intents, stage).\n\n**Premises** \u2014 Foundational facts: background, experience, stage, timeline, constraints.\n\n**Signals** \u2014 What users seek (intents, opportunities). Drive semantic matching.\n\n**Communities & Networks** \u2014 Private groups where members share signals and discover connections via shared membership.\n\n**Opportunities** \u2014 Discovered matches between users. Lifecycle: draft \u2192 pending \u2192 accepted/rejected/expired.\n\n**Negotiations** \u2014 Agents coordinate, users approve. **A2A acceptance is not owner approval.** These are separate gates.\n\n**Workflows** \u2014 H2A (users express signals \u2192 agents discover) and A2A (agents coordinate) over MCP. Further escalation via native surfaces (human-to-human threads do not cross MCP).\n\n## Canonical Topics\n\nRefer to these for detailed entity facts and lifecycle:\n\n- **identity-context** \u2014 Profile structure, context scoping\n- **premises** \u2014 Background, stage, constraints\n- **signals** \u2014 Intent inference, classification\n- **communities-networks** \u2014 Membership, auto-assign\n- **opportunities** \u2014 Discovery, roles, reasoning\n- **negotiations** \u2014 Owner approval vs A2A, acceptance gates\n- **workflows** \u2014 H2A and A2A tool sequences";
25
+ export declare const CANONICAL_GUIDANCE_SUMMARY = "# Index Network Protocol\n\nIndex Network is a private, intent-driven discovery protocol. Users express signals (intents), agents find matches within shared networks, and decisions proceed through clear gates.\n\n## Core Concepts\n\n**Identity & Context** \u2014 Account and presentation metadata plus scoped runtime state (networks, signals, stage).\n\n**Premises** \u2014 Foundational facts: background, experience, stage, timeline, constraints.\n\n**Signals** \u2014 What users seek (intents, opportunities). Drive semantic matching.\n\n**Communities & Networks** \u2014 Private groups where members share signals and discover connections via shared membership.\n\n**Opportunities** \u2014 Discovered matches between users. Lifecycle: draft \u2192 pending \u2192 accepted/rejected/expired.\n\n**Negotiations** \u2014 Agents coordinate, users approve. **A2A acceptance is not owner approval.** These are separate gates.\n\n**Workflows** \u2014 H2A (users express signals \u2192 agents discover) and A2A (agents coordinate) over MCP. Further escalation via native surfaces (human-to-human threads do not cross MCP).\n\n## Canonical Topics\n\nRefer to these for detailed entity facts and lifecycle:\n\n- **identity-context** \u2014 Presentation identity, context scoping, matching inputs\n- **premises** \u2014 Background, stage, constraints\n- **signals** \u2014 Intent inference, classification\n- **communities-networks** \u2014 Membership, auto-assign\n- **opportunities** \u2014 Discovery, roles, reasoning\n- **negotiations** \u2014 Owner approval vs A2A, acceptance gates\n- **workflows** \u2014 H2A and A2A tool sequences";
26
26
  /**
27
27
  * Detailed canonical topic content for read_docs.
28
28
  * Indexed by topic name; each contains current entity, capability, and lifecycle facts.
@@ -35,7 +35,7 @@ Index Network is a private, intent-driven discovery protocol. Users express sign
35
35
 
36
36
  ## Core Concepts
37
37
 
38
- **Identity & Context** — User profile (name, bio, skills, interests, location) and current scope (networks, intents, stage).
38
+ **Identity & Context** — Account and presentation metadata plus scoped runtime state (networks, signals, stage).
39
39
 
40
40
  **Premises** — Foundational facts: background, experience, stage, timeline, constraints.
41
41
 
@@ -53,7 +53,7 @@ Index Network is a private, intent-driven discovery protocol. Users express sign
53
53
 
54
54
  Refer to these for detailed entity facts and lifecycle:
55
55
 
56
- - **identity-context** — Profile structure, context scoping
56
+ - **identity-context** — Presentation identity, context scoping, matching inputs
57
57
  - **premises** — Background, stage, constraints
58
58
  - **signals** — Intent inference, classification
59
59
  - **communities-networks** — Membership, auto-assign
@@ -67,23 +67,20 @@ Refer to these for detailed entity facts and lifecycle:
67
67
  export const CANONICAL_GUIDANCE_TOPICS_CONTENT = {
68
68
  "identity-context": `## Identity & Context
69
69
 
70
- **Identity** is the user's profile on the platform: name, bio, skills, interests, location, social links. It's used for semantic matching and is enriched from social URLs (LinkedIn, GitHub) or explicit user input.
70
+ **Identity** is account and presentation metadata: name, bio, location, skills, interests, and social links. It identifies and presents the user; it does not provide a profile-vector matching corpus.
71
71
 
72
- **Context** is the user's current scope: which networks they belong to, what intents they've expressed, their stage (onboarding vs established), their preferences (e.g. geographic scope). Context shapes what discovery surfaces and what tools are available.
72
+ **Context** is scoped runtime state: network memberships, approved signals, lifecycle stage, and current opportunity or negotiation state. It determines the user's active scope and available workflow state.
73
73
 
74
- ### Profile Structure
75
- - Name, bio, location
76
- - Skills and interests (arrays)
77
- - Social links (LinkedIn, GitHub, Twitter, personal websites)
78
- - Embeddings for semantic matching (generated via HyDE — hypothetical document embedding)
74
+ ### Matching Inputs
75
+ Matching uses approved signals, premises, shared network membership, and current opportunity or negotiation state. Premises supply the asserted background, constraints, and capabilities that ground relevant matches.
79
76
 
80
77
  ### Context Scoping
81
78
  - Users can belong to multiple networks
82
79
  - Each network has a scope (open to all members or invite-only)
83
- - Discovery is scoped to shared networks
80
+ - Matching is scoped to shared networks
84
81
 
85
82
  ### Key Distinction
86
- Identity is static and represents who the user is. Context is dynamic and represents where they are in their journey and what they're focused on at this moment.`,
83
+ Identity is account/presentation metadata. Context is dynamic, scoped runtime state for what the user is doing now.`,
87
84
  premises: `## Premises
88
85
 
89
86
  **Premise** is the foundational context that shapes what matches will be relevant: a user's background, experience level, location, timeline, stage of life, constraints, and what they can actually commit to.
@@ -21,7 +21,7 @@ import type { AgentDispatcher } from "../interfaces/agent-dispatcher.interface.j
21
21
  import type { DeliveryLedger } from "../interfaces/delivery-ledger.interface.js";
22
22
  import type { ChatQuestionsHost, QuestionerDatabase } from "../interfaces/questioner.interface.js";
23
23
  import type { NegotiatorMemoryToolsHost } from "../interfaces/negotiator-memory.interface.js";
24
- import type { QuestionerEnqueueFn } from "../../questioner/questioner.types.js";
24
+ import type { QuestionerEnqueueFn } from "../../questions/application/question.input.js";
25
25
  import type { PendingQuestionSummary } from "../schemas/pending-question.schema.js";
26
26
  import type { QuestionMode, QuestionPurpose } from "../schemas/question.schema.js";
27
27
  import type { EnrichmentRunQueue, EnrichmentRunStore } from "../interfaces/enrichment-run.interface.js";
@@ -10,7 +10,7 @@
10
10
  * module cycle through the negotiation capability facade.
11
11
  */
12
12
  import type { NegotiationTurn, UserNegotiationContext, SeedAssessment } from '../schemas/negotiation-state.schema.js';
13
- import type { NegotiatorMemoryEntry } from '../../negotiation/negotiation.memory.js';
13
+ import type { NegotiatorMemoryEntry } from '../../negotiation/domain/negotiation.memory.js';
14
14
  import type { AttributedPriorDialogue } from '../../negotiation/negotiation.attribution.js';
15
15
  import type { NegotiationPrivateConsultation } from './database.interface.js';
16
16
  /** Payload sent to the dispatcher for each negotiation turn. */
@@ -1,6 +1,6 @@
1
1
  import { BaseMessage } from "@langchain/core/messages";
2
- import { InferredIntent } from "../../intent/intent.inferrer.js";
3
- import { SemanticVerifierOutput } from "../../intent/intent.verifier.js";
2
+ import { InferredIntent } from "../application/intent.inferrer.js";
3
+ import { SemanticVerifierOutput } from "../application/intent.verifier.js";
4
4
  import type { DebugMetaAgent } from '../../capabilities/participant-agents.debug.facade.js';
5
5
  import type { ToolScopeType } from '../../shared/agent/tool.scope.js';
6
6
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indexnetwork/protocol",
3
- "version": "10.1.0-rc.450.1",
3
+ "version": "10.1.2-rc.452.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -20,8 +20,9 @@
20
20
  "build": "rm -rf dist && tsc",
21
21
  "build:package": "rm -rf dist && tsc --project tsconfig.package.json",
22
22
  "dev": "tsc --watch",
23
- "test": "bun test",
24
- "test:isolated": "bun scripts/test.ts",
23
+ "test": "bun test scripts/tests/test-runner.spec.ts && bun scripts/test.ts",
24
+ "test:isolated": "bun test scripts/tests/test-runner.spec.ts && bun scripts/test.ts",
25
+ "test:shared": "bun test",
25
26
  "test:architecture": "bun test src/architecture/tests scripts/architecture/tests",
26
27
  "architecture:exports": "bun scripts/architecture/export-inventory.ts",
27
28
  "architecture:exports:update": "bun scripts/architecture/export-inventory.ts --write",
@@ -1,11 +0,0 @@
1
- /**
2
- * @deprecated — compatibility shim.
3
- *
4
- * Canonical implementation has moved to participant-agents/application.
5
- * This re-export exists solely to avoid breaking imports that pre-date IND-548.
6
- * Import from the participant-agents module or capabilities/participant-agents.facade.ts
7
- * for new code.
8
- *
9
- * IND-548: migrated to src/participant-agents/application/agent.tools.ts.
10
- */
11
- export { createAgentTools } from '../participant-agents/application/index.js';
@@ -1,11 +0,0 @@
1
- /**
2
- * @deprecated — compatibility shim.
3
- *
4
- * Canonical implementation has moved to participant-agents/application.
5
- * This re-export exists solely to avoid breaking imports that pre-date IND-548.
6
- * Import from the participant-agents module or capabilities/participant-agents.facade.ts
7
- * for new code.
8
- *
9
- * IND-548: migrated to src/participant-agents/application/agent.tools.ts.
10
- */
11
- export { createAgentTools } from '../participant-agents/application/index.js';
@@ -1,10 +0,0 @@
1
- /**
2
- * @deprecated Canonical location: contacts/application/contact.inviter
3
- * Retained for backward compatibility during IND-549 migration.
4
- * Import generateInviteMessage from contacts/application or via
5
- * capabilities/contacts.facade.ts instead.
6
- *
7
- * IND-549: migrated to src/contacts/application/contact.inviter.ts.
8
- */
9
- export { generateInviteMessage } from "../contacts/application/index.js";
10
- export type { InviteInput, InviteOutput } from "../contacts/application/index.js";
@@ -1,9 +0,0 @@
1
- /**
2
- * @deprecated Canonical location: contacts/application/contact.inviter
3
- * Retained for backward compatibility during IND-549 migration.
4
- * Import generateInviteMessage from contacts/application or via
5
- * capabilities/contacts.facade.ts instead.
6
- *
7
- * IND-549: migrated to src/contacts/application/contact.inviter.ts.
8
- */
9
- export { generateInviteMessage } from "../contacts/application/index.js";
@@ -1,9 +0,0 @@
1
- /**
2
- * @deprecated Canonical location: contacts/application/contact.tools
3
- * Retained for backward compatibility during IND-549 migration.
4
- * Import createContactTools from contacts/application or via
5
- * capabilities/contacts.facade.ts instead.
6
- *
7
- * IND-549: migrated to src/contacts/application/contact.tools.ts.
8
- */
9
- export { createContactTools } from "../contacts/application/index.js";
@@ -1,9 +0,0 @@
1
- /**
2
- * @deprecated Canonical location: contacts/application/contact.tools
3
- * Retained for backward compatibility during IND-549 migration.
4
- * Import createContactTools from contacts/application or via
5
- * capabilities/contacts.facade.ts instead.
6
- *
7
- * IND-549: migrated to src/contacts/application/contact.tools.ts.
8
- */
9
- export { createContactTools } from "../contacts/application/index.js";
@@ -1,9 +0,0 @@
1
- /**
2
- * @deprecated Canonical location: integrations/application/integration.tools
3
- * Retained for backward compatibility during IND-549 migration.
4
- * Import createIntegrationTools from integrations/application or via
5
- * capabilities/integrations.facade.ts instead.
6
- *
7
- * IND-549: migrated to src/integrations/application/integration.tools.ts.
8
- */
9
- export { createIntegrationTools } from "../integrations/application/index.js";
@@ -1,9 +0,0 @@
1
- /**
2
- * @deprecated Canonical location: integrations/application/integration.tools
3
- * Retained for backward compatibility during IND-549 migration.
4
- * Import createIntegrationTools from integrations/application or via
5
- * capabilities/integrations.facade.ts instead.
6
- *
7
- * IND-549: migrated to src/integrations/application/integration.tools.ts.
8
- */
9
- export { createIntegrationTools } from "../integrations/application/index.js";
@@ -1,3 +0,0 @@
1
- /** @deprecated Canonical location: signals/application/intent.clarifier — retained for backward compatibility (IND-544). */
2
- export { IntentClarifier } from "../signals/application/intent.clarifier.js";
3
- export type { IntentClarifierOutput } from "../signals/application/intent.clarifier.js";
@@ -1,2 +0,0 @@
1
- /** @deprecated Canonical location: signals/application/intent.clarifier — retained for backward compatibility (IND-544). */
2
- export { IntentClarifier } from "../signals/application/intent.clarifier.js";
@@ -1,5 +0,0 @@
1
- /**
2
- * @deprecated Canonical location: signals/application/intent.graph
3
- * Retained for backward compatibility during IND-544 migration.
4
- */
5
- export { IntentGraphFactory, enforceIntentActionBoundary, buildExplicitUpdateActions, } from "../signals/application/intent.graph.js";
@@ -1,5 +0,0 @@
1
- /**
2
- * @deprecated Canonical location: signals/application/intent.graph
3
- * Retained for backward compatibility during IND-544 migration.
4
- */
5
- export { IntentGraphFactory, enforceIntentActionBoundary, buildExplicitUpdateActions, } from "../signals/application/intent.graph.js";
@@ -1,2 +0,0 @@
1
- /** @deprecated Canonical location: signals/application/intent.indexer — retained for backward compatibility (IND-544). */
2
- export { IntentIndexer, IntentIndexerOutputSchema, type IntentIndexerOutput, } from "../signals/application/intent.indexer.js";
@@ -1,2 +0,0 @@
1
- /** @deprecated Canonical location: signals/application/intent.indexer — retained for backward compatibility (IND-544). */
2
- export { IntentIndexer, IntentIndexerOutputSchema, } from "../signals/application/intent.indexer.js";
@@ -1,2 +0,0 @@
1
- /** @deprecated Canonical location: signals/application/intent.inferrer — retained for backward compatibility (IND-544). */
2
- export { ExplicitIntentInferrer, type InferrerOptions, type InferredIntent, } from "../signals/application/intent.inferrer.js";
@@ -1,2 +0,0 @@
1
- /** @deprecated Canonical location: signals/application/intent.inferrer — retained for backward compatibility (IND-544). */
2
- export { ExplicitIntentInferrer, } from "../signals/application/intent.inferrer.js";
@@ -1,2 +0,0 @@
1
- /** @deprecated Canonical location: signals/application/intent.reconciler — retained for backward compatibility (IND-544). */
2
- export { IntentReconciler, type IntentReconcilerOutput, type NormalizedIntentAction, } from "../signals/application/intent.reconciler.js";
@@ -1,2 +0,0 @@
1
- /** @deprecated Canonical location: signals/application/intent.reconciler — retained for backward compatibility (IND-544). */
2
- export { IntentReconciler, } from "../signals/application/intent.reconciler.js";
@@ -1,2 +0,0 @@
1
- /** @deprecated Canonical location: signals/domain/signal.specificity — retained for backward compatibility (IND-544). */
2
- export { DEFAULT_SPECIFICITY_WARNING } from "../signals/domain/signal.specificity.js";
@@ -1,2 +0,0 @@
1
- /** @deprecated Canonical location: signals/domain/signal.specificity — retained for backward compatibility (IND-544). */
2
- export { DEFAULT_SPECIFICITY_WARNING } from "../signals/domain/signal.specificity.js";
@@ -1,10 +0,0 @@
1
- /**
2
- * @deprecated — canonical location is `signals/domain/intent.state`.
3
- * This module is a backward-compatibility re-export retained so existing
4
- * imports inside `intent/` continue to resolve without change while the
5
- * signals module migration (IND-544) proceeds incrementally.
6
- *
7
- * Do not add new exports here; add them to `signals/domain/intent.state.ts`
8
- * and let them flow through this shim.
9
- */
10
- export { type VerifiedIntent, type IntentValidationFailureCategory, type IntentValidationFailure, type ExecutionResult, IntentGraphState, } from "../signals/domain/intent.state.js";
@@ -1,10 +0,0 @@
1
- /**
2
- * @deprecated — canonical location is `signals/domain/intent.state`.
3
- * This module is a backward-compatibility re-export retained so existing
4
- * imports inside `intent/` continue to resolve without change while the
5
- * signals module migration (IND-544) proceeds incrementally.
6
- *
7
- * Do not add new exports here; add them to `signals/domain/intent.state.ts`
8
- * and let them flow through this shim.
9
- */
10
- export { IntentGraphState, } from "../signals/domain/intent.state.js";
@@ -1,6 +0,0 @@
1
- /**
2
- * @deprecated Canonical location: signals/application/intent.tools (tool factory)
3
- * and runtime/foreground/signals/intent.tools (foreground adapter).
4
- * Retained for backward compatibility during IND-544 migration.
5
- */
6
- export { createIntentTools, setIntentClarifierForTesting, describeIntentUpdateFailure, } from "../signals/application/intent.tools.js";