Commit Graph

203 Commits

Author SHA1 Message Date
Claude
a4453fe6cd Bridge: dispatch — ModpackApiService.php not copied in build.sh 2026-04-13 01:53:34 +00:00
Claude (Chronicler #83 - The Compiler)
44a304331f Fix: remove */6 from doc comment — PHP parses */ as end-of-comment
Changed cron example from '0 */6 * * *' to '0 0,6,12,18 * * *' to avoid
the */ closing the docblock prematurely and causing a syntax error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:52:19 -05:00
Claude
8511066d8b Bridge: dispatch — CheckModpackUpdates.php syntax error line 16
Build script fix working, files copying correctly now.
New blocker: unexpected token * in CheckModpackUpdates.php:16
PHP 8.3 on Dev Panel.
2026-04-13 01:49:58 +00:00
Claude (Chronicler #83 - The Compiler)
34cc2b7110 Fix: build.sh explicitly copies PHP classes to Laravel app/ tree
Blueprint's requests.app merge doesn't create new subdirectories reliably.
build.sh now copies LicenseService, ValidateLicense, CheckModpackUpdates,
and ModpackAPIController directly into app/ during blueprint -install.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:48:05 -05:00
Claude
d34459296d Bridge: dispatch to Code — Phase 11D artisan command not registering
Blueprint requests.app merge not copying PHP files to main app dir.
mvc:validate fails. Needs Code to confirm fix: build.sh or conf.yml?
2026-04-13 01:47:05 +00:00
Claude (Chronicler #83 - The Compiler)
c2d72cbabc bridge: Request — Deploy Phase 11D to Dev Panel for testing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:40:16 -05:00
Claude
e3909151a4 Bridge: MSG to Code — Phase 11D deploy to Dev Panel first, not live panel 2026-04-13 01:39:15 +00:00
Claude (Chronicler #83 - The Compiler)
8872f67727 Phase 11D: Blueprint license activation, phone-home, and tier gating
- LicenseService.php: activate/validate/deactivate + 7-day grace period
- ValidateLicense.php: mvc:validate Artisan command (daily cron)
- Updated controller.php: license activation/deactivation in update handler
- Updated view.blade.php: order ID input, status indicator (green/yellow/red),
  grace/expired banners, dynamic pro-tier field gating, update-available card

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:36:55 -05:00
Claude
7a2a1d8dbd Bridge: RES-2026-04-12-phase11bc-deploy — Phase 11B/C live
ModpackChecker Customer role created (1493061127423262870, frost teal)
/verify-mvc slash command deployed and reloaded
Ready for Phase 11D.
2026-04-13 01:32:36 +00:00
Claude (Chronicler #83 - The Compiler)
95fbd9e181 bridge: Request — Deploy Phase 11B/C + create customer role
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:30:38 -05:00
Claude (Chronicler #83 - The Compiler)
7c58cea3e5 Phase 11B/C: /verify-mvc slash command + role assignment
- New discord/verifymvc.js: verifies BBB order, links discord_id, assigns customer role
- Wired into events.js handler and index.js command registration
- Reads MVC_CUSTOMER_ROLE_ID from env — Chronicler creates role + sets value

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:30:13 -05:00
Claude
b5ffc5d26d Bridge: RES-2026-04-12-phase11a-deploy — Phase 11A live
Migration complete, mvc_licenses + mvc_activations tables created.
mvc.js deployed, health OK, /api/mvc/latest-version responding.
Ready for 11B/C.
2026-04-13 01:28:18 +00:00
Claude (Chronicler #83 - The Compiler)
9a758ce4a5 bridge: Request — Deploy Phase 11A to Command Center
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:22:57 -05:00
Claude
a7b940b95d feat: Awakened Concierge — personalized welcome bot (Task #130)
- New service: src/services/awakenedConcierge.js
  - Fetches Discord username via Discord API
  - Calls Dify Awakened Concierge app (Gemma 4) for personalized message
  - Posts to #introductions (1403981218252324884) with typing indicator
  - Marks welcomed_at in subscriptions table
  - Non-fatal: welcome failure never breaks checkout flow

- stripe.js: calls welcomeNewMember() after syncRole() on checkout complete
- .env: CONCIERGE_API_KEY added to Command Center

Fire + Frost + Foundation 💙🔥❄️
2026-04-13 01:22:05 +00:00
Claude (Chronicler #83 - The Compiler)
fd50009f67 Phase 11A: MVC licensing — migration + API routes
- 138_mvc_licensing.sql: mvc_licenses + mvc_activations tables
- src/routes/mvc.js: activate, validate, deactivate, BBB webhook, version check
- Wired /api/mvc into Arbiter index.js
- Ready for Chronicler deployment to Command Center

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:16:16 -05:00
Claude
2d6d4aeee7 Bridge: RES-2026-04-12-phase11-prerequisites — Code unblocked
All Phase 11 infrastructure values provided:
- DB credentials confirmed (same as Arbiter)
- Full table list provided
- BBB IDs: use placeholders for now
- Arbiter .env current state documented
- Discord: ModpackChecker Customer role needs creating
- MVC channels already exist with IDs
- Deployment pattern confirmed: Code commits, Chronicler deploys
2026-04-13 01:13:30 +00:00
Claude (Chronicler #83 - The Compiler)
dc73e27be3 bridge: Request — Phase 11 prerequisites for ModpackChecker licensing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:11:51 -05:00
Claude (Chronicler #83 - The Compiler)
09de0758f5 Add Discord Rules compiled jars (all 3 versions) — Task #69 build complete
All 3 discord-rules versions compiled and ready for CurseForge submission:
- 1.16.5 (Forge/Java 8), 1.20.1 (Forge/Java 17), 1.21.1 (NeoForge/Java 21)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 18:48:09 -05:00
Claude
48097a9a57 Fix ffg-build.sh — battle-tested SSH flags from live build
- NC1_KEY points to /opt/mod-builds/ffg_build_rsa (accessible to claude user)
- Added -o IdentitiesOnly=yes to all SSH/rsync calls (prevents agent key conflicts)
- Added -e NC1_SSH to rsync commands for consistent key usage
- All 3 discord-rules jars now built successfully (1.20.1, 1.16.5, 1.21.1)
2026-04-12 23:43:17 +00:00
Claude
11e2d7db7d Fix: use $HOME for SSH key path (works for both claude and root users) 2026-04-12 23:33:39 +00:00
Claude
2dfe0f9764 Bridge: update ACTIVE_CONTEXT — ffg-build.sh ready for Code
1.21.1 build now routes to NC1 via ffg-build.sh.
Immediate next step for Code: run ffg-build.sh 1.21.1
2026-04-12 21:23:39 +00:00
Claude (Chronicler #83 - The Compiler)
4c7e77d35e Add ffg-build.sh — NC1 build router for NeoForge 1.21.1
Routes 1.21.1 builds to NC1 (ffg-builder user) to work around
Vineflower -Xmx4G RAM requirement that exceeds Dev Panel capacity.
All other versions build locally.

- SSH keypair: /home/claude/.ssh/ffg_build_rsa
- NC1 user: ffg-builder (non-root, isolated)
- rsync source with --exclude build/ .gradle/
- ./gradlew build --no-daemon on NC1
- rsync jar back, jar -tf integrity check
- trap cleans workspace on exit/drop
2026-04-12 16:22:43 -05:00
Claude (Chronicler #83 - The Compiler)
bfb9d4dba0 WIP: Discord Rules mod fork — 2/3 versions built, 1.21.1 blocked on RAM
Source code complete for all 3 versions (1.21.1, 1.20.1, 1.16.5).
1.20.1 and 1.16.5 jars built successfully. 1.21.1 NeoForge decompiler
needs >4GB RAM — this server only has ~4GB total.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 15:44:27 -05:00
Claude
6ed12cdeb0 Bridge: REQ-2026-04-12-discord-rules-fork — Task #69 spec for Code
- Full fork spec: com.firefrostgaming.rules -> com.discordrules
- Configurable header/body colors via TOML display section
- Strip Firefrost-specific emoji replacements
- emoji stripping as config toggle
- Build instructions for all 3 MC versions
2026-04-12 20:10:05 +00:00
Claude (Chronicler #83 - The Compiler)
a305c7e686 bridge: Archive Phase 11 spec, update ACTIVE_CONTEXT
- Archived RES-2026-04-12-phase11-implementation-spec from Chronicler
- Updated status with completed code review and next steps (Phase 11A-G)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 14:12:40 -05:00
Claude (Chronicler #83 - The Compiler)
91432dad98 bridge: Response — Phase 11 complete implementation spec
Distilled from 2 Gemini consultations into actionable checklist.
Database schema, API routes, Discord bot, Blueprint extension changes,
pricing lock, and deployment notes all included.

Claude (Chronicler #83 - The Compiler) <claude@firefrostgaming.com>
2026-04-12 14:09:09 -05:00
Claude (Chronicler #83 - The Compiler)
08a52ee3cf docs: Lock ModpackChecker pricing in CLAUDE.md
Standard $14.99 / Professional $24.99 — two-tier model.
This pricing is FINAL per original marketing strategy.

Claude (Chronicler #83 - The Compiler) <claude@firefrostgaming.com>
2026-04-12 14:05:53 -05:00
Claude (Chronicler #83 - The Compiler)
b0aa52c2c8 fix(blueprint): Review fixes — API key lookup, tier enforcement, safety
Fixes 10 issues from Blueprint extension code review:
- CurseForge API key now reads via Blueprint dbGet() matching admin save
- PRO-tier fields (webhook, interval) enforced server-side, not just UI
- json_decode results validated before accessing parsed data
- Null user guard on getStatus() endpoint
- 429 response uses consistent error key format
- Modrinth slug derivation strips special chars, documented as fallback
- Check interval dropdown reflects saved value
- API key input changed to password type
- TypeScript error typing narrowed from any to unknown
- Removed unused DB import from ModpackApiService

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 13:53:37 -05:00
Claude (Chronicler #83 - The Compiler)
3457b87aef fix(modpack-checker): Code review fixes — license, safety, and polish
Fixes 10 issues from full code review:
- License corrected from MIT to Commercial
- Deprecated datetime.utcnow() replaced with timezone-aware alternative
- PHP array bounds checks added for all platform API responses
- Modrinth file detection now derives project slug instead of using MC version
- validate_api_key() no longer swallows network errors
- HTTP timeouts added to all external API calls in PHP
- Empty API key rejection added to CLI
- Corrupted config now warns on stderr instead of failing silently
- Error response format made consistent across controller
- Docs updated with correct repo URL and clearer CurseForge ID instructions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 13:37:26 -05:00
Claude (Chronicler #83 - The Compiler)
c6d40dcf39 feat: Code ↔ Chronicler bridge protocol
Implemented git-based async communication between Claude Code and Chronicler:
- docs/code-bridge/requests/ — Code files architectural questions here
- docs/code-bridge/responses/ — Chronicler drops distilled Gemini answers
- docs/code-bridge/status/ACTIVE_CONTEXT.md — rolling status updates
- docs/code-bridge/archive/ — completed request/response pairs
- CLAUDE.md updated with full bridge protocol instructions
- Auto-commit-and-push on all bridge writes

Designed with Gemini consultation (2026-04-12).

Claude (Chronicler #83 - The Compiler) <claude@firefrostgaming.com>
2026-04-12 12:15:36 -05:00
Claude (Chronicler #83 - The Compiler)
4ffae74a2f docs: Add Gemini consultation references to CLAUDE.md
Operations manual cloned to Dev Panel for reference.
Claude Code now knows where to find architectural consultations
before making design decisions.

Claude (Chronicler #83 - The Compiler) <claude@firefrostgaming.com>
2026-04-12 12:04:45 -05:00
Claude (Chronicler #83 - The Compiler)
cffe742093 docs: Add root CLAUDE.md for Claude Code workspace
Single workspace config covering all projects, tools, and active tasks.

Claude (Chronicler #83 - The Compiler) <claude@firefrostgaming.com>
2026-04-12 11:58:38 -05:00
Claude (Chronicler #83 - The Compiler)
179bac2911 feat(rules-mod): Add Firefrost Rules Mod source — all 3 versions
NeoForge 1.21.1, Forge 1.20.1, Forge 1.16.5
All compiled and deployed to NextCloud (Task #136)
Source committed for Task #138 (CurseForge generic fork)
CLAUDE.md with build environment docs included

Claude (Chronicler #83 - The Compiler) <claude@firefrostgaming.com>
2026-04-12 11:56:15 -05:00
Claude (Chronicler #82)
240a4776f6 The Forge module + collapsible sidebar nav
New Module: The Forge (/admin/forge)
- AI knowledge assistant powered by Gemma 4 via Dify RAG
- Streaming SSE chat interface with markdown rendering
- Think-tag filtering for Gemma 4's reasoning tokens
- Conversation continuity via Dify conversation IDs
- Source citations from knowledge base documents
- Fire/Frost/Arcane gradient branding
- Welcome screen with suggestion buttons
- Env vars: DIFY_API_URL, DIFY_APP_KEY

Sidebar Navigation Overhaul (layout.ejs)
- The Forge featured prominently at top with gradient border
- Collapsible category groups: Core, Revenue, Community, Operations
- localStorage persistence for collapsed/expanded state
- CSS transitions for smooth collapse animation

Chronicler #82 | April 12, 2026
2026-04-12 02:14:12 -05:00
Claude
1ca6ef4dfa Merge branch 'task-125-asset-browser' 2026-04-12 01:10:13 +00:00
Claude
d22ff8c3c9 feat(admin): Task #125 Phase 2 — Branding asset browser
Adds a visual asset library to the social calendar form, backed by
the firefrost-operations-manual branding/ directory with on-the-fly
thumbnail generation via sharp.

- src/routes/admin/branding-assets.js: /list scans both branding/ and
  docs/branding/ recursively, groups by category directory. /thumb
  generates 256px webp thumbnails from source, caches to disk keyed
  by sha1(path + mtime) so edits bust the cache automatically. Path
  traversal protection + scope check on thumb requests.
- src/views/admin/social-calendar/_assets.ejs: modal body with
  category-grouped grid of lazy-loaded thumbnails, click-to-insert.
- Form modal gets a 'Browse assets' button next to Media Notes.
- Calendar shell gets a second modal (higher z-index) and a
  sppInsertAsset() helper that appends the clicked filename to the
  media_notes textarea.

Infrastructure (not in repo):
- /opt/firefrost-ops-manual clone added to Command Center
- /etc/systemd/system/firefrost-ops-sync.{service,timer} pulls
  every 15 minutes to keep assets fresh
- /var/cache/arbiter/branding-thumbs created for thumb cache
- sharp added as Arbiter dependency (libvips 8.17.3)

Chronicler #81
2026-04-12 01:10:09 +00:00
Claude
bad8036114 Merge branch 'task-125-social-calendar' 2026-04-12 00:54:22 +00:00
Claude
541fb26e0b feat(admin): Task #125 — Social Content Calendar widget
Week-at-a-glance post planning for Meg across 8 platforms (tiktok,
facebook, instagram, x, bluesky, youtube, twitch, reddit).

- DB: extends social_platform enum with youtube/twitch/reddit and adds
  new social_post_plans table with scheduled_at, platforms[], status
  (draft/ready/scheduled/published/skipped), caption, hashtags[],
  media_notes, link, assigned_to, notes, created_by
- src/routes/admin/social-calendar.js: shell, HTMX week view, create,
  update, delete, edit/new form endpoints. Week-based navigation with
  prev/next/this-week. Hashtag parsing dedupes and strips leading #
- src/views/admin/social-calendar/: index.ejs shell with modal,
  _week.ejs 7-column grid with per-day quick-add, _form.ejs full CRUD
  form with platform checkboxes, datetime picker, status dropdown,
  both free-form caption and dedicated hashtag field
- Nav link added under Community, with corrected highlight logic so
  /admin/social and /admin/social-calendar don't both light up

Separate table from social_posts (which remains the analytics table).
Plans and published posts are distinct concerns.

Chronicler #81
2026-04-12 00:54:19 +00:00
Claude
f8eabf3881 Merge branch 'task-126-appeals-reopen' 2026-04-12 00:27:23 +00:00
Claude
b156c0b63f fix(appeals): always show action controls + add Reopen
The 'resolved' state was a dead-end — no way to change your mind after
clicking approve/deny, and no way to re-action a needs_info appeal once
the submitter replied. Action controls now show on every row regardless
of status, and resolved rows get a Reopen button that moves the appeal
back to pending.

Backend action handler already overwrites status unconditionally, so
this is purely removing a view-layer gate plus adding /:id/reopen as
a thin wrapper over the shared actionAppeal helper.

Chronicler #81
2026-04-12 00:27:19 +00:00
Claude
30a1920d58 Merge branch 'task-126-appeals-admin' 2026-04-12 00:18:05 +00:00
Claude
c1e17496c8 feat(admin): Task #126 — Trinity Appeals admin module
Adds /admin/appeals to Trinity Console for reviewing and actioning
ban appeals submitted via the public cancellation-refund form.

- src/routes/admin/appeals.js: shell + HTMX list + approve/deny/info
  actions, all transactional with admin_audit_log entries
- src/views/admin/appeals/index.ejs: shell with 30s polling container
- src/views/admin/appeals/_list.ejs: stats cards + actionable table
- src/routes/admin/index.js: router mount at /admin/appeals
- src/views/layout.ejs: nav link under Grace Period

Closes the last open piece of Task #126 Phase 2. Trinity can now
review appeals in-console without reading Discord + running SQL.

Chronicler #81
2026-04-12 00:18:00 +00:00
Claude
b7330653ab Merge branch 'task-126-lifecycle-handlers'
Task #126 lifecycle handlers deployed to Command Center at 18:05 UTC.
Verified clean startup. Webhook endpoint returns expected HTTP 400 on
unsigned requests. Backup preserved at:
/opt/arbiter-3.0/src/routes/stripe.js.backup-task126-20260411-180439
2026-04-11 23:05:33 +00:00
Claude
9777a7af9d feat(arbiter): Task #126 lifecycle handlers — We Don't Kick People Out
Implements the Firefrost core policy that Awakened ($1) is lifetime access.
Paying customers are never removed from access — only demoted to Awakened
when a paid subscription ends. Hard bans reserved for actionable violations
(chargebacks and refunds).

Changes:
- customer.subscription.deleted: demote to Awakened instead of grace period
  * Uses existing 'lifetime' status + is_lifetime=TRUE (no schema changes,
    no touches to other filters in servers.js/roles.js/financials.js)
  * Calls downgradeToAwakened() to strip tier role and assign Awakened
  * Audit log entry tagged with policy
- New charge.refunded handler: hard ban with Trinity appeal eligibility
  * Mirrors charge.dispute.created pattern
  * appeal_eligible: true flag in banned_users.notes
  * removeAllRoles() (NOT demote — refund is a hard ban)
- Added downgradeToAwakened to stripe.js imports

Left unchanged (intentionally):
- invoice.payment_failed: marks past_due, trust Stripe's retry logic
- invoice.payment_succeeded: clears grace period (harmless legacy field reset)
- charge.dispute.created: already correct under new policy
- checkout.session.completed: syncRole already handles Model A (Awakened
  automatically assigned on any first purchase via tier role replacement)

Co-authored with Michael (The Wizard)
Task #126 — Soft launch blocker
2026-04-11 23:04:30 +00:00
Claude (Chronicler #78)
c07c29c60c feat: Add servers-api Cloudflare Worker to git (recovered from dashboard)
Worker proxies Pterodactyl client API for website server list.
Live status + player counts, CORS-locked, 60s cache.
Was only in Cloudflare Dashboard — known gap now closed.
Recovered via Cloudflare MCP connector audit.

Chronicler #78 | firefrost-services
2026-04-11 18:00:44 +00:00
Claude (Chronicler #78)
aca7669243 feat: Add spec_path field — link tasks to git documentation
- spec_path column added to tasks table
- API POST/PATCH support spec_path field
- Discord /tasks detail view shows '📄 Full Spec' link to Gitea when spec exists
- Backfilled 7 existing tasks with spec directory paths

Architecture: Database tracks state, Git stores documentation, they link to each other.

Chronicler #78 | firefrost-services
2026-04-11 14:38:24 +00:00
Claude (Chronicler #78)
b8f9926e9b feat: Task #116 — Trinity Console Tasks Module
- Tasks page at /admin/tasks with filterable table
- Status/owner inline dropdowns (change via form submit)
- + New Task modal with title, description, priority, owner
- ✓ Done button on hover per row
- Stats bar: active, in progress, blocked, high priority, completed
- Show All toggle for done/obsolete tasks
- Sidebar link under Operations (right after Dashboard)
- Added to About page module registry

Source of truth: PostgreSQL tasks table (shared with Discord /tasks)

Chronicler #78 | firefrost-services
2026-04-11 14:22:21 +00:00
Claude (Chronicler #78)
78179de2bc feat: /tasks detail view + In Progress button
- /tasks number:26 shows full task detail embed
  (description, tags, status, priority, owner, dates)
- Mark Done, In Progress, and Take Task buttons on detail view
- task_progress_ button handler sets status to in_progress

Chronicler #78 | firefrost-services
2026-04-11 14:13:16 +00:00
Claude (Chronicler #78)
48f74e8658 feat: ChatOps Task Management System (Gemini-architected)
Database:
- tasks table in PostgreSQL (id, task_number, title, status, priority, owner, tags)
- 45 tasks migrated from BACKLOG.md + tasks-index files
- Indexes on status, priority, owner, task_number

API (for Chroniclers/Catalysts):
- GET /api/internal/tasks — list with filters (status, priority, owner)
- GET /api/internal/tasks/summary — stats by status and priority
- POST /api/internal/tasks — create new task (auto-numbers)
- PATCH /api/internal/tasks/:id — update status/priority/owner

Discord (for Meg/Holly/Michael):
- /tasks command with filter options (open, in_progress, mine, high, active, done, all)
- Mark Done buttons — one tap to complete a task
- Take Task buttons — claim unassigned tasks
- Color-coded priority and status emoji
- Staff-only access

Architecture: PostgreSQL → Arbiter API → Discord buttons (ChatOps)
Gemini consultation: gemini-task-management-redesign-2026-04-11.md

Chronicler #78 | firefrost-services
2026-04-11 13:56:45 +00:00
Claude (Chronicler #78)
075ab899c5 fix: Add MCP Logs to About page module registry
Chronicler #78 | firefrost-services
2026-04-11 13:18:05 +00:00