Overview
In-house partnership & relationship intelligence for AbsoluteJS apps — AI reasoning over the partnership lifecycle, so you don't pay a deal-copilot SaaS per seat for the parts you can run yourself.
@absolutejs/partnershipv0.1.0alphaCommerce & GrowthTrust & Fit scoring, relationship classification, connection framing, and partner verification on your own AI provider.
In-house partnership and relationship intelligence — AI reasoning over the partnership lifecycle, so you do not pay a deal-copilot SaaS per seat for the parts you can run yourself. Each primitive is a pure function of typed input plus an injected AI call: the package owns the prompt, the JSON Schema, the tool contract, and the result mapping, while your app supplies the generation call along with provider, metering, timeouts, and fallbacks. Bridging to @absolutejs/ai (or a metering wrapper around it) is one line.
bun add @absolutejs/partnershipIn-house partnership & relationship intelligence for AbsoluteJS apps — AI reasoning over the partnership lifecycle, so you don't pay a deal-copilot SaaS per seat for the parts you can run yourself.
Each primitive is a pure function of typed input + an injected AI call. The package owns the prompt, the JSON Schema, the tool contract, and the result mapping. Your app supplies the generation call — and with it the provider, billing/metering, timeouts, and any fallback. The package never imports a provider and never touches your ledger.
Bridge the package's generateObject to whatever you already use for structured generation. If you use @absolutejs/ai (directly or behind a metering wrapper), it's one line — the request shape is the subset of generateObjectAI's options the package controls, minus provider and your metering fields:
The package passes its own feature tag through ("trustFit", "classifyMatch", "personConnection", "verification"), so your usage ledger keeps its existing per-feature breakdown.
Function — Returns
scoreTrustFit(input, ctx) — four 0–1 dimensions (audience overlap, capability, mutual value, credibility) + three per-score reasons
classifyRelationship(input, ctx) — relationship type, official name + domain, receptiveness, competitor out-serve play
frameConnection(input, ctx) — why-connect / shared-ground / mutual-value / conversation-starter for a specific person
verifyPartner(input, ctx) — structured Verification Dossier (credibility, track record, audience overlap, economics, open questions)
Web-grounded primitives
verifyPartner optionally takes an injected research call (e.g. your @absolutejs/discover web-research) on the context. Omit it and synthesis falls back to knowledge-only:
Primitives throw on a model or validation failure. Heuristic fallbacks (e.g. deriving rough Trust & Fit dimensions from a match's existing signals) are app-specific, so they stay in your wrapper — catch and degrade however your UI needs.
ResearchFn accepts structured research alongside legacy string | null. Verification, competitor analysis and meeting preparation retain researchStatus, sources, findings and limitations. researchedAt is empty when source-bound research was unavailable; generatedAt is always generation time. Existing string research remains explicitly unverified.
Structured research invokes a separate researchEvidenceReview generation through the host's generateObject, which must be budgeted and metered like the initial synthesis. fieldEvidence binds reviewed output paths to exact source excerpts, supplied input, proposed assessments or unresolved facts. Unsupported factual text becomes unresolved, and corporate affiliations are removed unless every textual field is source-supported. analysisStatus describes that review; numeric scores remain interpretations, not verified facts. A model's entailment judgment still requires human review for consequential decisions.
scoreTrustFit returns four 0-1 dimensions (audience overlap, capability, mutual value, credibility) with three per-score reasons.
classifyRelationship resolves the relationship type, official name and domain, receptiveness, and a competitor out-serve play.
frameConnection produces why-connect, shared-ground, mutual-value, and conversation-starter framing for a specific person.
verifyPartner builds a structured Verification Dossier covering credibility, track record, audience overlap, economics, and open questions.
verifyPartner optionally takes an injected research call (for example @absolutejs/discover web research); omit it and synthesis falls back to knowledge-only.
Each primitive passes its own feature tag through ("trustFit", "classifyMatch", "personConnection", "verification"), so your usage ledger keeps its per-feature breakdown.
Outcomes
In-house partnership & relationship intelligence for AbsoluteJS apps — AI reasoning over the partnership lifecycle, so you don't pay a deal-copilot SaaS per seat for the parts you can run yourself.
Bridge the package's generateObject to whatever you already use for structured generation. If you use @absolutejs/ai (directly or behind a metering wrapper), it's one line — the request shape is the subset of generateObjectAI's options the package controls, minus provider and your metering fields:
Function — Returns
Hardening checklist
Follow in order
Bridge the package's generateObject to whatever you already use for structured generation. If you use @absolutejs/ai (directly or behind a metering wrapper), it's one line — the request shape is the subset of generateObjectAI's options the package controls, minus provider and your metering fields:
import type { GenerateObject } from "@absolutejs/partnership";
import { meteredGenerateObjectAI } from "./usage/meteredAI";
import { aiProvider } from "./integrations/aiProvider";
export const partnershipCtx = (userSub?: string | null) => ({
generateObject: ((req) =>
meteredGenerateObjectAI({ ...req, provider: aiProvider, userSub })) as GenerateObject,
});Function — Returns
import { scoreTrustFit } from "@absolutejs/partnership";
const { dimensions, reasons } = await scoreTrustFit(
{
member: { niche: "devtools", offer: "hosted CI", audienceSize: "10k" },
partner: { company: companyData, person: personData, reasoning },
priorScores: { theirReceptiveness: 0.4, yourFit: 0.9 },
},
partnershipCtx(userSub),
);partnershipCtx bridges the package to whatever you already use for structured generation — with @absolutejs/ai it is one line of wiring.
import { scoreTrustFit } from '@absolutejs/partnership';
const { dimensions, reasons } = await scoreTrustFit(
{
member: {
audienceSize: '10k',
niche: 'devtools',
offer: 'hosted CI'
},
partner: { company: companyData, person: personData, reasoning },
priorScores: { theirReceptiveness: 0.4, yourFit: 0.9 }
},
partnershipCtx(userSub)
);
// dimensions: four 0-1 scores (audience overlap, capability,
// mutual value, credibility) with three reasons per score.verifyPartner optionally grounds its Verification Dossier in an injected web-research call, such as @absolutejs/discover.
import { verifyPartner } from '@absolutejs/partnership';
const dossier = await verifyPartner(input, {
...partnershipCtx(userSub),
research: (system, user) => webResearch(system, user)
});
// Omit research and synthesis falls back to knowledge-only.Current package surface
Import surface · click to copy