Repository navigation
Conversation
…ile change approvals (harystyleseze#1232 harystyleseze#1233 harystyleseze#1234 harystyleseze#1235) harystyleseze#1232 Cumulative Stellar network fees - Record the fee Horizon charged on bill payments (Transaction.networkFeeStroops) - shared/stellar-fee.ts: 7d/30d/all totals, daily trend and spike detection - Wallet tab NetworkFeesCard, separate from medication/bill spend - Own line in the transaction PDF report; fee column in the CSV export harystyleseze#1233 Owner approval for sensitive profile changes - Policy limit increases, caregiver removal and auto-topup changes create pending requests instead of applying; other changes stay immediate - Only owners can approve/reject (/agent/profile-changes, /recipients/:id/profile-changes) - Requests and decisions written to the audit log; shown in the Approvals tab harystyleseze#1234 Insurance in-network checks - Caregiver-maintained in-network pharmacy/provider lists per recipient (GET/PUT /agent/insurance-network, Settings editor) - compare_pharmacy_prices flags out-of-network pharmacies with an explanation - audit_medical_bill adds an out_of_network_provider finding harystyleseze#1235 "Why did this happen?" reasoning - Plain-language, redacted trace per significant agent action, persisted (last 500) via shared/agent-state.ts and served at GET /agent/reasoning - Expandable view in the activity and bills tabs Base fixes for broken main (bad merges): - services/care-recipients/db.ts: restore delegation and task methods, CareRecipientEntity, legacy caregiver column migration - services/care-recipients/routes.ts: remove stray partial router and duplicate import - shared/types.ts: restore SpendingPolicySchema and allergy/bill/pharmacy/ presence schemas still referenced by the file and its importers
|
@Abidoyesimze is attempting to deploy a commit to the Harrison Eze's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@devsimze Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…-1235 # Conflicts: # dashboard/src/app/page.tsx # dashboard/src/components/tabs/activity-tab.tsx # dashboard/src/components/tabs/bills-tab.tsx # dashboard/src/hooks/use-agent-state.ts
Contributor
|
@harystyleseze kindly merge!!!! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1232
Closes #1233
Closes #1234
Closes #1235
#1232 — Cumulative Stellar network fee tracking
Transaction.networkFeeStroops). x402 and MPP settlements don't, because the agent doesn't submit those itself.shared/stellar-fee.tsadds up fees for 7d / 30d / all time, with a daily trend. A day counts as a spike when its average fee is at least 2× the median fee for the range (e.g. network congestion).getSpendingSummary()returns the totals asnetworkFees.Network Fee (XLM)column in the CSV export.#1233 — Owner approval for sensitive profile changes
/recipients/:id/profile-changes/:id/approve|rejectrequires the owner-onlymanagepermission (per-caregiver tokens)./agent/profile-changes/:id/approve|rejectresolvescaregiver_idagainst the linked caregivers. This follows the same identity approach as approval delegation (Allow a caregiver to delegate approval authority temporarily to a co-caregiver #1195). A recipient with no linked caregivers treats the API key holder as owner.DELETE /recipients/:id/caregivers/:idnow returns 202 with a pending request. Removing the last owner still returns 409 straight away.GET/PUT /agent/wallet/auto-topup) and only changes once an owner approves.profile_change.requested|approved|rejected).#1234 — Insurance in-network flag
services/care-recipients/db.ts, edited throughGET/PUT /agent/insurance-networkand a new Settings editor. With no list set, network status isunknownand nothing is flagged.compare_pharmacy_pricesgives each pharmacy anetworkStatusplusnetworkNote, and adds anetworksummary. The summary calls out when the cheapest option is out-of-network and names the cheapest in-network one.audit_medical_bill/fetch_and_audit_billadd anout_of_network_providerfinding: its own finding type, not counted inerrorCount, with a full explanation (balance billing, No Surprises Act).audit_medical_billinput schema rejectedprovider_id/provider_name, which the tool definition already advertised.#1235 — "Why did this happen?" reasoning
shared/action-reasoning.tswrites a plain-language summary for each significant action: payments (paid, held for approval, blocked, failed), flagged interactions and flagged bill audits. It lists the tools that ran first and the key numbers behind the decision. No raw tool JSON.shared/redact.ts.shared/agent-state.ts(the issue mentionsagent/agent-state.ts, which doesn't exist) and served atGET /agent/reasoning?transaction_id=&tool_call_id=&limit=.activity-tab.tsx(per transaction) andbills-tab.tsx(per audit and per bill payment).Fixes to broken
mainEarlier merges deleted code that other files still reference, so these modules failed to load:
services/care-recipients/db.ts: restored the delegation methods, the task methods,CareRecipientEntityand the legacy caregiver-column migration (from8a3bc6f).services/care-recipients/routes.ts: removed a stray half-finished copy ofcreateCareRecipientsRouterand a duplicate import.shared/types.ts: restoredSpendingPolicySchemaand the allergy, bill, pharmacy-price and presence schemas (fromd2d4bc8).Not fixed here:
agent/tools.tsonmaindoesn't parse.payForMedicationhas an unclosedtry(esbuild:Expected "finally"), left by merge59c4b1f, which also reverted other code;369e668is the last commit where the file parses. Any test that importstools.tscan't load until that's fixed. My changes intools.tsare type-checked and add no new tsc errors.Testing
New tests:
shared/__tests__/network-fee-tracking.test.tsshared/__tests__/insurance-network.test.tsshared/__tests__/action-reasoning.test.tsservices/care-recipients/__tests__/profile-changes.test.tsservices/care-recipients/__tests__/insurance-network.test.tsdashboard/src/__tests__/{network-fees-card,why-did-this-happen,profile-change-approvals}.test.tsxUpdated
caregiver-access.integration.test.tsfor the 202 approval flow on caregiver removal.Full
vitest run:mainThe only failures not on
maincome frompersistence.test.tsandtimezone-policy.test.ts. Both failed to load onmain; they now load and fail on the existingtools.tsparse error above.