Commit Graph

371 Commits

Author SHA1 Message Date
eed3ece2c7 feat: session recovery toolset (orphan detector + /recover)
Reconstructs session logs from Claude Code transcripts when a session
crashes or is closed before /save. Two entry points:

- /recover <uuid|latest> : manual, Claude-reviewed reconstruction
- detect_orphaned_sessions.py : scheduled scan that auto-builds logs for
  substantive, unsaved, not-yet-recovered transcripts (banner-marked
  RECOVERED-UNVERIFIED), commits them, and posts a #bot-alerts FYI.

recover_session.py is the shared engine: Python extracts the verbatim
command/config/reference timeline; Ollama drafts prose-only narrative.
Machine-local ledger (.claude/state/) prevents reprocessing. Reviewed:
git add scoped to own files, ledger written only after successful push,
per-uuid idempotency, --max cap for unattended runs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 18:33:07 -07:00
c8f0006d25 sync: auto-sync from HOWARD-HOME at 2026-06-01 18:17:08
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-01 18:17:08
2026-06-01 18:17:15 -07:00
eb5c147bcd sync: auto-sync from HOWARD-HOME at 2026-06-01 17:07:55
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-01 17:07:55
2026-06-01 17:10:07 -07:00
f682ad93c3 sync: auto-sync from GURU-5070 at 2026-06-01 16:38:08
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-01 16:38:08
2026-06-01 16:38:12 -07:00
f7cc0cf257 sync: auto-sync from GURU-5070 at 2026-06-01 16:30:28
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-01 16:30:28
2026-06-01 16:33:58 -07:00
805b902ca5 sync: auto-sync from GURU-KALI at 2026-06-01 16:28:01
Author: Mike Swanson
Machine: GURU-KALI
Timestamp: 2026-06-01 16:28:01
2026-06-01 16:29:09 -07:00
66733d47ea sync: auto-sync from GURU-BEAST-ROG at 2026-06-01 16:26:01
Author: Mike Swanson
Machine: GURU-BEAST-ROG
Timestamp: 2026-06-01 16:26:01
2026-06-01 16:26:08 -07:00
0c000109dc chore(memory): consolidate scattered feedback/project/reference files
Compressed memory store 104 -> 71 files via four passes:

- Syncro: 19 scattered feedback_syncro_* files merged into 3 rule files
  (api/billing/workflow) + an on-demand feedback_syncro_history.md for
  incident detail, quotes, and tech/product ID tables.
- Four near-duplicate merges: Howard paste-safety, Pluto build server,
  Howard backend deferral, IX server access (ssh+tailscale).
- Per-cluster rule/state/history split applied to GuruConnect (2->1),
  Dataforth (3->2), Cascades (7->3), GuruRMM (13->3).
- New reference_resource_map.md: single auto-loaded cheatsheet for
  "do I have access to X and how do I connect from this machine?"
- MEMORY.md rewritten to match the new layout.

Health: broken backlinks 8->7, overlap clusters 12->5, orphans 17->0.
2026-06-01 16:25:45 -07:00
2a1ccfac73 Add memory-dream skill + additive cross-machine memory sync
memory-dream: read-only memory lint/consolidation analyzer (index, backlinks,
stale refs, dup clusters, profile drift); additive-only --apply-safe, all
merges/deletes are proposals. sync-memory.sh: additive repo<->harness-profile
union (no delete/overwrite, conflicts surfaced), wired to a SessionStart hook.
Migrates the useful profile-only memories into the synced repo store.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 15:22:12 -07:00
96fb4110ea Add b2 skill: Backblaze B2 management CLI (storage cost, prefix purge)
B2 Native API v3 client for the ACG B2 account: status, buckets, keys,
files, bucket-size, usage/cost ($0.00695/GB), gated create/delete bucket+key,
and gated lifecycle-based delete-prefix/lifecycle-remove for prefix purges.
Read-only by default; destructive ops require --confirm.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 14:31:09 -07:00
501f3eb130 sync: auto-sync from GURU-5070 at 2026-06-01 06:57:20
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-01 06:57:20
2026-06-01 06:57:28 -07:00
887f0a21a9 sync: auto-sync from HOWARD-HOME at 2026-05-31 20:13:56
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-05-31 20:13:56
2026-05-31 20:14:09 -07:00
4c49b85012 sync: auto-sync from GURU-KALI at 2026-05-31 19:37:22
Author: Mike Swanson
Machine: GURU-KALI
Timestamp: 2026-05-31 19:37:22
2026-05-31 19:37:23 -07:00
c37fd11ee9 sync: auto-sync from GURU-KALI at 2026-05-31 19:31:53
Author: Mike Swanson
Machine: GURU-KALI
Timestamp: 2026-05-31 19:31:53
2026-05-31 19:31:56 -07:00
959b3a159d fix(onboarding-diag): harden 3rd-party AV detection against false positives
Require SecurityCenter2 productState RTP-enabled bit before treating a
registered AV as active (lapsed/disabled AV no longer suppresses the
critical Defender finding), and tighten the Datto fallback to AV/EDR
services only — excluding Datto RMM/Backup/Workplace/Continuity/File so
non-AV Datto products can't masquerade as antivirus. Fix misleading comment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 18:47:54 -07:00
d17e9be135 sync: auto-sync from GURU-5070 at 2026-05-31 16:35:50
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-05-31 16:35:50
2026-05-31 16:35:57 -07:00
85509a71dc feat(onboarding-diag): allowlist ACG's own stack; downgrade Defender-off w/ 3rd-party AV (3d886f1a)
The probe flagged ACG's own MSP tooling (ScreenConnect/ConnectWise Control,
Splashtop, Syncro, Datto RMM, Datto EDR/AV) as CRITICAL "foreign agent" and
flagged Defender-off as CRITICAL even when a 3rd-party AV had legitimately
disabled it. Now: allowlisted tools emit an INFO "expected ACG tooling"
finding (genuinely-foreign tools still CRITICAL); Defender-off is downgraded
to INFO only when a 3rd-party AV is active. JSON contract + grading unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 16:22:38 -07:00
a735d8c220 fix(onboarding-diag): jq-normalize single-element facts arrays (cc5dbdfa)
PowerShell ConvertTo-Json collapses a single-element array into a bare
object (or, for string arrays, a bare string). The runner iterated/joined
several facts.* fields, so single-volume / single-NIC / single-admin
machines silently dropped the Fixed Volumes table and errored the network
adapter, local-administrator, and installed-software-diff lines.

Fix jq-side in the runner (backward-compatible with already-written
immutable baselines; PS1 untouched per the todo decision) using
`if type=="array" then . elif .==null then [] else [.] end` at:
volumes, network_adapters (+ inner ip/dns), local_administrators, and
installed_software (both sides of the diff). Verified with synthetic
single-element JSON and a multi-element no-regression check.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-31 14:12:41 -07:00
973e9dbe8f sync: auto-sync from GURU-KALI at 2026-05-31 09:36:59
Author: Mike Swanson
Machine: GURU-KALI
Timestamp: 2026-05-31 09:36:59
2026-05-31 09:37:01 -07:00
80af6eb496 fix: improve git hook JSON escaping
Fixed post-commit hook to properly escape JSON payloads using python.
Previous implementation was vulnerable to breaking on commit messages
with special characters (quotes, newlines, etc.).

CHANGES:
- Use python json.dumps() for proper JSON escaping
- Prevents 422 validation errors from coordination API
- Handles multi-line commit messages correctly

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-05-31 08:54:53 -07:00
ff3dc12749 feat: add git hooks for automated dev-alerts notifications
Implemented post-commit hooks to automatically send coordination messages
to dev-alerts channel when feature specs are created or builds occur.

HOOKS:
- .git/hooks/post-commit (main repo)
- .git/modules/projects/msp-tools/guru-connect/hooks/post-commit (GC submodule)

TRIGGERS:
- Feature spec creation (SPEC-NNN files)
- Build events (spec/feat/fix/build commits on main)

ACTIONS:
- Extract spec metadata (priority, effort, overview)
- Send coordination message to dev-alerts channel
- Include commit hash, author, files changed

DOCUMENTATION:
- .claude/HOOKS.md - Full hook documentation
- .claude/hooks/post-commit.template - Reusable hook template

BENEFITS:
- Automatic notifications for new features
- Build tracking on main branch
- Team awareness of spec changes
- No manual message sending required

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-05-31 08:52:41 -07:00
2afec8f149 sync: auto-sync from GURU-KALI at 2026-05-31 07:40:31
Author: Mike Swanson
Machine: GURU-KALI
Timestamp: 2026-05-31 07:40:31
2026-05-31 07:40:32 -07:00
c67accddcc memory: record RMM webhook docs-only build guard (SPEC-020 Phase 0)
Host guard in /opt/gururmm/webhook-handler.py skips docs-only pushes; note the
stale repo copy must not be redeployed over it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 17:07:09 -07:00
833815b5f2 memory: add RMM identify-by-IP feedback
Match a known external IP to the RMM agent rather than reconning every
candidate machine (Mike's correction during the Pavon GuruConnect-client
removal). Notes the GuruRMM agent-IP tracking gap (todo 7459428e).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 16:39:46 -07:00
3895aa363c sync: auto-sync from GURU-5070 at 2026-05-30 15:26:54
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-05-30 15:26:54
2026-05-30 15:27:00 -07:00
5b285321c0 scc: Session save and push from GURU-5070 at 2026-05-30 14:47
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-30 14:46:14 -07:00
2460d52b48 sync: auto-sync from GURU-5070 at 2026-05-30 11:51:56
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-05-30 11:51:56
2026-05-30 11:52:04 -07:00
db6aa3683f fix(bitdefender): all-clients sweep, quarantine path, EDR controls, self-test
Several bugs found and fixed during live testing against the ACG GravityZone
tenant:
- security_sweep_all_clients: iterate each company (the companies container is
  not a valid endpoint parent; passing it 400'd the whole sweep)
- list_quarantine: use service-scoped path quarantine/computers with companyId
  (bare quarantine module 404'd; param is companyId not parentId)
- rename GZEndpointSummary.detection_active -> threat_detected with corrected
  semantics (True = active threat, tracks with infected; not an engine-on flag)
- status: readable sectioned table renderer for the nested apiKey/license dict
- portable CLAUDETOOLS_ROOT resolution (derive from file path, not a Windows
  literal) so it works on the Mac/Linux fleet

Adds scripts/selftest.py: a 29-check read-only harness (all passing) covering
every read command, --json, error exit codes, and destructive-action gating.
EDR/incident commands (blocklist, isolate/unisolate, blocklist-add/remove) and
raw destructive-method gating are included from this session's work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 07:29:55 -07:00
446d25c66b fix(bitdefender): gate raw destructive calls, allow --json after subcommand
- raw now refuses destructive methods (delete/uninstall/remove/reconfigure)
  without --confirm (it previously bypassed all gating)
- --json is now accepted after the subcommand (shared via a common parent
  parser), matching the documented usage
- drop a placeholder-less f-string
- SKILL.md: document raw gating + that raw echoes upstream responses verbatim

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 07:29:55 -07:00
8ba92bf02b feat(bitdefender): GravityZone Cloud Public API skill
Adds a /bitdefender skill that drives the ACG GravityZone partner tenant
via the JSON-RPC Public API. Read + management ops (companies, endpoints,
live security sweep, policies [read-only/shallow], packages, quarantine,
scans, groups, move/delete). Identity-tier JSON cache (24h TTL,
--refresh); volatile status is always pulled live, never cached.

Security hardening: API key loaded from SOPS vault at runtime (never on
disk/logs/argv/cache); destructive deletes gated behind --confirm; `raw`
also gates destructive methods; upstream error bodies truncated. UNVERIFIED
API methods reachable only via `raw`. Reuses the auth/JSON-RPC pattern from
api/services/gravityzone_service.py.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-30 07:29:55 -07:00
c670471c8a fix(gc-audit): correct Pass B sqlx premise (GC uses runtime sqlx)
GC's db layer uses runtime sqlx::query()/query_as() throughout - zero
compile-time macros (verified during v2 Task 1; CLAUDE.md's "compile-time
checked queries" line is stale). Pass B now treats a NEW sqlx::query! macro
as a [LOW] deviation (reintroduces the .sqlx-cache footgun + build-time
DATABASE_URL) instead of blessing macros as the GC norm. Fixed both the
intro divergence note and the Pass B check.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 18:39:35 -07:00
e5ccb6a71a feat(gc-audit): use .claude/standards + reconcile specs/plans
- Load .claude/standards/ (index.yml + files) as the compliance baseline;
  Rust/TS passes now cite the specific standard each finding violates
- Glob all docs/specs/SPEC-*.md (incl. SPEC-002) + specs/*/plan.md; Pass F
  reconciles SPEC phases and plan.md [DONE] markers against code (3rd table)
- Extract a planned-work list from SPEC-002 + active plans; tag findings that
  match already-planned work as [TRACKED] so mid-rebuild audits surface net-new

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 18:23:46 -07:00
df6a2dd5d8 memory: record GuruConnect v2 direction (SPEC-002)
Native-first full key fidelity + bidirectional file cut/paste/drag are Mike's
headline must-haves; WebRTC fallback only. Greenfield-salvage-cores,
standalone-first + RMM contract, hardened single-tenant but tenancy-ready.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 18:08:41 -07:00
c70cd70070 feat(skills): add gc-audit skill for GuruConnect end-to-end audit
Modeled on rmm-audit but adapted to GuruConnect's architecture: 7 passes
(6 parallel + sequential CI/CD), protobuf 4-way wire-drift matrix, sqlx
compile-time macros allowed (GC norm), Gitea Actions pipeline + deploy host
checks, reconciles docs/FEATURE_ROADMAP.md + TECHNICAL_DEBT.md. Invoke via
/gc-audit; --pass=<name> for a single pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 17:24:53 -07:00
e8ac7598de spec(gururmm): SPEC-017 mobile device support + Apple cert memory
- Update guru-rmm submodule pointer (SPEC-017 mobile device support)
- Record Apple Developer + MDM Push certs (acquired 2026-05-29); MDM push
  cert renews annually on the same Apple ID or all enrolled iOS devices break

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 17:11:37 -07:00
f576f7d686 sync: auto-sync from GURU-BEAST-ROG at 2026-05-29 16:34:25
Author: Mike Swanson
Machine: GURU-BEAST-ROG
Timestamp: 2026-05-29 16:34:25
2026-05-29 16:34:31 -07:00
be6b1c40e7 docs: add temp/ graduation workflow guide
- Created .claude/TEMP_GRADUATION.md with review protocol before cleanup
- Graduation decision tree and checklist
- Examples from May 2026 cleanup (what should have been kept)
- Added to CLAUDE.md reference section
2026-05-29 14:00:10 -07:00
c093e7f8a4 memory: ACG's own MSP stack (ScreenConnect/Splashtop/Syncro/Datto RMM+EDR/GuruRMM) - not foreign agents
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 13:25:18 -07:00
df9be01065 feat(rmm): onboarding diagnostic (Phase 1) - probe + triage + baseline
/rmm diagnose: dispatches a Windows security/health probe to a newly onboarded
agent, grades RED/AMBER/GREEN, writes an immutable per-client baseline
(clients/<slug>/onboarding-baselines/), diffs vs prior, and alerts CRITICALs to
#dev-alerts. Probe is PS5.1/ASCII/SYSTEM-safe, never-abort, base64 chunked upload
around the agent command-size cap. Code-reviewed (no blockers); folded in
immutability guard, severity-independent finding ids, Defender-unknown sentinel,
expanded competitor/backup detection.

First baselines captured: Rednour FRONTDESKRECEPT + LEGALASST (both RED - prior
MSP ScreenConnect/Splashtop/Syncro still live; LEGALASST OS EOL).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 13:09:11 -07:00
6821d4d6fc sync: auto-sync from HOWARD-HOME at 2026-05-29 12:35:52
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-05-29 12:35:52
2026-05-29 12:36:03 -07:00
95daa70551 feat(alerts): route RMM/Dev alerts to private #dev-alerts, Syncro stays in #bot-alerts
post-bot-alert.sh now auto-routes by message prefix: [RMM]/[DEPLOY]/[DEV]/[BUILD]/
[GURURMM]/[SMARTBADGE-WATCH] -> #dev-alerts (1509998508198068484, private; Howard+Mike);
everything else incl. [SYNCRO] -> #bot-alerts (unchanged). Optional 2nd arg (dev|bot|
<channel_id>) overrides. Existing call sites (scheduled SmartBadge task, /rmm) route
correctly with no change. /rmm skill docs updated to reference #dev-alerts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 12:18:49 -07:00
7d326f2fd0 docs: record Claude-Builder=PLUTO mapping + infra working-feedback memories
- Pluto memory/wiki/machine notes: Unraid VM "Claude-Builder" == hostname PLUTO ==
  172.16.3.36 (same box); RMM-agent access path when SSH key unauthorized; now also
  builds the GuruConnect Windows agent + hosts a Gitea Actions runner.
- New feedback memories: post #bot-alerts only for client/ticket-affecting RMM commands;
  proceed autonomously through routine infra/build prerequisites.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 10:37:44 -07:00
c2065db2f4 feat(rmm): add /rmm onboard — client+site provisioning + vault enrollment-key flow
Documents the full GuruRMM onboarding process (POST /api/clients, POST /api/sites
with one-time api_key capture), the vault storage step, and the sops-encryption
gotchas hit while onboarding Rednour Law Offices (--config required, quote dates,
secrets under credentials:).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 10:29:20 -07:00
324c3b94a4 feat(birth-biologic): KSTEEN SmartBadge daily watch + remediation scripts
Corrected the 2026-05-28 SmartBadge fix on KSTEENBB2025: the older Datto
Workplace Desktop v8 had been left in place (diverged from the fleet, which
runs Datto Workplace v10.53.4 / Workplace2). Removed v8, installed v10,
aligned the SmartBadge _CC add-in + CLSID to the EVO-X1 reference, and cleared
Kristin's stuck per-user LoadBehavior=2.

- ksteen-smartbadge-verify.ps1: PASS/FAIL verdict vs fleet reference
- ksteen-smartbadge-fix.ps1: machine + per-user remediation
- check-ksteen-smartbadge.sh: daily runner (RMM -> verdict -> #bot-alerts,
  coord message to Mike on drift); driven by a 7-day scheduled task on GURU-5070
- wiki: agents table, dual-Workplace SmartBadge known issue + fleet standard,
  2026-05-28/29 history

Syncro #32339. Coord todo 4a5b09b3 (watch expires 2026-06-05).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 08:40:54 -07:00
5c6ff8fb52 feat: add /gc-feature-request skill; register guruconnect coord key
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 07:33:25 -07:00
a00247bc74 chore: convert guru-connect to submodule; integrate ADR-008 + 2026-05-29 session log
guru-connect is now tracked as a submodule (azcomputerguru/guru-connect @ e3e95f8);
its working state was published to the GC repo first, so no content is lost. guru-rmm
advanced to include ADR-008 (GC integration boundary) replayed on top of the team's
Integrations Center / discovery advances. Includes the native-remote-control spec
(now inside the GC submodule), the versionable-products memory, and the session log.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-29 06:36:54 -07:00
1127ea1abd syncro skill: require [TEST] prefix on all test article subjects
Any ticket, estimate, appointment, or schedule created for testing or API
research must have its subject/name prefixed with [TEST]. Added as a Hard
Rule and cross-referenced in the recurring schedules section.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 14:32:12 -07:00
8e35986765 sync: auto-sync from GURU-5070 at 2026-05-28 14:27:08
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-05-28 14:27:08
2026-05-28 14:27:12 -07:00
94a173ccff sync: auto-sync from HOWARD-HOME at 2026-05-28 12:26:48
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-05-28 12:26:48
2026-05-28 12:26:56 -07:00
96ed34de4b sync: auto-sync from GURU-5070 at 2026-05-28 10:18:36
Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-05-28 10:18:36
2026-05-28 10:18:43 -07:00