Metadata-Version: 2.4
Name: palm-sync-core
Version: 1.0
Summary: Provider-agnostic Palm OS <-> cloud sync engine (pilot-link I/O, stable-id reconciliation, .pc3 delta writing)
Author-email: Jeff Hodson <jeff@hodsontech.com>
License: MIT License
        
        Copyright (c) 2026 Jeff Hodson (HodsonTech LLC)
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# palm-sync-core

Provider-agnostic engine for syncing a Palm OS PDA with a cloud calendar/tasks/contacts service. Extracted from [palm365-mac](https://github.com/HodsonTech/palm365-mac) so the same hardened logic can back more than one cloud provider without duplicating it.

This is a library, not a standalone tool — it's meant to be installed as a dependency of a provider-specific package (like `palm365-mac` for Microsoft 365, or a future `palmgoogle-mac` for Google) that supplies the actual cloud API client and field-mapping code.

## What's in here

- `palm_writer.py` — reads/writes jpilot's `.pdb`/`.pc3` files via `pilot-link`'s `libpisock`, through `ctypes`.
- `id_map.py` — the confirmed/pending state machine that lets records survive repeated syncs without duplicating or resurrecting after deletion.
- `paths.py`, `sync_state.py`, `cloud_backup.py` — per-device state file locations, persisted signature sets, and pre-deletion safety snapshots.
- `engine.py` — the actual reconciliation engine (`cmd_sync`, `cmd_pushup_*`, `cmd_deletions`, `cmd_full`, and the stable-id down-sync core). Takes an already-authenticated cloud client and a small field-mapping module as parameters, rather than knowing about any specific provider's API.

## Design note: one provider at a time

This engine has no notion of multiple cloud sources syncing the same data type at once, and deliberately doesn't need one — a Palm device only has one calendar/contacts/tasks database, and two independent full-rebuild engines racing to write the same file is a real hazard. Provider packages built on top of this are expected to declare a MacPorts `conflicts` against each other rather than attempt to coexist.

## License

MIT.
