@indexnetwork/protocol 10.1.1-rc.451.1 → 10.1.3-rc.453.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.
- package/CHANGELOG.md +2 -0
- package/IMPLEMENTATION.md +8 -7
- package/dist/capabilities/opportunities.facade.d.ts +2 -3
- package/dist/capabilities/opportunities.facade.js +1 -2
- package/dist/capabilities/opportunities.safety.facade.d.ts +1 -1
- package/dist/capabilities/opportunities.safety.facade.js +1 -1
- package/dist/chat/chat.agent.d.ts +3 -4
- package/dist/chat/chat.agent.js +3 -4
- package/dist/contacts/index.d.ts +2 -7
- package/dist/contacts/index.js +2 -7
- package/dist/contacts/ports/contact.tools.port.d.ts +2 -3
- package/dist/contacts/ports/contact.tools.port.js +2 -3
- package/dist/contacts/ports/index.d.ts +1 -2
- package/dist/contacts/ports/index.js +1 -2
- package/dist/integrations/index.d.ts +2 -6
- package/dist/integrations/index.js +2 -6
- package/dist/integrations/ports/index.d.ts +1 -2
- package/dist/integrations/ports/index.js +1 -2
- package/dist/integrations/ports/integration.tools.port.d.ts +2 -3
- package/dist/integrations/ports/integration.tools.port.js +2 -3
- package/dist/maintenance/maintenance.graph.js +2 -2
- package/dist/negotiation/index.d.ts +0 -24
- package/dist/negotiation/index.js +0 -24
- package/dist/negotiation/negotiation.attribution.d.ts +1 -1
- package/dist/negotiation/ports/index.d.ts +0 -2
- package/dist/negotiation/ports/index.js +0 -2
- package/dist/negotiation/ports/negotiation.tools.port.d.ts +0 -1
- package/dist/opportunity/application/opportunity.graph.js +9 -9
- package/dist/opportunity/application/opportunity.tools.d.ts +1 -1
- package/dist/opportunity/domain/index.d.ts +0 -2
- package/dist/opportunity/domain/index.js +0 -2
- package/dist/opportunity/domain/opportunity.state.d.ts +4 -4
- package/dist/opportunity/index.d.ts +0 -8
- package/dist/opportunity/index.js +0 -8
- package/dist/opportunity/radar/radar.graph.js +6 -6
- package/dist/opportunity/radar/radar.health.js +1 -1
- package/dist/participant-agents/index.d.ts +1 -4
- package/dist/participant-agents/index.js +1 -4
- package/dist/participant-agents/ports/index.d.ts +0 -1
- package/dist/participant-agents/ports/index.js +0 -1
- package/dist/questions/index.d.ts +1 -3
- package/dist/questions/index.js +1 -3
- package/dist/questions/ports/question.tools.port.d.ts +1 -2
- package/dist/shared/agent/canonical-guidance.d.ts +1 -1
- package/dist/shared/agent/canonical-guidance.js +8 -11
- package/dist/shared/agent/tool.helpers.d.ts +1 -1
- package/dist/shared/interfaces/agent-dispatcher.interface.d.ts +1 -1
- package/dist/signals/domain/intent.state.d.ts +2 -2
- package/package.json +1 -1
- package/dist/agent/agent.tools.d.ts +0 -11
- package/dist/agent/agent.tools.js +0 -11
- package/dist/capabilities/contacts.tools.port.d.ts +0 -9
- package/dist/capabilities/contacts.tools.port.js +0 -1
- package/dist/capabilities/integrations.tools.port.d.ts +0 -9
- package/dist/capabilities/integrations.tools.port.js +0 -1
- package/dist/capabilities/negotiation.tools.port.d.ts +0 -5
- package/dist/capabilities/negotiation.tools.port.js +0 -1
- package/dist/capabilities/opportunities.tools.port.d.ts +0 -5
- package/dist/capabilities/opportunities.tools.port.js +0 -1
- package/dist/capabilities/participant-agents.tools.port.d.ts +0 -9
- package/dist/capabilities/participant-agents.tools.port.js +0 -1
- package/dist/capabilities/questions.tools.port.d.ts +0 -5
- package/dist/capabilities/questions.tools.port.js +0 -1
- package/dist/contact/contact.inviter.d.ts +0 -10
- package/dist/contact/contact.inviter.js +0 -9
- package/dist/contact/contact.tools.d.ts +0 -9
- package/dist/contact/contact.tools.js +0 -9
- package/dist/integration/integration.tools.d.ts +0 -9
- package/dist/integration/integration.tools.js +0 -9
- package/dist/intent/intent.clarifier.d.ts +0 -3
- package/dist/intent/intent.clarifier.js +0 -2
- package/dist/intent/intent.graph.d.ts +0 -5
- package/dist/intent/intent.graph.js +0 -5
- package/dist/intent/intent.indexer.d.ts +0 -2
- package/dist/intent/intent.indexer.js +0 -2
- package/dist/intent/intent.inferrer.d.ts +0 -2
- package/dist/intent/intent.inferrer.js +0 -2
- package/dist/intent/intent.reconciler.d.ts +0 -2
- package/dist/intent/intent.reconciler.js +0 -2
- package/dist/intent/intent.specificity.d.ts +0 -2
- package/dist/intent/intent.specificity.js +0 -2
- package/dist/intent/intent.state.d.ts +0 -10
- package/dist/intent/intent.state.js +0 -10
- package/dist/intent/intent.tools.d.ts +0 -6
- package/dist/intent/intent.tools.js +0 -6
- package/dist/intent/intent.verifier.d.ts +0 -2
- package/dist/intent/intent.verifier.js +0 -2
- package/dist/negotiation/insight.generator.d.ts +0 -5
- package/dist/negotiation/insight.generator.js +0 -5
- package/dist/negotiation/negotiation.agent.d.ts +0 -5
- package/dist/negotiation/negotiation.agent.js +0 -5
- package/dist/negotiation/negotiation.consultation-policy.d.ts +0 -5
- package/dist/negotiation/negotiation.consultation-policy.js +0 -5
- package/dist/negotiation/negotiation.deadlock.contracts.d.ts +0 -5
- package/dist/negotiation/negotiation.deadlock.contracts.js +0 -5
- package/dist/negotiation/negotiation.deadlock.d.ts +0 -5
- package/dist/negotiation/negotiation.deadlock.js +0 -5
- package/dist/negotiation/negotiation.detail-reader.d.ts +0 -5
- package/dist/negotiation/negotiation.detail-reader.js +0 -5
- package/dist/negotiation/negotiation.graph.d.ts +0 -5
- package/dist/negotiation/negotiation.graph.js +0 -5
- package/dist/negotiation/negotiation.intent-snapshot-provenance.d.ts +0 -5
- package/dist/negotiation/negotiation.intent-snapshot-provenance.js +0 -5
- package/dist/negotiation/negotiation.lifecycle-narration.d.ts +0 -5
- package/dist/negotiation/negotiation.lifecycle-narration.js +0 -5
- package/dist/negotiation/negotiation.memory.d.ts +0 -7
- package/dist/negotiation/negotiation.memory.js +0 -7
- package/dist/negotiation/negotiation.protocol.d.ts +0 -5
- package/dist/negotiation/negotiation.protocol.js +0 -5
- package/dist/negotiation/negotiation.question-safety.d.ts +0 -5
- package/dist/negotiation/negotiation.question-safety.js +0 -5
- package/dist/negotiation/negotiation.reflect.d.ts +0 -6
- package/dist/negotiation/negotiation.reflect.js +0 -6
- package/dist/negotiation/negotiation.screen.d.ts +0 -8
- package/dist/negotiation/negotiation.screen.js +0 -8
- package/dist/negotiation/negotiation.state.d.ts +0 -5
- package/dist/negotiation/negotiation.state.js +0 -5
- package/dist/negotiation/negotiation.summarizer.d.ts +0 -5
- package/dist/negotiation/negotiation.summarizer.js +0 -5
- package/dist/negotiation/negotiation.task-lock-policy.d.ts +0 -5
- package/dist/negotiation/negotiation.task-lock-policy.js +0 -5
- package/dist/negotiation/negotiation.tools.d.ts +0 -5
- package/dist/negotiation/negotiation.tools.js +0 -5
- package/dist/network/indexer/indexer.graph.d.ts +0 -5
- package/dist/network/indexer/indexer.graph.js +0 -5
- package/dist/network/indexer/indexer.state.d.ts +0 -5
- package/dist/network/indexer/indexer.state.js +0 -5
- package/dist/network/membership/membership.graph.d.ts +0 -5
- package/dist/network/membership/membership.graph.js +0 -5
- package/dist/network/membership/membership.state.d.ts +0 -5
- package/dist/network/membership/membership.state.js +0 -5
- package/dist/network/network.graph.d.ts +0 -5
- package/dist/network/network.graph.js +0 -5
- package/dist/network/network.recommender.d.ts +0 -5
- package/dist/network/network.recommender.js +0 -5
- package/dist/network/network.state.d.ts +0 -5
- package/dist/network/network.state.js +0 -5
- package/dist/network/network.tools.d.ts +0 -5
- package/dist/network/network.tools.js +0 -5
- package/dist/opportunity/delivery-card.cache.d.ts +0 -5
- package/dist/opportunity/delivery-card.cache.js +0 -5
- package/dist/opportunity/discovery-question.helper.d.ts +0 -5
- package/dist/opportunity/discovery-question.helper.js +0 -5
- package/dist/opportunity/domain/discovery-question.helper.d.ts +0 -18
- package/dist/opportunity/domain/discovery-question.helper.js +0 -15
- package/dist/opportunity/negotiation-context.loader.d.ts +0 -5
- package/dist/opportunity/negotiation-context.loader.js +0 -5
- package/dist/opportunity/negotiation-summary.builder.d.ts +0 -5
- package/dist/opportunity/negotiation-summary.builder.js +0 -5
- package/dist/opportunity/opportunity.actor.d.ts +0 -5
- package/dist/opportunity/opportunity.actor.js +0 -5
- package/dist/opportunity/opportunity.card-presentation.d.ts +0 -5
- package/dist/opportunity/opportunity.card-presentation.js +0 -5
- package/dist/opportunity/opportunity.claim-safety.d.ts +0 -5
- package/dist/opportunity/opportunity.claim-safety.js +0 -5
- package/dist/opportunity/opportunity.discovery-negotiation-summary.d.ts +0 -5
- package/dist/opportunity/opportunity.discovery-negotiation-summary.js +0 -5
- package/dist/opportunity/opportunity.enricher.d.ts +0 -5
- package/dist/opportunity/opportunity.enricher.js +0 -5
- package/dist/opportunity/opportunity.evaluator.d.ts +0 -5
- package/dist/opportunity/opportunity.evaluator.js +0 -5
- package/dist/opportunity/opportunity.evidence.d.ts +0 -5
- package/dist/opportunity/opportunity.evidence.js +0 -5
- package/dist/opportunity/opportunity.existing-negotiation.d.ts +0 -5
- package/dist/opportunity/opportunity.existing-negotiation.js +0 -5
- package/dist/opportunity/opportunity.feed-selection.d.ts +0 -5
- package/dist/opportunity/opportunity.feed-selection.js +0 -5
- package/dist/opportunity/opportunity.graph.d.ts +0 -5
- package/dist/opportunity/opportunity.graph.js +0 -5
- package/dist/opportunity/opportunity.introducer.d.ts +0 -5
- package/dist/opportunity/opportunity.introducer.js +0 -5
- package/dist/opportunity/opportunity.labels.d.ts +0 -5
- package/dist/opportunity/opportunity.labels.js +0 -5
- package/dist/opportunity/opportunity.lifecycle.d.ts +0 -5
- package/dist/opportunity/opportunity.lifecycle.js +0 -5
- package/dist/opportunity/opportunity.newborn-stamping.d.ts +0 -5
- package/dist/opportunity/opportunity.newborn-stamping.js +0 -5
- package/dist/opportunity/opportunity.owner-approval.d.ts +0 -5
- package/dist/opportunity/opportunity.owner-approval.js +0 -5
- package/dist/opportunity/opportunity.pending-questions.d.ts +0 -5
- package/dist/opportunity/opportunity.pending-questions.js +0 -5
- package/dist/opportunity/opportunity.persist.d.ts +0 -5
- package/dist/opportunity/opportunity.persist.js +0 -5
- package/dist/opportunity/opportunity.persistence-admission.d.ts +0 -5
- package/dist/opportunity/opportunity.persistence-admission.js +0 -5
- package/dist/opportunity/opportunity.presentation-cache.d.ts +0 -5
- package/dist/opportunity/opportunity.presentation-cache.js +0 -5
- package/dist/opportunity/opportunity.presentation.d.ts +0 -5
- package/dist/opportunity/opportunity.presentation.js +0 -5
- package/dist/opportunity/opportunity.presenter.d.ts +0 -12
- package/dist/opportunity/opportunity.presenter.js +0 -12
- package/dist/opportunity/opportunity.safe-presentation.d.ts +0 -5
- package/dist/opportunity/opportunity.safe-presentation.js +0 -5
- package/dist/opportunity/opportunity.state.d.ts +0 -5
- package/dist/opportunity/opportunity.state.js +0 -5
- package/dist/opportunity/opportunity.tools.d.ts +0 -5
- package/dist/opportunity/opportunity.tools.js +0 -5
- package/dist/opportunity/opportunity.update-admission.d.ts +0 -5
- package/dist/opportunity/opportunity.update-admission.js +0 -5
- package/dist/opportunity/opportunity.utils.d.ts +0 -5
- package/dist/opportunity/opportunity.utils.js +0 -5
- package/dist/questioner/questioner.agent.d.ts +0 -6
- package/dist/questioner/questioner.agent.js +0 -5
- package/dist/questioner/questioner.ask.tool.d.ts +0 -5
- package/dist/questioner/questioner.ask.tool.js +0 -5
- package/dist/questioner/questioner.discovery.prompt.d.ts +0 -5
- package/dist/questioner/questioner.discovery.prompt.js +0 -5
- package/dist/questioner/questioner.env.d.ts +0 -5
- package/dist/questioner/questioner.env.js +0 -5
- package/dist/questioner/questioner.presets.d.ts +0 -6
- package/dist/questioner/questioner.presets.js +0 -5
- package/dist/questioner/questioner.qud.d.ts +0 -5
- package/dist/questioner/questioner.qud.js +0 -5
- package/dist/questioner/questioner.tools.d.ts +0 -5
- package/dist/questioner/questioner.tools.js +0 -5
- package/dist/questioner/questioner.types.d.ts +0 -6
- package/dist/questioner/questioner.types.js +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -29,6 +29,7 @@ pin a supported release, use `latest`.
|
|
|
29
29
|
## [Unreleased]
|
|
30
30
|
|
|
31
31
|
### Removed
|
|
32
|
+
- Remove six unsupported tool-port forwarding shims and the deprecated unused discovery-question mapper; stable package-root exports remain unchanged.
|
|
32
33
|
- Remove the onboarding privacy-consent layer (10.0.0). The
|
|
33
34
|
`record_onboarding_privacy_consent` tool is gone from the tool registry, the
|
|
34
35
|
onboarding persona/prompt, the MCP authorization matrix and onboarding
|
|
@@ -67,6 +68,7 @@ pin a supported release, use `latest`.
|
|
|
67
68
|
`SynthesisResult` types. Minor bump: additive surface only.
|
|
68
69
|
|
|
69
70
|
### Changed
|
|
71
|
+
- Remove unsupported deprecated source/deep forwarding shims after migrating repository consumers to canonical modules; stable package-root exports are unchanged.
|
|
70
72
|
- Add a fail-closed isolated provider-free test gate (10.1.1). Tooling-only
|
|
71
73
|
safety foundation; no runtime or public API behavior changes.
|
|
72
74
|
- Share capability classification metadata between the existing architecture
|
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;
|
|
152
|
-
functional mode when omitted (
|
|
153
|
-
tools are not registered
|
|
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` |
|
|
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 |
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* The list is curated by responsibility (discovery, lifecycle, presentation,
|
|
5
5
|
* and question lenses) rather than exposing the opportunity directory.
|
|
6
6
|
*
|
|
7
|
-
* IND-551: canonical paths
|
|
8
|
-
* opportunity/application; shims remain at old flat paths for compatibility.
|
|
7
|
+
* IND-551: canonical paths use opportunity/domain and opportunity/application.
|
|
9
8
|
*/
|
|
10
9
|
export { RadarGraphFactory } from "../opportunity/radar/radar.graph.js";
|
|
11
10
|
export { OpportunityGraphFactory } from "../opportunity/application/opportunity.graph.js";
|
|
@@ -17,7 +16,7 @@ export type { EvaluatorInput } from "../opportunity/application/opportunity.eval
|
|
|
17
16
|
export { OpportunityPresenter, gatherPresenterContext } from "../opportunity/application/opportunity.presenter.js";
|
|
18
17
|
export type { PresenterDatabase } from "../opportunity/application/opportunity.presenter.js";
|
|
19
18
|
export { createOpportunityTools } from "../opportunity/application/opportunity.tools.js";
|
|
20
|
-
export type { OpportunityToolDeps } from "
|
|
19
|
+
export type { OpportunityToolDeps } from "../opportunity/ports/index.js";
|
|
21
20
|
export { discoveryAllowedTypes, discoveryIntentMatchingEnabled, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, } from "../opportunity/discovery.env.js";
|
|
22
21
|
export type { DiscoveryMatchType, DiscoveryProfileSource } from "../opportunity/discovery.env.js";
|
|
23
22
|
export { PoolDiscriminatorMiner } from "../opportunity/discriminator/discriminator.miner.js";
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
* The list is curated by responsibility (discovery, lifecycle, presentation,
|
|
5
5
|
* and question lenses) rather than exposing the opportunity directory.
|
|
6
6
|
*
|
|
7
|
-
* IND-551: canonical paths
|
|
8
|
-
* opportunity/application; shims remain at old flat paths for compatibility.
|
|
7
|
+
* IND-551: canonical paths use opportunity/domain and opportunity/application.
|
|
9
8
|
*/
|
|
10
9
|
// ── Core graphs ───────────────────────────────────────────────────────────────
|
|
11
10
|
export { RadarGraphFactory } from "../opportunity/radar/radar.graph.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";
|
|
@@ -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
|
|
246
|
-
*
|
|
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
|
|
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
|
package/dist/chat/chat.agent.js
CHANGED
|
@@ -359,9 +359,8 @@ export class ChatAgent {
|
|
|
359
359
|
return results;
|
|
360
360
|
}
|
|
361
361
|
/**
|
|
362
|
-
* Check whether
|
|
363
|
-
*
|
|
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
|
|
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
|
package/dist/contacts/index.d.ts
CHANGED
|
@@ -6,19 +6,14 @@
|
|
|
6
6
|
* contacts/ports; this barrel is for cross-capability consumers that must
|
|
7
7
|
* go through the contacts public surface.
|
|
8
8
|
*
|
|
9
|
-
* IND-549: canonical home for contact management capabilities
|
|
10
|
-
* spread across contact/, shared/interfaces/contact.interface.ts, and
|
|
11
|
-
* capabilities/contacts.tools.port.ts.
|
|
9
|
+
* IND-549: canonical home for contact management capabilities.
|
|
12
10
|
*
|
|
13
11
|
* Retains participant reachability semantics: all operations are scoped to
|
|
14
12
|
* the owning user's personal network. Contacts are participants with whom
|
|
15
13
|
* opportunity discovery is run.
|
|
16
14
|
*
|
|
17
|
-
*
|
|
18
|
-
* - contact/contact.tools.ts — thin compatibility shim → contacts/application
|
|
19
|
-
* - contact/contact.inviter.ts — thin compatibility shim → contacts/application
|
|
15
|
+
* Compatibility paths:
|
|
20
16
|
* - shared/interfaces/contact.interface.ts — thin compatibility shim → contacts/ports
|
|
21
|
-
* - capabilities/contacts.tools.port.ts — thin compatibility shim → contacts/ports
|
|
22
17
|
* - capabilities/contacts.facade.ts — thin re-export via contacts/public
|
|
23
18
|
*/
|
|
24
19
|
export * from "./public/index.js";
|
package/dist/contacts/index.js
CHANGED
|
@@ -6,19 +6,14 @@
|
|
|
6
6
|
* contacts/ports; this barrel is for cross-capability consumers that must
|
|
7
7
|
* go through the contacts public surface.
|
|
8
8
|
*
|
|
9
|
-
* IND-549: canonical home for contact management capabilities
|
|
10
|
-
* spread across contact/, shared/interfaces/contact.interface.ts, and
|
|
11
|
-
* capabilities/contacts.tools.port.ts.
|
|
9
|
+
* IND-549: canonical home for contact management capabilities.
|
|
12
10
|
*
|
|
13
11
|
* Retains participant reachability semantics: all operations are scoped to
|
|
14
12
|
* the owning user's personal network. Contacts are participants with whom
|
|
15
13
|
* opportunity discovery is run.
|
|
16
14
|
*
|
|
17
|
-
*
|
|
18
|
-
* - contact/contact.tools.ts — thin compatibility shim → contacts/application
|
|
19
|
-
* - contact/contact.inviter.ts — thin compatibility shim → contacts/application
|
|
15
|
+
* Compatibility paths:
|
|
20
16
|
* - shared/interfaces/contact.interface.ts — thin compatibility shim → contacts/ports
|
|
21
|
-
* - capabilities/contacts.tools.port.ts — thin compatibility shim → contacts/ports
|
|
22
17
|
* - capabilities/contacts.facade.ts — thin re-export via contacts/public
|
|
23
18
|
*/
|
|
24
19
|
export * from "./public/index.js";
|
|
@@ -11,9 +11,8 @@
|
|
|
11
11
|
* from shared/interfaces/contact.interface.ts, which after IND-549 forwards
|
|
12
12
|
* to contacts/ports — creating a cycle back here.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* preserved.
|
|
14
|
+
* Its shape remains structurally equivalent to the matching
|
|
15
|
+
* ToolRegistryCompositionDeps fields.
|
|
17
16
|
*
|
|
18
17
|
* IND-549: extracted from capabilities/contacts.tools.port.ts into the
|
|
19
18
|
* contacts capability's dedicated ports layer.
|
|
@@ -11,9 +11,8 @@
|
|
|
11
11
|
* from shared/interfaces/contact.interface.ts, which after IND-549 forwards
|
|
12
12
|
* to contacts/ports — creating a cycle back here.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* preserved.
|
|
14
|
+
* Its shape remains structurally equivalent to the matching
|
|
15
|
+
* ToolRegistryCompositionDeps fields.
|
|
17
16
|
*
|
|
18
17
|
* IND-549: extracted from capabilities/contacts.tools.port.ts into the
|
|
19
18
|
* contacts capability's dedicated ports layer.
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
* - ContactToolDeps — host capabilities for contact management tools.
|
|
15
15
|
*
|
|
16
16
|
* IND-549: canonical ports surface for the contacts capability.
|
|
17
|
-
* Legacy
|
|
17
|
+
* Legacy path:
|
|
18
18
|
* - shared/interfaces/contact.interface.ts → re-exports types from here
|
|
19
|
-
* - capabilities/contacts.tools.port.ts → re-exports ContactToolDeps from here
|
|
20
19
|
*/
|
|
21
20
|
export type { ContactServiceAdapter } from "./contact.repository.port.js";
|
|
22
21
|
export type { ContactToolDeps } from "./contact.tools.port.js";
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
* - ContactToolDeps — host capabilities for contact management tools.
|
|
15
15
|
*
|
|
16
16
|
* IND-549: canonical ports surface for the contacts capability.
|
|
17
|
-
* Legacy
|
|
17
|
+
* Legacy path:
|
|
18
18
|
* - shared/interfaces/contact.interface.ts → re-exports types from here
|
|
19
|
-
* - capabilities/contacts.tools.port.ts → re-exports ContactToolDeps from here
|
|
20
19
|
*/
|
|
21
20
|
export {};
|
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
* or integrations/ports; this barrel is for cross-capability consumers that
|
|
7
7
|
* must go through the integrations public surface.
|
|
8
8
|
*
|
|
9
|
-
* IND-549: canonical home for integration capabilities
|
|
10
|
-
* across integration/, shared/interfaces/integration.interface.ts, and
|
|
11
|
-
* capabilities/integrations.tools.port.ts.
|
|
9
|
+
* IND-549: canonical home for integration capabilities.
|
|
12
10
|
*
|
|
13
11
|
* Retains host-integration configuration/actions semantics: the module owns
|
|
14
12
|
* the OAuth session lifecycle and bulk contact import pipeline contracts.
|
|
@@ -18,10 +16,8 @@
|
|
|
18
16
|
* Allowed outbound capability dependencies: none (empty set). The integrations
|
|
19
17
|
* module is a leaf capability that only depends on shared/ primitives.
|
|
20
18
|
*
|
|
21
|
-
*
|
|
22
|
-
* - integration/integration.tools.ts — thin compatibility shim → integrations/application
|
|
19
|
+
* Compatibility paths:
|
|
23
20
|
* - shared/interfaces/integration.interface.ts — thin compatibility shim → integrations/ports
|
|
24
|
-
* - capabilities/integrations.tools.port.ts — thin compatibility shim → integrations/ports
|
|
25
21
|
* - capabilities/integrations.facade.ts — thin re-export via integrations/public
|
|
26
22
|
*/
|
|
27
23
|
export * from "./public/index.js";
|
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
* or integrations/ports; this barrel is for cross-capability consumers that
|
|
7
7
|
* must go through the integrations public surface.
|
|
8
8
|
*
|
|
9
|
-
* IND-549: canonical home for integration capabilities
|
|
10
|
-
* across integration/, shared/interfaces/integration.interface.ts, and
|
|
11
|
-
* capabilities/integrations.tools.port.ts.
|
|
9
|
+
* IND-549: canonical home for integration capabilities.
|
|
12
10
|
*
|
|
13
11
|
* Retains host-integration configuration/actions semantics: the module owns
|
|
14
12
|
* the OAuth session lifecycle and bulk contact import pipeline contracts.
|
|
@@ -18,10 +16,8 @@
|
|
|
18
16
|
* Allowed outbound capability dependencies: none (empty set). The integrations
|
|
19
17
|
* module is a leaf capability that only depends on shared/ primitives.
|
|
20
18
|
*
|
|
21
|
-
*
|
|
22
|
-
* - integration/integration.tools.ts — thin compatibility shim → integrations/application
|
|
19
|
+
* Compatibility paths:
|
|
23
20
|
* - shared/interfaces/integration.interface.ts — thin compatibility shim → integrations/ports
|
|
24
|
-
* - capabilities/integrations.tools.port.ts — thin compatibility shim → integrations/ports
|
|
25
21
|
* - capabilities/integrations.facade.ts — thin re-export via integrations/public
|
|
26
22
|
*/
|
|
27
23
|
export * from "./public/index.js";
|
|
@@ -19,9 +19,8 @@
|
|
|
19
19
|
* - IntegrationToolDeps — host capabilities for integration-backed tools.
|
|
20
20
|
*
|
|
21
21
|
* IND-549: canonical ports surface for the integrations capability.
|
|
22
|
-
* Legacy
|
|
22
|
+
* Legacy path:
|
|
23
23
|
* - shared/interfaces/integration.interface.ts → re-exports types from here
|
|
24
|
-
* - capabilities/integrations.tools.port.ts → re-exports IntegrationToolDeps from here
|
|
25
24
|
*/
|
|
26
25
|
export type { IntegrationAdapter } from "./integration.adapter.port.js";
|
|
27
26
|
export type { IntegrationImporter, IntegrationImportResult } from "./integration.importer.port.js";
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
* - IntegrationToolDeps — host capabilities for integration-backed tools.
|
|
20
20
|
*
|
|
21
21
|
* IND-549: canonical ports surface for the integrations capability.
|
|
22
|
-
* Legacy
|
|
22
|
+
* Legacy path:
|
|
23
23
|
* - shared/interfaces/integration.interface.ts → re-exports types from here
|
|
24
|
-
* - capabilities/integrations.tools.port.ts → re-exports IntegrationToolDeps from here
|
|
25
24
|
*/
|
|
26
25
|
export {};
|
|
@@ -11,9 +11,8 @@
|
|
|
11
11
|
* shared/interfaces/integration.interface.ts, which after IND-549 forwards
|
|
12
12
|
* to integrations/ports — creating a cycle back here.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* the legacy shim is preserved.
|
|
14
|
+
* Its shape remains structurally equivalent to the matching
|
|
15
|
+
* ToolRegistryCompositionDeps fields.
|
|
17
16
|
*
|
|
18
17
|
* IND-549: extracted from capabilities/integrations.tools.port.ts into the
|
|
19
18
|
* integrations capability's dedicated ports layer.
|
|
@@ -11,9 +11,8 @@
|
|
|
11
11
|
* shared/interfaces/integration.interface.ts, which after IND-549 forwards
|
|
12
12
|
* to integrations/ports — creating a cycle back here.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* the legacy shim is preserved.
|
|
14
|
+
* Its shape remains structurally equivalent to the matching
|
|
15
|
+
* ToolRegistryCompositionDeps fields.
|
|
17
16
|
*
|
|
18
17
|
* IND-549: extracted from capabilities/integrations.tools.port.ts into the
|
|
19
18
|
* integrations capability's dedicated ports layer.
|
|
@@ -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";
|
|
@@ -12,7 +12,5 @@
|
|
|
12
12
|
* negotiationDatabase, agentDispatcher (optional), negotiationTimeoutQueue (optional).
|
|
13
13
|
*
|
|
14
14
|
* IND-550: canonical ports surface for the negotiation capability.
|
|
15
|
-
* Legacy paths:
|
|
16
|
-
* - capabilities/negotiation.tools.port.ts → re-exports NegotiationToolDeps from here
|
|
17
15
|
*/
|
|
18
16
|
export type { NegotiationToolDeps } from "./negotiation.tools.port.js";
|
|
@@ -12,7 +12,5 @@
|
|
|
12
12
|
* negotiationDatabase, agentDispatcher (optional), negotiationTimeoutQueue (optional).
|
|
13
13
|
*
|
|
14
14
|
* IND-550: canonical ports surface for the negotiation capability.
|
|
15
|
-
* Legacy paths:
|
|
16
|
-
* - capabilities/negotiation.tools.port.ts → re-exports NegotiationToolDeps from here
|
|
17
15
|
*/
|
|
18
16
|
export {};
|
|
@@ -9,7 +9,6 @@ import type { NegotiationTimeoutQueue } from "../../shared/interfaces/negotiatio
|
|
|
9
9
|
* same pattern as contacts/ports/contact.tools.port.ts.
|
|
10
10
|
*
|
|
11
11
|
* IND-550: canonical port type for negotiation tool host dependencies.
|
|
12
|
-
* Legacy path (capabilities/negotiation.tools.port.ts) re-exports from here.
|
|
13
12
|
*/
|
|
14
13
|
export interface NegotiationToolDeps {
|
|
15
14
|
negotiationDatabase: NegotiationGraphDatabase;
|
|
@@ -2230,15 +2230,15 @@ export class OpportunityGraphFactory {
|
|
|
2230
2230
|
// represented user (from-introducer, via onBehalfOfUserId).
|
|
2231
2231
|
initiatorUserId: discoveryUserId,
|
|
2232
2232
|
onCandidateResolved });
|
|
2233
|
-
//
|
|
2234
|
-
// timer wins
|
|
2235
|
-
//
|
|
2236
|
-
// finalize node
|
|
2237
|
-
// NOT await it,
|
|
2238
|
-
//
|
|
2239
|
-
//
|
|
2240
|
-
//
|
|
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) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefineTool } from "../../shared/agent/tool.helpers.js";
|
|
2
|
-
import type { OpportunityToolDeps } from "
|
|
2
|
+
import type { OpportunityToolDeps } from "../ports/index.js";
|
|
3
3
|
export { buildOpportunityPresentation } from "./opportunity.card-presentation.js";
|
|
4
4
|
import type { Opportunity } from "../../shared/interfaces/database.interface.js";
|
|
5
5
|
/**
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* - Cache key builders (opportunity.presentation-cache.ts)
|
|
15
15
|
* - Discovery-run coalescing (opportunity.discovery-run-coalescing.ts)
|
|
16
16
|
* - Negotiation-summary mappers (negotiation-summary.builder.ts)
|
|
17
|
-
* - Discovery question input helper (discovery-question.helper.ts)
|
|
18
17
|
*
|
|
19
18
|
* ## What lives in subdirectories (exported by path, not moved)
|
|
20
19
|
* - discriminator/ — pool discriminator types, env, scorer, adjustments, question, push
|
|
@@ -34,7 +33,6 @@ export * from "./opportunity.presentation.js";
|
|
|
34
33
|
export * from "./opportunity.safe-presentation.js";
|
|
35
34
|
export * from "./opportunity.presentation-cache.js";
|
|
36
35
|
export * from "./negotiation-summary.builder.js";
|
|
37
|
-
export * from "./discovery-question.helper.js";
|
|
38
36
|
export type { PoolCandidate, DiscriminatorMiningInput, MinedDiscriminator, ScoredDiscriminator, VerifiedAssignment, DiscriminatorShadowResult, } from "../discriminator/discriminator.types.js";
|
|
39
37
|
export { poolQuestionsMiningMode, poolQuestionsMode, poolQuestionsPushMode, poolQuestionsStampNewborn, POOL_DISCRIMINATOR_MIN_POOL_SIZE, POOL_DISCRIMINATOR_MAX_CANDIDATES, POOL_DISCRIMINATOR_MAX_PUBLIC_CONTEXT_CHARS, POOL_QUESTION_MIN_VOI, POOL_QUESTION_MAX_PENDING_PER_INTENT, poolQuestionsRanking, POOL_RERUN_DEBOUNCE_MS, poolQuestionsVisitTrigger, POOL_VISIT_MINING_DEBOUNCE_MS, } from "../discriminator/discriminator.env.js";
|
|
40
38
|
export { buildPoolAdjustment, planPoolAdjustments, mergePoolAdjustment, readActivePoolAdjustments, adjustedConfidence, } from "../discriminator/discriminator.adjustments.js";
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* - Cache key builders (opportunity.presentation-cache.ts)
|
|
15
15
|
* - Discovery-run coalescing (opportunity.discovery-run-coalescing.ts)
|
|
16
16
|
* - Negotiation-summary mappers (negotiation-summary.builder.ts)
|
|
17
|
-
* - Discovery question input helper (discovery-question.helper.ts)
|
|
18
17
|
*
|
|
19
18
|
* ## What lives in subdirectories (exported by path, not moved)
|
|
20
19
|
* - discriminator/ — pool discriminator types, env, scorer, adjustments, question, push
|
|
@@ -35,7 +34,6 @@ export * from "./opportunity.presentation.js";
|
|
|
35
34
|
export * from "./opportunity.safe-presentation.js";
|
|
36
35
|
export * from "./opportunity.presentation-cache.js";
|
|
37
36
|
export * from "./negotiation-summary.builder.js";
|
|
38
|
-
export * from "./discovery-question.helper.js";
|
|
39
37
|
export { poolQuestionsMiningMode, poolQuestionsMode, poolQuestionsPushMode, poolQuestionsStampNewborn, POOL_DISCRIMINATOR_MIN_POOL_SIZE, POOL_DISCRIMINATOR_MAX_CANDIDATES, POOL_DISCRIMINATOR_MAX_PUBLIC_CONTEXT_CHARS, POOL_QUESTION_MIN_VOI, POOL_QUESTION_MAX_PENDING_PER_INTENT, poolQuestionsRanking, POOL_RERUN_DEBOUNCE_MS, poolQuestionsVisitTrigger, POOL_VISIT_MINING_DEBOUNCE_MS, } from "../discriminator/discriminator.env.js";
|
|
40
38
|
export { buildPoolAdjustment, planPoolAdjustments, mergePoolAdjustment, readActivePoolAdjustments, adjustedConfidence, } from "../discriminator/discriminator.adjustments.js";
|
|
41
39
|
export { synthesizePoolQuestion, selectQuestionDiscriminators, toQuestionDiscriminator, BOTH_MATTER_LABEL, } from "../discriminator/discriminator.question.js";
|
|
@@ -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
|
-
*
|
|
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
|
|
138
|
-
* background.
|
|
139
|
-
*
|
|
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";
|
|
@@ -12,13 +12,10 @@
|
|
|
12
12
|
* shared/interfaces/agent.interface.ts, and
|
|
13
13
|
* shared/interfaces/agent-dispatcher.interface.ts.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
* - agent/* — thin compatibility shims pointing to participant-agents/application
|
|
15
|
+
* Compatibility paths:
|
|
17
16
|
* - shared/interfaces/agent.interface.ts — re-exports from participant-agents/domain
|
|
18
17
|
* and participant-agents/ports
|
|
19
18
|
* - shared/interfaces/agent-dispatcher.interface.ts — re-exports from
|
|
20
19
|
* participant-agents/ports
|
|
21
|
-
* - capabilities/participant-agents.tools.port.ts — re-exports AgentToolDeps
|
|
22
|
-
* from participant-agents/ports
|
|
23
20
|
*/
|
|
24
21
|
export * from "./public/index.js";
|