@burdenoff/microfe-housingvista 2026.1127.1 → 2026.1203.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.
@@ -0,0 +1,23 @@
1
+ import { AiDecisionDiffSection, AiDecisionStatus } from '@burdenoff/fe-libs/shared/proactive';
2
+ import { DecisionEvidence } from '../hooks/useAiOperations';
3
+ export declare function resolveEvidencePath(evidence: DecisionEvidence): string;
4
+ export interface HousingVistaDecisionBinderProps {
5
+ status: AiDecisionStatus;
6
+ title: string;
7
+ explanation?: string | null;
8
+ confidence?: number | null;
9
+ model?: string | null;
10
+ agentRunId?: string | null;
11
+ disclaimer?: string | null;
12
+ evidence?: readonly DecisionEvidence[];
13
+ diffSections?: readonly AiDecisionDiffSection[];
14
+ errorMessage?: string | null;
15
+ isDeciding?: boolean;
16
+ applyLabel?: string;
17
+ rejectLabel?: string;
18
+ onApply?: () => void;
19
+ onReject?: () => void;
20
+ onCancel?: () => void;
21
+ testIdPrefix?: string;
22
+ }
23
+ export declare function HousingVistaDecisionBinder({ status, title, explanation, confidence, model, agentRunId, disclaimer, evidence, diffSections, errorMessage, isDeciding, applyLabel, rejectLabel, onApply, onReject, onCancel, testIdPrefix, }: HousingVistaDecisionBinderProps): import('react').JSX.Element;
@@ -0,0 +1,62 @@
1
+ import { Link as e } from "react-router";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { AiDecisionCard as r } from "@burdenoff/fe-libs/shared/proactive";
4
+ // src/housingvista/components/HousingVistaDecisionBinder.tsx
5
+ function i(e) {
6
+ switch (e.entityType) {
7
+ case "HOUSINGVISTA_PROPERTY": return `/housingvista/properties/${e.entityId}`;
8
+ case "HOUSINGVISTA_AREA_INSIGHTS": return "/housingvista/area-insights";
9
+ case "HOUSINGVISTA_MARKET_ANALYTICS": return "/housingvista/market-analytics";
10
+ case "HOUSINGVISTA_AMC_LIST": return "/housingvista/amc";
11
+ case "HOUSINGVISTA_RENTAL": return "/housingvista/rental";
12
+ case "HOUSINGVISTA_OFFERS_LIST": return "/housingvista/offers";
13
+ default: return "/housingvista";
14
+ }
15
+ }
16
+ function a({ status: a, title: o, explanation: s, confidence: c, model: l, agentRunId: u, disclaimer: d, evidence: f = [], diffSections: p, errorMessage: m, isDeciding: h, applyLabel: g = "Accept & Review", rejectLabel: _ = "Dismiss", onApply: v, onReject: y, onCancel: b, testIdPrefix: x = "housingvista-ai-decision" }) {
17
+ let S = [
18
+ typeof c == "number" ? `${Math.round(c * 100)}% confidence` : null,
19
+ l ?? null,
20
+ u ? `Run ${u.slice(0, 8)}` : null
21
+ ].filter(Boolean).join(" · "), C = f.length > 0 ? /* @__PURE__ */ n("div", {
22
+ className: "space-y-1.5 rounded-md border border-border-subtle bg-bg-sunken/50 p-2.5",
23
+ children: [/* @__PURE__ */ t("p", {
24
+ className: "text-xs font-medium text-text-secondary",
25
+ children: "Cited evidence"
26
+ }), /* @__PURE__ */ t("ul", {
27
+ className: "space-y-1",
28
+ children: f.map((r) => /* @__PURE__ */ n("li", {
29
+ className: "text-xs text-text-primary",
30
+ children: [/* @__PURE__ */ t(e, {
31
+ to: i(r),
32
+ className: "font-medium text-action-primary-bg underline-offset-2 hover:underline",
33
+ children: r.label
34
+ }), /* @__PURE__ */ n("span", {
35
+ className: "text-text-secondary",
36
+ children: [" — ", r.summary]
37
+ })]
38
+ }, `${r.entityType}-${r.entityId}`))
39
+ })]
40
+ }) : void 0;
41
+ return /* @__PURE__ */ t(r, {
42
+ status: a,
43
+ title: o,
44
+ baseVersionLabel: S || void 0,
45
+ explanation: s ?? void 0,
46
+ progressStage: a === "PROCESSING" ? "Evaluating objective workspace evidence…" : void 0,
47
+ diffSections: p,
48
+ customDiff: C,
49
+ errors: m ? [m] : void 0,
50
+ neverActivatesNotice: d ?? "Advisory only — never mutates listings, offers, applications, or requests automatically. A human must confirm and submit any action.",
51
+ isDeciding: h,
52
+ applyLabel: g,
53
+ rejectLabel: _,
54
+ onApply: v,
55
+ onReject: y,
56
+ onCancel: b,
57
+ testIdPrefix: x
58
+ });
59
+ }
60
+ export { a as HousingVistaDecisionBinder, i as resolveEvidencePath };
61
+
62
+ //# sourceMappingURL=HousingVistaDecisionBinder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HousingVistaDecisionBinder.js","names":["resolveEvidencePath","evidence","HousingVistaDecisionBinder","provenanceLabel","confidence","model","agentRunId","customDiff","Link","item","AiDecisionCard","explanation","status","errorMessage","disclaimer"],"sources":["../../../src/housingvista/components/HousingVistaDecisionBinder.tsx"],"sourcesContent":["/**\n * Thin HousingVista binder over the shared `@burdenoff/fe-libs/shared/proactive`\n * `AiDecisionCard` primitive (BOFF-3857).\n *\n * Never builds a bespoke decision card: binds HousingVista's advisory evidence\n * links, fair-housing disclaimer, provenance (`model` + `agentRunId`), and\n * Accept / Modify / Dismiss handlers straight into the shared primitive using\n * semantic design tokens only.\n */\nimport { Link } from 'react-router';\nimport { AiDecisionCard, type AiDecisionDiffSection, type AiDecisionStatus } from '@burdenoff/fe-libs/shared/proactive';\nimport type { DecisionEvidence } from '../hooks/useAiOperations';\n\nexport function resolveEvidencePath(evidence: DecisionEvidence): string {\n switch (evidence.entityType) {\n case 'HOUSINGVISTA_PROPERTY':\n return `/housingvista/properties/${evidence.entityId}`;\n case 'HOUSINGVISTA_AREA_INSIGHTS':\n return '/housingvista/area-insights';\n case 'HOUSINGVISTA_MARKET_ANALYTICS':\n return '/housingvista/market-analytics';\n case 'HOUSINGVISTA_AMC_LIST':\n return '/housingvista/amc';\n case 'HOUSINGVISTA_RENTAL':\n return '/housingvista/rental';\n case 'HOUSINGVISTA_OFFERS_LIST':\n return '/housingvista/offers';\n default:\n return '/housingvista';\n }\n}\n\nexport interface HousingVistaDecisionBinderProps {\n status: AiDecisionStatus;\n title: string;\n explanation?: string | null;\n confidence?: number | null;\n model?: string | null;\n agentRunId?: string | null;\n disclaimer?: string | null;\n evidence?: readonly DecisionEvidence[];\n diffSections?: readonly AiDecisionDiffSection[];\n errorMessage?: string | null;\n isDeciding?: boolean;\n applyLabel?: string;\n rejectLabel?: string;\n onApply?: () => void;\n onReject?: () => void;\n onCancel?: () => void;\n testIdPrefix?: string;\n}\n\nexport function HousingVistaDecisionBinder({\n status,\n title,\n explanation,\n confidence,\n model,\n agentRunId,\n disclaimer,\n evidence = [],\n diffSections,\n errorMessage,\n isDeciding,\n applyLabel = 'Accept & Review',\n rejectLabel = 'Dismiss',\n onApply,\n onReject,\n onCancel,\n testIdPrefix = 'housingvista-ai-decision',\n}: HousingVistaDecisionBinderProps) {\n const confidencePct = typeof confidence === 'number' ? `${Math.round(confidence * 100)}% confidence` : null;\n const provenanceLabel = [confidencePct, model ?? null, agentRunId ? `Run ${agentRunId.slice(0, 8)}` : null]\n .filter(Boolean)\n .join(' · ');\n\n const customDiff =\n evidence.length > 0 ? (\n <div className=\"space-y-1.5 rounded-md border border-border-subtle bg-bg-sunken/50 p-2.5\">\n <p className=\"text-xs font-medium text-text-secondary\">Cited evidence</p>\n <ul className=\"space-y-1\">\n {evidence.map((item) => (\n <li key={`${item.entityType}-${item.entityId}`} className=\"text-xs text-text-primary\">\n <Link\n to={resolveEvidencePath(item)}\n className=\"font-medium text-action-primary-bg underline-offset-2 hover:underline\"\n >\n {item.label}\n </Link>\n <span className=\"text-text-secondary\"> — {item.summary}</span>\n </li>\n ))}\n </ul>\n </div>\n ) : undefined;\n\n return (\n <AiDecisionCard\n status={status}\n title={title}\n baseVersionLabel={provenanceLabel || undefined}\n explanation={explanation ?? undefined}\n progressStage={status === 'PROCESSING' ? 'Evaluating objective workspace evidence…' : undefined}\n diffSections={diffSections}\n customDiff={customDiff}\n errors={errorMessage ? [errorMessage] : undefined}\n neverActivatesNotice={\n disclaimer ??\n 'Advisory only — never mutates listings, offers, applications, or requests automatically. A human must confirm and submit any action.'\n }\n isDeciding={isDeciding}\n applyLabel={applyLabel}\n rejectLabel={rejectLabel}\n onApply={onApply}\n onReject={onReject}\n onCancel={onCancel}\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,eAAeC,MAAW,eAAe,6CAA6C,KAAA;EACxE;EACF;EACZ,QAAQC,IAAe,CAACA,CAAY,IAAI,KAAA;EACxC,sBACEC,KACA;EAEU;EACA;EACC;EACJ;EACC;EACA;EACI;CACf,CAAA;AAEL"}
@@ -19,3 +19,5 @@ export { Sparkline } from './Sparkline';
19
19
  export type { SparklinePoint } from './Sparkline';
20
20
  export { ViewingSlotPicker } from './ViewingSlotPicker';
21
21
  export { ManageViewingSlotsDialog } from './ManageViewingSlotsDialog';
22
+ export { HousingVistaDecisionBinder, resolveEvidencePath } from './HousingVistaDecisionBinder';
23
+ export type { HousingVistaDecisionBinderProps } from './HousingVistaDecisionBinder';
@@ -16,4 +16,5 @@ import { DocumentChip as p } from "./DocumentChip.js";
16
16
  import "./Sparkline.js";
17
17
  import { ViewingSlotPicker as m } from "./ViewingSlotPicker.js";
18
18
  import { ManageViewingSlotsDialog as h } from "./ManageViewingSlotsDialog.js";
19
- export { s as Breadcrumbs, a as ChartCard, u as ContactOwnerDialog, n as DataTable, p as DocumentChip, i as EmptyState, f as FileUploader, o as FilterBar, c as LoadingSkeleton, h as ManageViewingSlotsDialog, e as PageLayout, l as PropertyCard, d as ReviewsSection, t as StatCard, r as StatusBadge, m as ViewingSlotPicker };
19
+ import { HousingVistaDecisionBinder as g } from "./HousingVistaDecisionBinder.js";
20
+ export { s as Breadcrumbs, a as ChartCard, u as ContactOwnerDialog, n as DataTable, p as DocumentChip, i as EmptyState, f as FileUploader, o as FilterBar, g as HousingVistaDecisionBinder, c as LoadingSkeleton, h as ManageViewingSlotsDialog, e as PageLayout, l as PropertyCard, d as ReviewsSection, t as StatCard, r as StatusBadge, m as ViewingSlotPicker };
@@ -1202,3 +1202,5 @@ export declare const useReviewRentalApplication: () => {
1202
1202
  export { useContactConversation, useSendMessage, useSendContextMessage, useConversationMessages, useEntityComments, useCreateEntityComment, useFileUpload, useDeleteUploadedFile, useUploadedFile, } from './platform';
1203
1203
  export type { HvContextTarget, HvConversationMessage, HvConversationSourceContext, HvEntityComment, HvMessageAttachment, HvUploadedFile, } from './platform';
1204
1204
  export { useHousingVistaAnalytics } from './useHousingVistaAnalytics';
1205
+ export { useSuggestListingPrice, useEvaluateOffer, useScreenRentalApplication, useTriageMaintenanceRequest, useRecordDecisionOutcome, useAgentLoopConfig, useUpdateAgentLoopConfig, } from './useAiOperations';
1206
+ export type { DecisionEvidence, ListingPriceDecision, OfferEvaluationDecision, ScreeningChecklistItem, ApplicationScreeningDecision, MaintenanceTriageDecision, AgentLoopConfig, UpdateAgentLoopConfigInput, } from './useAiOperations';