1
0
Fork 0
Commit graph

380 commits

Author SHA1 Message Date
d4c8d81e2f feat(economy): ingest purchase demand and price vendor listings from the ledger
Market-tick prices new NPC listings from the economy ledger (base x priceModifier, vendor modifier applied) instead of the old autoPrice +/-15% randomness, and scales restock quantity down under shortage. buyListing records real demand from completed purchases of NPC/vendor stock.

Ultraworked with [Sisyphus](https://github.com/code-yeongju/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 17:22:32 -04:00
447df220f5 feat(economy): add economy tick with demand simulation and price modifiers
Add the src/lib/economy service (GM baselines, deterministic per-period demand drift, price modifier computation, event emission) and the economy-tick bin. Gated by GameRules economy.enabled; period-idempotent with a cold-start observation gate.

Ultraworked with [Sisyphus](https://github.com/code-yeongju/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 17:22:30 -04:00
ded5d4b341 feat(economy): add market-state collection with supply/demand baselines
Introduce the market-state ledger (one doc per tradeable resource/asset), GM baseline fields on Assets/Resources, global economy knobs on Game Rules, market-state RBAC permissions, and the market-state event target option.

Ultraworked with [Sisyphus](https://github.com/code-yeongju/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 17:22:17 -04:00
56b8b9d320 feat(profile): add code, mark, and horizontal rule nodes to dossier editors
Register CodeNode/CodeHighlightNode, MarkNode, and HorizontalRuleNode in
the DossierExcerptEditors Lexical config so excerpts can use code blocks
with highlighting, inline marks, and divider rules.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 05:36:55 -04:00
db02be7ce9 fix(profile): handle blank dossier excerpt updates
Accept null content in updatePersonalExcerpt/updateIntelExcerpt and store
null when the submitted excerpt is empty instead of an empty Lexical state,
skipping the max-length check for blank submissions.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 05:36:54 -04:00
33174572cc docs: refresh AGENTS.md guides
Update root and per-directory AGENTS.md files to reflect the current
state of the codebase: collection inventory, RBAC registry, base
management, personnel pages, training minigames, Discord bot transfer
and evaluation-reminder flows, banking currency config, migration
wrapper, and Playwright/Vivaldi e2e details.
2026-09-06 05:32:53 -04:00
55a03e8094 feat(wiki): add editor undo/redo, template dialog, highlighting, and formatting
- useEditorHistory: undo/redo stack over the textarea body
- WikiTemplateDialog: insert {{Template}} transclusions from the
  toolbar, with per-template {{param}} placeholder prompts
- WikiEditorHighlightLayer: mirrored overlay highlighting headings,
  directives, and template placeholders over the textarea
- editorHighlight.ts: tokenizer driving the overlay
- formatMarkdown.ts + createFormatUpdate: auto-format the document
- editorFormatting.ts: Tab/Shift+Tab indent/outdent, list
  continuation on Enter, inline bold/italic/code formatting, infobox
  snippet
- WikiEditor: editor and live preview side by side, preview renders
  template CSS/HTML via WikiPreparedBody
2026-09-06 05:32:51 -04:00
51f7c803e0 feat(wiki): add scoped template CSS and developer HTML templates
WikiTemplates gains two fields: an optional css code field injected on
pages that use the template (selectors auto-scoped to a hash-based
.ptf-tpl-* class so templates never collide with each other or the app
shell), and a developer-only html field rendered verbatim (sanitized)
in place of the markdown body when transcluded.

- templateCss.ts scopes/sanitizes CSS, incl. nested at-rules; pages
  and the editor live preview inject scoped styles and drop the Card
  chrome in favor of a full-width article
- templateHtml.ts sanitizes HTML and splits prepared markdown around
  expansion sentinels so raw HTML renders without rehype-raw
- templates.ts adds extractTemplateNames/extractPlaceholders/
  extractDirectiveNames; prepareMarkdown threads an htmlTemplates map
- markdown pipeline gains rehype-highlight for fenced code blocks
- styles.css adds wiki prose typography + infobox demo styling
- docs: demo article and Infobox template authoring guide
2026-09-06 05:32:48 -04:00
60da363a93 feat(profile): add rich-text dossier excerpt editors
Convert the dossier personal excerpt from a plain textarea to Lexical
rich text (matching the intel excerpt) with a 1000-character plain-text
limit, and replace the static read-only cards on the profile page with
inline DossierExcerptEditors: owners edit their personal excerpt,
profiles:intel_excerpt:update holders edit the intelligence record.
Changes are validated server-side (lexicalPlaintextLength) and emit
dossier:personal-excerpt-update / dossier:intel-excerpt-update events.
2026-09-06 05:32:23 -04:00
c37a848d66 refactor(nav): group minigame links into Exercises submenu
Collapse the four training minigame entries (Flight Simulator,
Minefield Clearance, Radio Traffic, Qualification Course) into a
single DropdownMenuSub under the user menu.
2026-09-06 05:32:04 -04:00
fb83250ff5 fix(sidebar): ignore toggle shortcut while typing in inputs
Skip the Cmd/Ctrl+B sidebar toggle when the event originates from a
TEXTAREA, INPUT, or contentEditable element so editor shortcuts work.
2026-09-06 05:32:04 -04:00
bcd6d97ff4 refactor(market): pass currency config through negotiation panel
Renders negotiation amounts from the full CurrencyConfig, matching the other market components.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:24:21 -04:00
e3c4eada09 feat(bot): add post-mission evaluation reminder DMs
Sends one-shot DMs once a mission is evaluable asking members to rate their leadership (and leaders to rate subordinates), gated by a new evaluationRemindersSentAt marker on Missions with its migration. Adds the /remind-evaluations staff command (manual trigger/sweep) and DISCORD_EVALUATION_POLL_MS config; updates bot and root docs.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:24:17 -04:00
0f7d3a57e3 feat(personnel): add npc contacts directory and statistics pages
Adds a Personnel nav group with Contacts (searchable NPC directory with profile pages showing listings and employment) and Statistics pages; moves Wiki under Intelligence and checks off the corresponding TODO item.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:24:14 -04:00
9e44b69714 feat(base): add structure staffing and upgrade management UI
Adds hire/terminate staff actions and an upgradeStructure server action plus baseManagement components (employment card, hire dialog, staff roster, upgrade card) wired into the structure detail page.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:24:14 -04:00
06dbf5b796 feat(admin): add collapsible group field
Wraps Payload's group field in a Collapsible so long groups (e.g. profile minigames) can start collapsed in the admin panel; refreshes the import map.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:24:11 -04:00
4e9c539682 feat(base): add base tick bin for salaries, maintenance, and upkeep
Registers the base-tick bin: pays staff salaries from the treasury, charges structure maintenance, tracks upkeep shortages from storage, and notifies clients via the game-tick SSE path.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:24:11 -04:00
c33d0ceb27 feat(base): add staffing service library
Adds the lib/base service layer: hire/fire staff, set labor headcount, storage consumption helpers, and structure upgrade handling, all with event logging and permission checks.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:24:08 -04:00
b2718b3633 feat(base): add npc staffing and labor classification collections
Adds the npc-staffing and labor-classifications collections, a shared staffing field factory applied to both structure blueprints (Staffing Defaults group) and game structure instances, blueprint-derived staffing defaults on game structure create, staff-hiring toggles on Game Rules, and their database migrations.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:24:08 -04:00
854c525b07 feat(events): add staffing, upkeep, and upgrade event types
Adds staff:hired/terminated/headcount-set, staff:salary-paid/unpaid, structure:upgraded/maintenance-paid/maintenance-unpaid/upkeep-short event types and registers npc-staffing as an event target collection.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:24:02 -04:00
86464b528a refactor(market): reuse banking treasury account helper
Drops market's local treasury account lookup in favor of getTreasuryAccountId from the banking lib, re-exported for compatibility.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:23:57 -04:00
80ec3a0386 refactor(market): pass currency config through market UI
Market listings, offer dialogs, negotiation panels, and history now render prices from the full CurrencyConfig (symbol + singular/plural) instead of a nullable currency label string.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:23:57 -04:00
52ecc4f3b6 refactor(banking): pass currency config through banking UI
Banking overview, cards, detail, and activity feed now render amounts from the full CurrencyConfig (symbol + singular/plural) fetched from Game Rules instead of a plain currency label.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:23:57 -04:00
8205c33768 feat(banking): add configurable currency display names
Adds a Universal Currency group to Game Rules (name, symbol, singular, plural, denomination) with a CurrencyConfig reader in the banking lib that pluralizes labels and prefixes symbols; registers the game_rules migration.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:23:53 -04:00
f904522683 chore(cms): regenerate payload types for currency, staffing, and evaluation fields
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-06 01:23:53 -04:00
5430c02fbc fix(wiki): update placeholder text and improve clarity in wiki editor and standards dialog 2026-09-05 02:07:35 -04:00
28ced660c0 feat(wiki): add wiki navigation and styles
Extract the static sidebar nav data into sidebarData.ts and add a Wiki
entry (BookOpen) to the main nav. Adds scoped markdown styles
(columns, footnotes, note/warning callouts) under .wiki-markdown.
2026-09-05 00:02:20 -04:00
f38962c589 feat(wiki): add wiki pages
Index with search/tag/category tabs, new-page form, slug detail page with
create-CTA for missing pages, edit page redirecting to /wiki/new for
missing pages, and revision history page.
2026-09-05 00:02:18 -04:00
1dac6a0f9a feat(wiki): add wiki UI components
Frontend components for the wiki: content renderer (WikiContent),
editor with live preview and formatting toolbar (WikiEditor,
WikiEditorBody, WikiEditorToolbar, WikiLinkDialog, MarkdownGuide),
index/browse (WikiIndex, WikiStandardsDialog), page toolbar with
lock/delete/history (WikiToolbar, LockdownBanner), and revision history
(RevisionList).
2026-09-05 00:02:09 -04:00
3c6a9c8a42 feat(wiki): add wiki server actions and event logging
Server actions for page create/update, revision restore, lockdown, and
delete (moderator-gated via intelligence qualification) plus wiki image
uploads. Adds wiki event types (wiki:page-create/edit/restore/lock/
unlock/delete) and registers wiki-pages/revisions/templates as valid event
log targets.
2026-09-05 00:02:04 -04:00
3ec364a8b9 feat(wiki): add wiki service library and markdown pipeline
Service layer (createPage/updatePage/restoreRevision/setPageLockdown/
deletePage, slugification, template expansion, wikilink preprocessing,
category constants) plus the client-safe markdown rendering pipeline
(react-markdown + remark-gfm + remark-directive) shared by the server
component and the editor's live preview. Adds the three markdown
dependencies to package.json and bun.lock.
2026-09-05 00:02:01 -04:00
01b1a73158 feat(wiki): add wiki collections and database migration
Add WikiPages, WikiRevisions, and WikiTemplates collections (admin group
Wiki), register them in the Payload config, and add migration batch 28
creating the wiki_pages/_texts, wiki_revisions, and wiki_templates tables
plus the three wiki values on the game_event_logs target_collection enum.
Includes the regenerated payload-types for the new collections.
2026-09-05 00:01:58 -04:00
72715c42a4 fix(leaderboards): match active players by user id
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphus.ai>
2026-09-04 12:04:44 -04:00
dd2c868c89 fix(qualification): expose updated aim trainer leaderboard data
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphus.ai>
2026-09-04 12:04:44 -04:00
15e5fa7d01 feat(qualification): update aim trainer instructions
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphus.ai>
2026-09-04 12:04:44 -04:00
b905fe2b5e feat(qualification): handle civilian gameplay feedback
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-04 12:04:44 -04:00
6c7a9fb5e2 feat(qualification): render civilian targets
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-04 12:04:44 -04:00
dc9d2f4605 feat(qualification): validate civilian hit results
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-04 12:04:44 -04:00
7d6a4bd671 feat(qualification): add civilian target scoring rules
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-04 12:04:44 -04:00
cfa29a64ea feat(qualification): add aim trainer restart keybind 2026-09-04 01:40:46 -04:00
891e235397 fix(radio): correct helipad location phrase
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-03 23:36:22 -04:00
8e9262ca68 feat(navigation): add qualification course link
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-03 23:36:22 -04:00
d04b2d3ecb feat(qualification): add aim trainer leaderboard
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-03 23:36:22 -04:00
320fe4b36e feat(qualification): add aim trainer game interface
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-03 23:36:22 -04:00
e3e4760f49 feat(qualification): add qualification course page
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-03 23:36:22 -04:00
282e23edc2 feat(qualification): record aim trainer results
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-03 23:36:22 -04:00
a6a7a5639d feat(profiles): add aim trainer statistics schema
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-03 23:36:22 -04:00
73d689a680 feat(qualification): add aim trainer rules
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-03 23:36:22 -04:00
72ef20a044 feat(radio): expose mode-specific stats
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-03 16:03:28 -04:00
9baf84ee32 feat(radio): improve mode gameplay and leaderboards
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-03 16:03:13 -04:00