@indexnetwork/protocol 10.1.2-rc.452.1 → 11.0.0-rc.454.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 +1 -0
- package/dist/capabilities/opportunities.facade.d.ts +4 -4
- package/dist/capabilities/opportunities.facade.js +2 -3
- 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/index.d.ts +2 -1
- package/dist/index.js +1 -1
- 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/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.d.ts +9 -3
- package/dist/opportunity/application/opportunity.graph.js +26 -14
- package/dist/opportunity/application/opportunity.tools.d.ts +1 -1
- package/dist/opportunity/discovery.env.d.ts +6 -0
- package/dist/opportunity/discovery.env.js +30 -0
- 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 +0 -2
- package/dist/opportunity/public/index.d.ts +2 -1
- package/dist/opportunity/public/index.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/interfaces/database.interface.d.ts +2 -0
- package/package.json +1 -1
- 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/opportunity/domain/discovery-question.helper.d.ts +0 -18
- package/dist/opportunity/domain/discovery-question.helper.js +0 -15
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
|
|
@@ -4,11 +4,11 @@
|
|
|
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";
|
|
11
|
+
export type { OpportunityGraphThresholdOverrides } from "../opportunity/application/opportunity.graph.js";
|
|
12
12
|
export type { StampNewbornOpportunitiesFn, StampNewbornOpportunitiesInput } from "../opportunity/application/opportunity.newborn-stamping.js";
|
|
13
13
|
export { hasUnsupportedOpportunityClaim, stripUnsupportedOpportunityClaims } from "../opportunity/domain/opportunity.claim-safety.js";
|
|
14
14
|
export { buildCandidateEvidence } from "../opportunity/domain/opportunity.evidence.js";
|
|
@@ -17,8 +17,8 @@ export type { EvaluatorInput } from "../opportunity/application/opportunity.eval
|
|
|
17
17
|
export { OpportunityPresenter, gatherPresenterContext } from "../opportunity/application/opportunity.presenter.js";
|
|
18
18
|
export type { PresenterDatabase } from "../opportunity/application/opportunity.presenter.js";
|
|
19
19
|
export { createOpportunityTools } from "../opportunity/application/opportunity.tools.js";
|
|
20
|
-
export type { OpportunityToolDeps } from "
|
|
21
|
-
export { discoveryAllowedTypes, discoveryIntentMatchingEnabled, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, } from "../opportunity/discovery.env.js";
|
|
20
|
+
export type { OpportunityToolDeps } from "../opportunity/ports/index.js";
|
|
21
|
+
export { DISCOVERY_EVALUATOR_MIN_SCORE_DEFAULT, DISCOVERY_MIN_SIMILARITY_DEFAULT, discoveryAllowedTypes, discoveryEvaluatorMinScore, discoveryIntentMatchingEnabled, discoveryMinSimilarity, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, validateDiscoveryEvaluatorMinScore, validateDiscoveryMinSimilarity, } from "../opportunity/discovery.env.js";
|
|
22
22
|
export type { DiscoveryMatchType, DiscoveryProfileSource } from "../opportunity/discovery.env.js";
|
|
23
23
|
export { PoolDiscriminatorMiner } from "../opportunity/discriminator/discriminator.miner.js";
|
|
24
24
|
export { PoolDiscriminatorAssigner } from "../opportunity/discriminator/discriminator.assigner.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";
|
|
@@ -20,7 +19,7 @@ export { OpportunityPresenter, gatherPresenterContext } from "../opportunity/app
|
|
|
20
19
|
// ── MCP tool factory ──────────────────────────────────────────────────────────
|
|
21
20
|
export { createOpportunityTools } from "../opportunity/application/opportunity.tools.js";
|
|
22
21
|
// ── Discovery env accessors ───────────────────────────────────────────────────
|
|
23
|
-
export { discoveryAllowedTypes, discoveryIntentMatchingEnabled, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, } from "../opportunity/discovery.env.js";
|
|
22
|
+
export { DISCOVERY_EVALUATOR_MIN_SCORE_DEFAULT, DISCOVERY_MIN_SIMILARITY_DEFAULT, discoveryAllowedTypes, discoveryEvaluatorMinScore, discoveryIntentMatchingEnabled, discoveryMinSimilarity, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, validateDiscoveryEvaluatorMinScore, validateDiscoveryMinSimilarity, } from "../opportunity/discovery.env.js";
|
|
24
23
|
// ── Pool discriminator (Lens A) ───────────────────────────────────────────────
|
|
25
24
|
export { PoolDiscriminatorMiner } from "../opportunity/discriminator/discriminator.miner.js";
|
|
26
25
|
export { PoolDiscriminatorAssigner } from "../opportunity/discriminator/discriminator.assigner.js";
|
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 {};
|
package/dist/index.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export { MaintenanceGraphFactory } from "./capabilities/interaction-composition.
|
|
|
51
51
|
export type { MaintenanceGraphDatabase, MaintenanceGraphCache, MaintenanceGraphQueue } from "./capabilities/interaction-composition.facade.js";
|
|
52
52
|
export { NegotiationGraphFactory, negotiateCandidates } from "./capabilities/negotiation.facade.js";
|
|
53
53
|
export { OpportunityGraphFactory } from "./capabilities/opportunities.facade.js";
|
|
54
|
+
export type { OpportunityGraphThresholdOverrides } from "./capabilities/opportunities.facade.js";
|
|
54
55
|
export { hasUnsupportedOpportunityClaim } from "./capabilities/opportunities.facade.js";
|
|
55
56
|
export type { StampNewbornOpportunitiesFn } from "./capabilities/opportunities.facade.js";
|
|
56
57
|
export { opportunityOwnerActionForStatus, bindOwnerApprovalProvenance } from "./capabilities/opportunities.facade.js";
|
|
@@ -89,7 +90,7 @@ export type { PoolDiscriminatorAssignmentInput, PoolDiscriminatorAssignedAxis }
|
|
|
89
90
|
export { runPoolDiscriminatorShadow } from "./capabilities/opportunities.facade.js";
|
|
90
91
|
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, } from "./capabilities/opportunities.facade.js";
|
|
91
92
|
export { poolQuestionsRanking, POOL_RERUN_DEBOUNCE_MS } from "./capabilities/opportunities.facade.js";
|
|
92
|
-
export { discoveryAllowedTypes, discoveryIntentMatchingEnabled, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, } from "./capabilities/opportunities.facade.js";
|
|
93
|
+
export { DISCOVERY_EVALUATOR_MIN_SCORE_DEFAULT, DISCOVERY_MIN_SIMILARITY_DEFAULT, discoveryAllowedTypes, discoveryEvaluatorMinScore, discoveryIntentMatchingEnabled, discoveryMinSimilarity, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, validateDiscoveryEvaluatorMinScore, validateDiscoveryMinSimilarity, } from "./capabilities/opportunities.facade.js";
|
|
93
94
|
export type { DiscoveryMatchType, DiscoveryProfileSource } from "./capabilities/opportunities.facade.js";
|
|
94
95
|
export { poolQuestionsVisitTrigger, POOL_VISIT_MINING_DEBOUNCE_MS } from "./capabilities/opportunities.facade.js";
|
|
95
96
|
export { buildPoolAdjustment, planPoolAdjustments, mergePoolAdjustment } from "./capabilities/opportunities.facade.js";
|
package/dist/index.js
CHANGED
|
@@ -75,7 +75,7 @@ export { runPoolDiscriminatorShadow } from "./capabilities/opportunities.facade.
|
|
|
75
75
|
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, } from "./capabilities/opportunities.facade.js";
|
|
76
76
|
export { poolQuestionsRanking, POOL_RERUN_DEBOUNCE_MS } from "./capabilities/opportunities.facade.js";
|
|
77
77
|
// Discovery env accessors (IND-XXX)
|
|
78
|
-
export { discoveryAllowedTypes, discoveryIntentMatchingEnabled, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, } from "./capabilities/opportunities.facade.js";
|
|
78
|
+
export { DISCOVERY_EVALUATOR_MIN_SCORE_DEFAULT, DISCOVERY_MIN_SIMILARITY_DEFAULT, discoveryAllowedTypes, discoveryEvaluatorMinScore, discoveryIntentMatchingEnabled, discoveryMinSimilarity, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, validateDiscoveryEvaluatorMinScore, validateDiscoveryMinSimilarity, } from "./capabilities/opportunities.facade.js";
|
|
79
79
|
export { poolQuestionsVisitTrigger, POOL_VISIT_MINING_DEBOUNCE_MS } from "./capabilities/opportunities.facade.js";
|
|
80
80
|
export { buildPoolAdjustment, planPoolAdjustments, mergePoolAdjustment } from "./capabilities/opportunities.facade.js";
|
|
81
81
|
export { synthesizePoolQuestion, selectQuestionDiscriminators, toQuestionDiscriminator, BOTH_MATTER_LABEL } from "./capabilities/opportunities.facade.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";
|
|
@@ -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.
|
|
@@ -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;
|
|
@@ -51,6 +51,10 @@ import { type StampNewbornOpportunitiesFn } from './opportunity.newborn-stamping
|
|
|
51
51
|
export type { QueueOpportunityNotificationFn } from './opportunity.lifecycle.js';
|
|
52
52
|
export type { StampNewbornOpportunitiesFn, StampNewbornOpportunitiesInput } from './opportunity.newborn-stamping.js';
|
|
53
53
|
export { buildPrioritizedNegotiationIntents } from './opportunity.existing-negotiation.js';
|
|
54
|
+
export interface OpportunityGraphThresholdOverrides {
|
|
55
|
+
retrievalMinSimilarity?: number;
|
|
56
|
+
evaluatorMinScore?: number;
|
|
57
|
+
}
|
|
54
58
|
/**
|
|
55
59
|
* Error text can include provider response bodies, URLs, and credentials. Keep
|
|
56
60
|
* observability useful by retaining only a conservative error class at this
|
|
@@ -97,6 +101,8 @@ export declare class OpportunityGraphFactory {
|
|
|
97
101
|
private queueNegotiateExisting?;
|
|
98
102
|
/** Host-side P4b stamper. Omitted by manual/introducer/enrichment roots. */
|
|
99
103
|
private stampNewbornOpportunities?;
|
|
104
|
+
/** Eval/test-only overrides; production composition resolves from environment. */
|
|
105
|
+
private thresholdOverrides?;
|
|
100
106
|
constructor(database: OpportunityGraphDatabase, embedder: Embedder, hydeGenerator: {
|
|
101
107
|
invoke: (input: HydeGeneratorInvokeInput) => Promise<{
|
|
102
108
|
hydeEmbeddings: Record<string, number[]>;
|
|
@@ -123,7 +129,9 @@ export declare class OpportunityGraphFactory {
|
|
|
123
129
|
*/
|
|
124
130
|
queueNegotiateExisting?: ((opportunityId: string, userId: string) => Promise<void>) | undefined,
|
|
125
131
|
/** Host-side P4b stamper. Omitted by manual/introducer/enrichment roots. */
|
|
126
|
-
stampNewbornOpportunities?: StampNewbornOpportunitiesFn | undefined
|
|
132
|
+
stampNewbornOpportunities?: StampNewbornOpportunitiesFn | undefined,
|
|
133
|
+
/** Eval/test-only overrides; production composition resolves from environment. */
|
|
134
|
+
thresholdOverrides?: OpportunityGraphThresholdOverrides | undefined);
|
|
127
135
|
createGraph(): import("@langchain/langgraph").CompiledStateGraph<{
|
|
128
136
|
userId: Id<"users">;
|
|
129
137
|
searchQuery: string | undefined;
|
|
@@ -1144,7 +1152,6 @@ export declare class OpportunityGraphFactory {
|
|
|
1144
1152
|
options: {
|
|
1145
1153
|
initialStatus: OpportunityStatus;
|
|
1146
1154
|
negotiationContinuation?: import("../../shared/interfaces/database.interface.js").NegotiationContinuationExecution;
|
|
1147
|
-
minScore?: number;
|
|
1148
1155
|
limit?: number;
|
|
1149
1156
|
lenses?: import("../../shared/hyde/lens.inferrer.js").Lens[];
|
|
1150
1157
|
hydeDescription?: string;
|
|
@@ -1169,7 +1176,6 @@ export declare class OpportunityGraphFactory {
|
|
|
1169
1176
|
options: {
|
|
1170
1177
|
initialStatus: OpportunityStatus;
|
|
1171
1178
|
negotiationContinuation?: import("../../shared/interfaces/database.interface.js").NegotiationContinuationExecution;
|
|
1172
|
-
minScore?: number;
|
|
1173
1179
|
limit?: number;
|
|
1174
1180
|
lenses?: import("../../shared/hyde/lens.inferrer.js").Lens[];
|
|
1175
1181
|
hydeDescription?: string;
|
|
@@ -31,7 +31,7 @@ import { renderNetworkContext } from '../../shared/network/metadata.renderer.js'
|
|
|
31
31
|
import { requestContext } from "../../shared/observability/request-context.js";
|
|
32
32
|
import { getAbortSignalConfig } from "../../shared/agent/model-signal.js";
|
|
33
33
|
import { mergeOpportunityEvidence, withCandidateEvidence, withMatchedStrategies } from '../domain/opportunity.evidence.js';
|
|
34
|
-
import { discoveryIntentMatchingEnabled, discoveryProfileMatchingEnabled, discoveryProfileSource } from '../discovery.env.js';
|
|
34
|
+
import { DISCOVERY_EVALUATOR_MIN_SCORE_DEFAULT, discoveryEvaluatorMinScore, discoveryIntentMatchingEnabled, discoveryMinSimilarity, discoveryProfileMatchingEnabled, discoveryProfileSource, validateDiscoveryEvaluatorMinScore, validateDiscoveryMinSimilarity } from '../discovery.env.js';
|
|
35
35
|
import { normalizeOpportunityActorIntent, resolveOpportunityActorIntent } from '../domain/opportunity.actor.js';
|
|
36
36
|
import { approveOpportunityIntroduction, deleteOpportunityLifecycle, sendOpportunityLifecycle, updateOpportunityLifecycle } from './opportunity.lifecycle.js';
|
|
37
37
|
import { stampEligibleNewbornOpportunities } from './opportunity.newborn-stamping.js';
|
|
@@ -208,7 +208,9 @@ export class OpportunityGraphFactory {
|
|
|
208
208
|
*/
|
|
209
209
|
queueNegotiateExisting,
|
|
210
210
|
/** Host-side P4b stamper. Omitted by manual/introducer/enrichment roots. */
|
|
211
|
-
stampNewbornOpportunities
|
|
211
|
+
stampNewbornOpportunities,
|
|
212
|
+
/** Eval/test-only overrides; production composition resolves from environment. */
|
|
213
|
+
thresholdOverrides) {
|
|
212
214
|
this.database = database;
|
|
213
215
|
this.embedder = embedder;
|
|
214
216
|
this.hydeGenerator = hydeGenerator;
|
|
@@ -218,8 +220,15 @@ export class OpportunityGraphFactory {
|
|
|
218
220
|
this.agentDispatcher = agentDispatcher;
|
|
219
221
|
this.queueNegotiateExisting = queueNegotiateExisting;
|
|
220
222
|
this.stampNewbornOpportunities = stampNewbornOpportunities;
|
|
223
|
+
this.thresholdOverrides = thresholdOverrides;
|
|
221
224
|
}
|
|
222
225
|
createGraph() {
|
|
226
|
+
const retrievalMinSimilarity = this.thresholdOverrides?.retrievalMinSimilarity === undefined
|
|
227
|
+
? discoveryMinSimilarity()
|
|
228
|
+
: validateDiscoveryMinSimilarity(this.thresholdOverrides.retrievalMinSimilarity);
|
|
229
|
+
const evaluatorMinScore = this.thresholdOverrides?.evaluatorMinScore === undefined
|
|
230
|
+
? discoveryEvaluatorMinScore()
|
|
231
|
+
: validateDiscoveryEvaluatorMinScore(this.thresholdOverrides.evaluatorMinScore);
|
|
223
232
|
const evaluatorAgent = this.optionalEvaluator ?? new OpportunityEvaluator();
|
|
224
233
|
// ═══════════════════════════════════════════════════════════════
|
|
225
234
|
// NODE DEFINITIONS
|
|
@@ -743,8 +752,6 @@ export class OpportunityGraphFactory {
|
|
|
743
752
|
// (The options.limit controls final output, not search pool)
|
|
744
753
|
const limitPerStrategy = 30;
|
|
745
754
|
const perIndexLimit = 80;
|
|
746
|
-
// Similarity threshold for recall (0.30 = 30% similarity)
|
|
747
|
-
const minScore = 0.3;
|
|
748
755
|
// Discovery match-type gating (DISCOVERY_ALLOWED_TYPES / DISCOVERY_PROFILE_SOURCE).
|
|
749
756
|
// Result filtering below is defense-in-depth: corpusGating already scopes the
|
|
750
757
|
// embedder's corpus searches, but adapters may still return other types.
|
|
@@ -903,7 +910,7 @@ export class OpportunityGraphFactory {
|
|
|
903
910
|
excludeUserId: discoveryUserId,
|
|
904
911
|
limitPerStrategy,
|
|
905
912
|
limit: perIndexLimit,
|
|
906
|
-
minScore,
|
|
913
|
+
minScore: retrievalMinSimilarity,
|
|
907
914
|
corpusGating,
|
|
908
915
|
});
|
|
909
916
|
if (intentResultsEnabled)
|
|
@@ -1011,6 +1018,7 @@ export class OpportunityGraphFactory {
|
|
|
1011
1018
|
networkIds: targetNetworkIds,
|
|
1012
1019
|
excludeUserId: discoveryUserId,
|
|
1013
1020
|
limitPerSource: PREMISE_MATCH_LIMIT_PER_SOURCE,
|
|
1021
|
+
minScore: retrievalMinSimilarity,
|
|
1014
1022
|
})
|
|
1015
1023
|
: (await Promise.all(sourcePremises.map(async (sp) => {
|
|
1016
1024
|
const results = await self.database.searchPremisesBySimilarity({
|
|
@@ -1018,6 +1026,7 @@ export class OpportunityGraphFactory {
|
|
|
1018
1026
|
networkIds: targetNetworkIds,
|
|
1019
1027
|
excludeUserId: discoveryUserId,
|
|
1020
1028
|
limit: PREMISE_MATCH_LIMIT_PER_SOURCE,
|
|
1029
|
+
minScore: retrievalMinSimilarity,
|
|
1021
1030
|
});
|
|
1022
1031
|
return results.map((r) => ({ ...r, sourcePremiseId: sp.premiseId }));
|
|
1023
1032
|
}))).flat();
|
|
@@ -1090,7 +1099,7 @@ export class OpportunityGraphFactory {
|
|
|
1090
1099
|
excludeUserId: discoveryUserId,
|
|
1091
1100
|
limitPerStrategy: limitPerStrategy,
|
|
1092
1101
|
limit: 20,
|
|
1093
|
-
minScore,
|
|
1102
|
+
minScore: retrievalMinSimilarity,
|
|
1094
1103
|
corpusGating,
|
|
1095
1104
|
});
|
|
1096
1105
|
for (const r of results.filter(r => r.type === 'intent')) {
|
|
@@ -1114,7 +1123,7 @@ export class OpportunityGraphFactory {
|
|
|
1114
1123
|
networkIds: [ctx.networkId],
|
|
1115
1124
|
excludeUserId: discoveryUserId,
|
|
1116
1125
|
limit: 20,
|
|
1117
|
-
minScore:
|
|
1126
|
+
minScore: retrievalMinSimilarity,
|
|
1118
1127
|
});
|
|
1119
1128
|
for (const r of results) {
|
|
1120
1129
|
contextCandidates.push(withCandidateEvidence({
|
|
@@ -1169,7 +1178,7 @@ export class OpportunityGraphFactory {
|
|
|
1169
1178
|
networkIds: [ctx.networkId],
|
|
1170
1179
|
excludeUserId: discoveryUserId,
|
|
1171
1180
|
limit: 20,
|
|
1172
|
-
minScore,
|
|
1181
|
+
minScore: retrievalMinSimilarity,
|
|
1173
1182
|
});
|
|
1174
1183
|
for (const r of results) {
|
|
1175
1184
|
contextCandidates.push(withCandidateEvidence({
|
|
@@ -1302,7 +1311,7 @@ export class OpportunityGraphFactory {
|
|
|
1302
1311
|
excludeUserId: discoveryUserId,
|
|
1303
1312
|
limitPerStrategy,
|
|
1304
1313
|
limit: perIndexLimit,
|
|
1305
|
-
minScore,
|
|
1314
|
+
minScore: retrievalMinSimilarity,
|
|
1306
1315
|
corpusGating,
|
|
1307
1316
|
});
|
|
1308
1317
|
if (intentResultsEnabled)
|
|
@@ -1692,8 +1701,9 @@ export class OpportunityGraphFactory {
|
|
|
1692
1701
|
return evidenceByEntityKey.get(keys[0]);
|
|
1693
1702
|
return undefined;
|
|
1694
1703
|
}
|
|
1695
|
-
|
|
1696
|
-
|
|
1704
|
+
const minScore = state.targetUserId
|
|
1705
|
+
? DISCOVERY_EVALUATOR_MIN_SCORE_DEFAULT
|
|
1706
|
+
: evaluatorMinScore;
|
|
1697
1707
|
const evaluatorSignalConfig = getAbortSignalConfig();
|
|
1698
1708
|
const evaluator = typeof evaluatorAgent.invokeEntityBundle === 'function'
|
|
1699
1709
|
? evaluatorAgent
|
|
@@ -1883,15 +1893,17 @@ export class OpportunityGraphFactory {
|
|
|
1883
1893
|
});
|
|
1884
1894
|
// Build detailed trace entries for each evaluated candidate
|
|
1885
1895
|
// Threshold filter trace: how many candidates in this batch were above/below similarity threshold
|
|
1886
|
-
const aboveThreshold = batchToEvaluate.filter(
|
|
1896
|
+
const aboveThreshold = batchToEvaluate.filter((candidate) => candidate.similarity >= retrievalMinSimilarity).length;
|
|
1887
1897
|
const belowThreshold = batchToEvaluate.length - aboveThreshold;
|
|
1888
1898
|
traceEntries.push({
|
|
1889
1899
|
node: "threshold_filter",
|
|
1890
|
-
detail: `${aboveThreshold} above
|
|
1900
|
+
detail: `${aboveThreshold} above ${retrievalMinSimilarity}, ${belowThreshold} below (batch of ${batchToEvaluate.length})`,
|
|
1891
1901
|
data: {
|
|
1892
1902
|
aboveThreshold,
|
|
1893
1903
|
belowThreshold,
|
|
1894
|
-
minScore:
|
|
1904
|
+
minScore: retrievalMinSimilarity,
|
|
1905
|
+
retrievalMinSimilarity,
|
|
1906
|
+
evaluatorMinScore: minScore,
|
|
1895
1907
|
batchSize: batchToEvaluate.length,
|
|
1896
1908
|
},
|
|
1897
1909
|
});
|
|
@@ -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
|
/**
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export declare const DISCOVERY_MIN_SIMILARITY_DEFAULT = 0.3;
|
|
2
|
+
export declare const DISCOVERY_EVALUATOR_MIN_SCORE_DEFAULT = 50;
|
|
3
|
+
export declare function validateDiscoveryMinSimilarity(value: number): number;
|
|
4
|
+
export declare function validateDiscoveryEvaluatorMinScore(value: number): number;
|
|
5
|
+
export declare function discoveryMinSimilarity(): number;
|
|
6
|
+
export declare function discoveryEvaluatorMinScore(): number;
|
|
1
7
|
/** Data types allowed to participate in opportunity matching. */
|
|
2
8
|
export type DiscoveryMatchType = 'intent' | 'profile';
|
|
3
9
|
/** Test hook: clear warn-once state so each test observes warnings. */
|
|
@@ -21,6 +21,36 @@
|
|
|
21
21
|
*/
|
|
22
22
|
import { protocolLogger } from '../shared/observability/protocol.logger.js';
|
|
23
23
|
const envLog = protocolLogger('Discovery:env');
|
|
24
|
+
export const DISCOVERY_MIN_SIMILARITY_DEFAULT = 0.30;
|
|
25
|
+
export const DISCOVERY_EVALUATOR_MIN_SCORE_DEFAULT = 50;
|
|
26
|
+
const DECIMAL_VALUE = /^[+]?(?:\d+(?:\.\d*)?|\.\d+)$/;
|
|
27
|
+
function validateThreshold(name, value, max) {
|
|
28
|
+
if (!Number.isFinite(value) || value < 0 || value > max) {
|
|
29
|
+
throw new Error(`${name} must be a finite decimal between 0 and ${max} (inclusive)`);
|
|
30
|
+
}
|
|
31
|
+
return value;
|
|
32
|
+
}
|
|
33
|
+
function readThreshold(raw, name, fallback, max) {
|
|
34
|
+
if (raw === undefined || raw.trim() === '')
|
|
35
|
+
return fallback;
|
|
36
|
+
const normalized = raw.trim();
|
|
37
|
+
if (!DECIMAL_VALUE.test(normalized)) {
|
|
38
|
+
throw new Error(`${name} must be a finite decimal between 0 and ${max} (inclusive)`);
|
|
39
|
+
}
|
|
40
|
+
return validateThreshold(name, Number(normalized), max);
|
|
41
|
+
}
|
|
42
|
+
export function validateDiscoveryMinSimilarity(value) {
|
|
43
|
+
return validateThreshold('DISCOVERY_MIN_SIMILARITY', value, 1);
|
|
44
|
+
}
|
|
45
|
+
export function validateDiscoveryEvaluatorMinScore(value) {
|
|
46
|
+
return validateThreshold('DISCOVERY_EVALUATOR_MIN_SCORE', value, 100);
|
|
47
|
+
}
|
|
48
|
+
export function discoveryMinSimilarity() {
|
|
49
|
+
return readThreshold(process.env.DISCOVERY_MIN_SIMILARITY, 'DISCOVERY_MIN_SIMILARITY', DISCOVERY_MIN_SIMILARITY_DEFAULT, 1);
|
|
50
|
+
}
|
|
51
|
+
export function discoveryEvaluatorMinScore() {
|
|
52
|
+
return readThreshold(process.env.DISCOVERY_EVALUATOR_MIN_SCORE, 'DISCOVERY_EVALUATOR_MIN_SCORE', DISCOVERY_EVALUATOR_MIN_SCORE_DEFAULT, 100);
|
|
53
|
+
}
|
|
24
54
|
const VALID_TOKENS = new Set(['intent', 'profile']);
|
|
25
55
|
const BOTH = new Set(['intent', 'profile']);
|
|
26
56
|
/** Tokens/values already warned about (warn-once per process). */
|
|
@@ -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";
|
|
@@ -118,8 +118,6 @@ export interface OpportunityGraphOptions {
|
|
|
118
118
|
negotiationContinuation?: NegotiationContinuationExecution;
|
|
119
119
|
/** Initial status for created opportunities (default: 'pending') */
|
|
120
120
|
initialStatus?: OpportunityStatus;
|
|
121
|
-
/** Minimum score threshold (default: 50) */
|
|
122
|
-
minScore?: number;
|
|
123
121
|
/** Maximum opportunities to return (default: 20) */
|
|
124
122
|
limit?: number;
|
|
125
123
|
/** Pre-inferred lenses (if not provided, lens inference runs automatically in HyDE graph) */
|
|
@@ -24,7 +24,7 @@ export { buildDiscoverySummary, toDiscoveryNegotiation, } from "../domain/negoti
|
|
|
24
24
|
export type { NegotiationResolution } from "../domain/negotiation-summary.builder.js";
|
|
25
25
|
export type { PoolCandidate, DiscriminatorMiningInput, MinedDiscriminator, ScoredDiscriminator, DiscriminatorShadowResult, } from "../discriminator/discriminator.types.js";
|
|
26
26
|
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";
|
|
27
|
-
export { discoveryAllowedTypes, discoveryIntentMatchingEnabled, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, } from "../discovery.env.js";
|
|
27
|
+
export { DISCOVERY_EVALUATOR_MIN_SCORE_DEFAULT, DISCOVERY_MIN_SIMILARITY_DEFAULT, discoveryAllowedTypes, discoveryEvaluatorMinScore, discoveryIntentMatchingEnabled, discoveryMinSimilarity, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, validateDiscoveryEvaluatorMinScore, validateDiscoveryMinSimilarity, } from "../discovery.env.js";
|
|
28
28
|
export type { DiscoveryMatchType, DiscoveryProfileSource, } from "../discovery.env.js";
|
|
29
29
|
export { buildPoolAdjustment, planPoolAdjustments, mergePoolAdjustment, } from "../discriminator/discriminator.adjustments.js";
|
|
30
30
|
export type { PoolAdjustment, PoolAdjustmentSignal, } from "../discriminator/discriminator.adjustments.js";
|
|
@@ -38,6 +38,7 @@ export { computeRadarHealth } from "../radar/radar.health.js";
|
|
|
38
38
|
export type { RadarHealthInput } from "../radar/radar.health.js";
|
|
39
39
|
export { isIntroducerDiscoveryEnabled } from "../application/opportunity.introducer-feature.js";
|
|
40
40
|
export { OpportunityGraphFactory } from "../application/opportunity.graph.js";
|
|
41
|
+
export type { OpportunityGraphThresholdOverrides } from "../application/opportunity.graph.js";
|
|
41
42
|
export type { StampNewbornOpportunitiesFn, StampNewbornOpportunitiesInput, } from "../application/opportunity.newborn-stamping.js";
|
|
42
43
|
export { OpportunityEvaluator } from "../application/opportunity.evaluator.js";
|
|
43
44
|
export type { EvaluatorInput } from "../application/opportunity.evaluator.js";
|
|
@@ -22,7 +22,7 @@ export { OPPORTUNITY_PRESENTATION_CACHE_VERSION, buildRadarCardPresentationCache
|
|
|
22
22
|
export { buildDiscoverySummary, toDiscoveryNegotiation, } from "../domain/negotiation-summary.builder.js";
|
|
23
23
|
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";
|
|
24
24
|
// discovery env accessors
|
|
25
|
-
export { discoveryAllowedTypes, discoveryIntentMatchingEnabled, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, } from "../discovery.env.js";
|
|
25
|
+
export { DISCOVERY_EVALUATOR_MIN_SCORE_DEFAULT, DISCOVERY_MIN_SIMILARITY_DEFAULT, discoveryAllowedTypes, discoveryEvaluatorMinScore, discoveryIntentMatchingEnabled, discoveryMinSimilarity, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, validateDiscoveryEvaluatorMinScore, validateDiscoveryMinSimilarity, } from "../discovery.env.js";
|
|
26
26
|
export { buildPoolAdjustment, planPoolAdjustments, mergePoolAdjustment, } from "../discriminator/discriminator.adjustments.js";
|
|
27
27
|
export { synthesizePoolQuestion, selectQuestionDiscriminators, toQuestionDiscriminator, BOTH_MATTER_LABEL, } from "../discriminator/discriminator.question.js";
|
|
28
28
|
export { poolQuestionCycleKey, buildPoolQuestionPushMessage, } from "../discriminator/discriminator.push.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";
|
|
@@ -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";
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
* Legacy paths:
|
|
23
23
|
* - shared/interfaces/agent.interface.ts → re-exports AgentDatabase from here
|
|
24
24
|
* - shared/interfaces/agent-dispatcher.interface.ts → re-exports from here
|
|
25
|
-
* - capabilities/participant-agents.tools.port.ts → re-exports AgentToolDeps from here
|
|
26
25
|
*/
|
|
27
26
|
export type { AgentDatabase } from "./agent.repository.port.js";
|
|
28
27
|
export type { AgentDispatcher, AgentDispatchResult, NegotiationTurnPayload, } from "./agent.dispatcher.port.js";
|
|
@@ -22,6 +22,5 @@
|
|
|
22
22
|
* Legacy paths:
|
|
23
23
|
* - shared/interfaces/agent.interface.ts → re-exports AgentDatabase from here
|
|
24
24
|
* - shared/interfaces/agent-dispatcher.interface.ts → re-exports from here
|
|
25
|
-
* - capabilities/participant-agents.tools.port.ts → re-exports AgentToolDeps from here
|
|
26
25
|
*/
|
|
27
26
|
export {};
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
* across questioner/, shared/schemas/question.schema.ts, and
|
|
12
12
|
* shared/interfaces/questioner.interface.ts.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
* - questioner/* — thin compatibility shims pointing to questions/application
|
|
14
|
+
* Compatibility paths:
|
|
16
15
|
* - capabilities/questions.facade.ts — re-exports from questions/public/index.js
|
|
17
16
|
* - shared/schemas/question.schema.ts — re-exports from questions/domain
|
|
18
17
|
* - shared/interfaces/questioner.interface.ts — re-exports from questions/ports
|
|
19
18
|
* - shared/interfaces/question-generator.interface.ts — re-exports from questions/ports
|
|
20
|
-
* - capabilities/questions.tools.port.ts — re-exports from questions/ports
|
|
21
19
|
*/
|
|
22
20
|
export * from "./public/index.js";
|
package/dist/questions/index.js
CHANGED
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
* across questioner/, shared/schemas/question.schema.ts, and
|
|
12
12
|
* shared/interfaces/questioner.interface.ts.
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
* - questioner/* — thin compatibility shims pointing to questions/application
|
|
14
|
+
* Compatibility paths:
|
|
16
15
|
* - capabilities/questions.facade.ts — re-exports from questions/public/index.js
|
|
17
16
|
* - shared/schemas/question.schema.ts — re-exports from questions/domain
|
|
18
17
|
* - shared/interfaces/questioner.interface.ts — re-exports from questions/ports
|
|
19
18
|
* - shared/interfaces/question-generator.interface.ts — re-exports from questions/ports
|
|
20
|
-
* - capabilities/questions.tools.port.ts — re-exports from questions/ports
|
|
21
19
|
*/
|
|
22
20
|
export * from "./public/index.js";
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* (question delivery and chat-inline ask_user_question) without importing
|
|
6
6
|
* the full ToolRegistryCompositionDeps interface.
|
|
7
7
|
*
|
|
8
|
-
* IND-547: canonical
|
|
9
|
-
* Legacy path is a thin compatibility shim pointing here.
|
|
8
|
+
* IND-547: canonical tool-host port.
|
|
10
9
|
*/
|
|
11
10
|
import type { ToolRegistryCompositionDeps } from "../../shared/agent/tool.helpers.js";
|
|
12
11
|
/** Host capabilities consumed by asynchronous question delivery tools. */
|
|
@@ -1460,6 +1460,7 @@ export interface Database {
|
|
|
1460
1460
|
networkIds: string[];
|
|
1461
1461
|
excludeUserId: string;
|
|
1462
1462
|
limit: number;
|
|
1463
|
+
minScore?: number;
|
|
1463
1464
|
}): Promise<Array<{
|
|
1464
1465
|
premiseId: string;
|
|
1465
1466
|
userId: string;
|
|
@@ -1500,6 +1501,7 @@ export interface Database {
|
|
|
1500
1501
|
networkIds: string[];
|
|
1501
1502
|
excludeUserId: string;
|
|
1502
1503
|
limitPerSource: number;
|
|
1504
|
+
minScore?: number;
|
|
1503
1505
|
}): Promise<Array<{
|
|
1504
1506
|
sourcePremiseId: string;
|
|
1505
1507
|
premiseId: string;
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated — compatibility shim.
|
|
3
|
-
*
|
|
4
|
-
* Canonical type has moved to contacts/ports.
|
|
5
|
-
* This re-export exists solely to avoid breaking imports that pre-date IND-549.
|
|
6
|
-
*
|
|
7
|
-
* IND-549: migrated to src/contacts/ports/contact.tools.port.ts.
|
|
8
|
-
*/
|
|
9
|
-
export type { ContactToolDeps } from '../contacts/ports/index.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated — compatibility shim.
|
|
3
|
-
*
|
|
4
|
-
* Canonical type has moved to integrations/ports.
|
|
5
|
-
* This re-export exists solely to avoid breaking imports that pre-date IND-549.
|
|
6
|
-
*
|
|
7
|
-
* IND-549: migrated to src/integrations/ports/integration.tools.port.ts.
|
|
8
|
-
*/
|
|
9
|
-
export type { IntegrationToolDeps } from '../integrations/ports/index.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated — compatibility shim.
|
|
3
|
-
*
|
|
4
|
-
* Canonical type has moved to participant-agents/ports.
|
|
5
|
-
* This re-export exists solely to avoid breaking imports that pre-date IND-548.
|
|
6
|
-
*
|
|
7
|
-
* IND-548: migrated to src/participant-agents/ports/agent.tools.port.ts.
|
|
8
|
-
*/
|
|
9
|
-
export type { AgentToolDeps } from '../participant-agents/ports/index.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure mapper from opportunity-graph outputs + optional chat digest to a
|
|
3
|
-
* `DiscoveryQuestionInput`. No I/O. Side-effect-free.
|
|
4
|
-
*/
|
|
5
|
-
import type { ChatContextDigest } from "../../shared/schemas/chat-context.schema.js";
|
|
6
|
-
import type { DiscoveryNegotiationDigest } from "../../shared/schemas/negotiation-digest.schema.js";
|
|
7
|
-
import type { DiscoveryQuestionInput, DiscoverySummary } from "../../shared/schemas/discovery-question.schema.js";
|
|
8
|
-
export interface BuildDiscoveryQuestionInputArgs {
|
|
9
|
-
query: string;
|
|
10
|
-
/** The seeker's global user_context paragraph (profile-replacing identity text). */
|
|
11
|
-
userContext: string;
|
|
12
|
-
negotiationDigests: DiscoveryNegotiationDigest[];
|
|
13
|
-
summary: DiscoverySummary;
|
|
14
|
-
chatContext?: ChatContextDigest;
|
|
15
|
-
now: string;
|
|
16
|
-
}
|
|
17
|
-
/** @deprecated Use QuestionerAgent discovery preset instead. Will be removed in a future version. */
|
|
18
|
-
export declare function buildDiscoveryQuestionInput(args: BuildDiscoveryQuestionInputArgs): DiscoveryQuestionInput;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure mapper from opportunity-graph outputs + optional chat digest to a
|
|
3
|
-
* `DiscoveryQuestionInput`. No I/O. Side-effect-free.
|
|
4
|
-
*/
|
|
5
|
-
/** @deprecated Use QuestionerAgent discovery preset instead. Will be removed in a future version. */
|
|
6
|
-
export function buildDiscoveryQuestionInput(args) {
|
|
7
|
-
return {
|
|
8
|
-
query: args.query,
|
|
9
|
-
userContext: args.userContext,
|
|
10
|
-
negotiationDigests: args.negotiationDigests,
|
|
11
|
-
summary: args.summary,
|
|
12
|
-
...(args.chatContext !== undefined ? { chatContext: args.chatContext } : {}),
|
|
13
|
-
now: args.now,
|
|
14
|
-
};
|
|
15
|
-
}
|