feat(parties): the register fills the row, a compact Företagsuppgifter, and the party for agents (v1 expand + MCP) (#2315)

* feat(parties): the register fills the row, Företagsuppgifter shrinks to what only the register knows, and agents get the party

Founder feedback on the first Företagsuppgifter (2026-09-05): the org
number twice, the VAT number twice, the legal name repeating the
heading, and Kontaktuppgifter showing dashes while the block above had
the phone, e-mail and address from SCB.

- After a fetch the register's contact details land on the supplier and
  customer rows that point at the party: an empty field, or one still
  carrying what the register said last time, takes the new value; a
  value a person typed stays. Shown as "från SCB" on the row (by
  equality with the registry fact, no source column).
- Företagsuppgifter becomes one status line (legal form, active or not,
  registrations, a Bolagsverket warning when there is one), industry,
  seat with registration date, and size. Identity stays in the header
  (org number now formatted) and Kontaktuppgifter. The legal name shows
  only when it differs from the row's name.
- lib/parties/registry-summary.ts reads the coded SCB facts once for the
  page, the v1 API and MCP; lib/parties/party-api.ts is the agent shape.
- v1: party_id on supplier and customer list rows and detail;
  ?expand=party on detail embeds identity, the register summary, what
  the ledger has seen and payment identities. MCP: party_id on
  gnubok_list_suppliers/customers rows and gnubok_get_party (by party,
  supplier or customer id). Read-only; the parties resource follows.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* chore(parties): regenerate the API skill for the party expansion; tighten the get_party description

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* chore(mcp): gnubok_get_party is search-only, keeping tools/list under its byte budget

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Jakob Wennberg
2026-09-05 14:33:20 +02:00
committed by GitHub
co-authored by Claude Fable 5.1 Jakob Wennberg
parent f33628f005
commit 0ad83b8d71
21 changed files with 881 additions and 85 deletions
+15
View File
@@ -8707,6 +8707,21 @@
"facts_none_org": "Nothing from the company register yet. Fetch them by org number.",
"facts_foreign": "Foreign company ({country}), not in the SCB register. Name and VAT number come from the documents.",
"facts_renamed_title": "Details fetched, now called {name}",
"facts_status_line": "{form} · {status}",
"facts_registered_for": "Registered for {items}",
"facts_reg_f_tax": "F-tax",
"facts_reg_vat": "VAT",
"facts_reg_employer": "employer",
"facts_not_registered": "Not registered for F-tax or VAT",
"facts_industry": "Industry",
"facts_seat": "Seat",
"facts_seat_registered": "{seat} · registered {date}",
"facts_size": "Size",
"facts_workplaces": "{count, plural, one {1 workplace} other {# workplaces}}",
"facts_status": "Status",
"facts_from_registry": "from SCB",
"facts_filled_title": "Contact details filled in from SCB",
"facts_filled_description": "{fields}. Edit freely; what you type is not replaced on the next fetch.",
"fact_trade_name": "Trade name",
"open_dossier": "Open {name}",
"attn_create": "Create suggestions",
+15
View File
@@ -8707,6 +8707,21 @@
"facts_none_org": "Inga uppgifter från företagsregistret än. Hämta dem med org.nr.",
"facts_foreign": "Utländskt bolag ({country}), finns inte i SCB:s register. Namn och momsnummer kommer från underlagen.",
"facts_renamed_title": "Uppgifter hämtade, heter nu {name}",
"facts_status_line": "{form} · {status}",
"facts_registered_for": "Registrerad för {items}",
"facts_reg_f_tax": "F-skatt",
"facts_reg_vat": "moms",
"facts_reg_employer": "arbetsgivare",
"facts_not_registered": "Ej registrerad för F-skatt eller moms",
"facts_industry": "Bransch",
"facts_seat": "Säte",
"facts_seat_registered": "{seat} · registrerat {date}",
"facts_size": "Storlek",
"facts_workplaces": "{count, plural, one {1 arbetsställe} other {# arbetsställen}}",
"facts_status": "Status",
"facts_from_registry": "från SCB",
"facts_filled_title": "Kontaktuppgifter ifyllda från SCB",
"facts_filled_description": "{fields}. Ändra fritt; det du skriver ersätts inte vid nästa hämtning.",
"fact_trade_name": "Firma",
"open_dossier": "Öppna {name}",
"attn_create": "Skapa förslag",