Fairhaul Freight Allocation

v0.1.0
io.github.fpavia111-creator/fairhaul-freight-allocation Checked 2 days ago Published 5 days ago

Fairhaul Freight Allocation: splits each freight bill across the orders, customers, SKUs and cost…

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

fairhaul_info

Show this pack: pinned model, mode, caps, Auto opt-ins, and the allow/ask/block decision for every tool.

fairhaul_inspect_input

Show how a CSV, TSV, Excel, JSON or JSONL file under the root would be read: its format, which export it looks like, which of its columns map to this pack's columns, and what each column holds. Returns column names and shapes only, never cell values. Use it before a tool when a file comes straight from another system.

ParameterTypeDescription
path *stringA CSV, TSV, Excel .xlsx, JSON or JSONL file under the root
asstringSource kind to read it as (default: every kind this agent declares, best match first)
sheetstring | integerExcel sheet name or 0-based index (default: first visible sheet)

allocation_allocate Split freight across order lines

[ALLOW] Allocate each shipment's cost to its order lines by the chosen basis (falling back when a line lacks it), with totals by customer, SKU and GL account plus cost center, freight per unit and freight as a percent of value.

ParameterTypeDescription
costs *stringFreight cost per shipment under --root (CSV, Excel or JSON): shipment id and cost, optionally invoice number, carrier and date
order_lines *stringOrder lines per shipment: shipment id, order, customer, SKU, units, weight, cube, value, pallets, cost center, GL account
basisstringMeasure to split each shipment's cost by (default weight)
fallbackarrayMeasures to try, in order, when a line lacks the basis (default cube, value, units; equal shares last)

allocation_write_report Write the allocation and journal draft

[ALLOW] Write allocation.csv and .html (one row per order line, by customer, SKU and cost center, and the problems) and allocation-journal-draft.csv (debits by GL and cost center, one credit to the clearing account) into out_dir (default fairhaul-out/allocation). Returns the journal sha256.

ParameterTypeDescription
costs *stringFreight cost per shipment under --root (CSV, Excel or JSON): shipment id and cost, optionally invoice number, carrier and date
order_lines *stringOrder lines per shipment: shipment id, order, customer, SKU, units, weight, cube, value, pallets, cost center, GL account
basisstringMeasure to split each shipment's cost by (default weight)
clearing_accountstringAccount the freight bills were first booked to, credited by the reclass (default freight_clearing)
fallbackarrayMeasures to try, in order, when a line lacks the basis (default cube, value, units; equal shares last)
journal_datestringDate for the journal lines, YYYY-MM-DD
out_dirstringFolder under --root for the output files

allocation_request_post Approve the journal for posting (one click)

[ASK] After one named human click, record in post-approvals.csv that the reviewed allocation-journal-draft.csv (by sha256) may be posted. Fairhaul Freight Allocation never posts.

ParameterTypeDescription
journal *stringPath of allocation-journal-draft.csv written by allocation_write_report
journal_sha256 *stringsha256 returned by allocation_write_report for the journal file
notestringOptional note kept with the approval
out_dirstringFolder under --root for the output files

erp_post_journal Erp post journal

[BLOCK · move_money] Listed so agents can see it is refused. Fairhaul Freight Allocation never posts to your ledger; a person posts the reviewed entry.

erp_update_order_cost Erp update order cost

[BLOCK · production_deploy] Listed so agents can see it is refused. Fairhaul Freight Allocation never writes landed cost back into orders or items.