Fairshop Gift Cards

v0.1.0
io.github.fpavia111-creator/fairshop-store-credit Checked 1 hour ago Published 3 days ago

Works out gift card and store credit liability from card and activity exports

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

fairshop_info

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

fairshop_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)

giftcards_liability Work out gift card liability

[ALLOW] Rebuild every card balance from its issue and activity, compare it with the reported balance, and total the liability by age.

ParameterTypeDescription
activity *stringCard activity under --root: card, date, type (redeem, issue, adjust), amount, order
cards *stringGift card or store credit export under --root: card (last characters), issued date, value, source (sale, manual, refund, promo), order, customer e-mail, current balance
as_ofstringDate to measure ages, windows and deadlines from, as YYYY-MM-DD (default today)
settingsstringOptional settings JSON: manual_review_over, dormancy_days, promo_is_liability, age_edges

giftcards_explain Explain one card

[ALLOW] Show one card: issued, redeemed, balance and findings.

ParameterTypeDescription
activity *stringCard activity under --root: card, date, type (redeem, issue, adjust), amount, order
card_id *stringCard id from giftcards_liability
cards *stringGift card or store credit export under --root: card (last characters), issued date, value, source (sale, manual, refund, promo), order, customer e-mail, current balance
as_ofstringDate to measure ages, windows and deadlines from, as YYYY-MM-DD (default today)
settingsstringOptional settings JSON: manual_review_over, dormancy_days, promo_is_liability, age_edges

giftcards_write_report Write the gift-cards worklist

[ALLOW] Write gift-cards.csv and .html (liability by age, every card to review or dormant) into out_dir (default fairshop-out/giftcards).

ParameterTypeDescription
activity *stringCard activity under --root: card, date, type (redeem, issue, adjust), amount, order
cards *stringGift card or store credit export under --root: card (last characters), issued date, value, source (sale, manual, refund, promo), order, customer e-mail, current balance
as_ofstringDate to measure ages, windows and deadlines from, as YYYY-MM-DD (default today)
out_dirstringFolder under --root for the report files (default fairshop-out/giftcards)
settingsstringOptional settings JSON: manual_review_over, dormancy_days, promo_is_liability, age_edges

giftcards_draft_liability_entry Draft a liability entry

[ASK] Write drafts/liability_entry-<date>.md: the liability from the card files, the ledger balance you give and the adjusting entry. Marked DRAFT. Posting goes through giftcards_request_post (one click); a person books it.

ParameterTypeDescription
activity *stringCard activity under --root: card, date, type (redeem, issue, adjust), amount, order
cards *stringGift card or store credit export under --root: card (last characters), issued date, value, source (sale, manual, refund, promo), order, customer e-mail, current balance
as_ofstringDate to measure ages, windows and deadlines from, as YYYY-MM-DD (default today)
gl_balancestringGift card liability balance in your ledger today
liability_accountstringLiability account name
offset_accountstringOffset account name
out_dirstringFolder under --root for the files this writes (default fairshop-out/giftcards).
settingsstringOptional settings JSON: manual_review_over, dormancy_days, promo_is_liability, age_edges

giftcards_request_post Approve the liability entry (one click)

[ASK · go_live] After one named human click (even in Auto), record that the reviewed liability entry draft is approved in liability_entry-requests.csv. Tied to draft_sha256; refuses while open markers remain unless accept_open_issues is true with a note. A person on your team acts on it; the agent never does.

ParameterTypeDescription
draft *stringDraft path returned by the draft tool
draft_sha256 *stringsha256 returned by the draft tool
accept_open_issuesbooleanSet true, together with a note, to go ahead while open markers or issues remain. Default false (refused while any remain).
notestringWhy it is fine to go ahead with open issues; required when accept_open_issues is true. Kept in the audit log.
out_dirstringFolder under --root for the files this writes (default fairshop-out/giftcards).
tostringWho it goes to; must match the draft when the draft names someone

gift_card_adjust Gift card adjust

[BLOCK · move_money] Listed so agents can see it is refused. Fairshop Gift Cards never changes a card balance.

gift_card_deactivate Gift card deactivate

[BLOCK · go_live] Listed so agents can see it is refused. Fairshop Gift Cards never disables or expires a card.