def credit(table_path: str, entry: str, *, field: str = 'balance', **kwargs) -> bool:
"""Add 1 (or amount from kwargs) to the given field for a record."""
path = _resolve_path(table_path)
records = _read_table(path)
if entry not in records:
gw.warn(f"Entry '{entry}' does not exist; cannot credit.")
return False
try:
amt = float(kwargs.pop('amount', 1))
prev = float(records[entry].get(field, 0))
records[entry][field] = str(prev + amt)
records[entry].update(kwargs)
_write_table(path, records)
gw.info(f"Credited {amt} to '{entry}' field '{field}'. New value: {records[entry][field]}")
return True
except Exception as e:
gw.error(f"credit failed: {e}")
return False