sync: auto-sync from GURU-BEAST-ROG at 2026-07-10 10:06:22

Author: Mike Swanson
Machine: GURU-BEAST-ROG
Timestamp: 2026-07-10 10:06:22
This commit is contained in:
Winter Williams
2026-07-10 10:07:09 -07:00
committed by ClaudeTools Bot
parent 3286a47090
commit 07404759f3
3 changed files with 64 additions and 12 deletions

View File

@@ -96,12 +96,13 @@ Every Syncro API call is attributed to the **owner of the API key**. Comments, l
- **Correcting mis-billed labor** (a debug action) must keep the ORIGINAL tech's `user_id` (their commission). `update_line_item` preserves the existing `user_id`; a remove+add defaults the new line to the API-key owner — so set `user_id` to the original tech on `add_line_item`, or PUT it afterward. Determine the original tech from `.ticket.user_id` and the line's `.user_id`. Don't take a tech's commission just because the math was fixed by someone else.
- **Ticket ownership:** adding notes/labor or changing status does NOT change the ticket owner. Multiple techs routinely work one ticket. Only PUT a ticket's `user_id` (reassign owner) when explicitly asked; status PUTs send only `status`.
| identity.json user | Syncro user | user_id |
|---|---|---|
| `mike` | Michael Swanson | 1735 |
| `howard` | Howard Enos | 1750 |
| identity.json user | Syncro user | user_id | vault path |
|---|---|---|---|
| `mike` | Michael Swanson | 1735 | `msp-tools/syncro` |
| `howard` | Howard Enos | 1750 | `msp-tools/syncro-howard` |
| `winter` | Winter Williams | 1737 | `msp-tools/syncro-winter` |
Keys are baked into the skill below. To add a new user: generate a token in Syncro → Admin → API Tokens, add a case to the key-select block, and store a backup copy in the vault at `msp-tools/syncro-<user>.sops.yaml`.
Keys live in the SOPS vault and are resolved by `.claude/scripts/syncro-env.sh` (source it — never hardcode a key). When `CLAUDETOOLS_REQUESTER_USER` is set (Discord bot threads), syncro-env.sh prefers the REQUESTER's key if one is vaulted, so bot-driven Syncro actions attribute to the person who asked; it falls back to the identity.json user otherwise. To add a new user: generate a token in Syncro → Admin → API Tokens, vault it at `msp-tools/syncro-<user>.sops.yaml`, and add a case to `_syncro_key_path()` in syncro-env.sh.
### Get API key