Review findings, all in code this range introduced.
Attaching a branch to a node that already had a next step replaced that
hop, and "come back where it attached" pointed the branch back at the
caller, which loops: the caller then leads into the branch it just
returned from. Everything downstream was orphaned. The branch now
continues into the step that hop used to point at, so attaching inserts
in front of it instead of deleting it. Rejoining a condition is refused
outright, because re-entering re-evaluates the same flags and retakes the
same branch. Return candidates are limited to node types that read
`next`: a choice or condition open end would have received a hop no
walker follows.
The dialog says which of the three applies, and only offers the toggle
when a return exists, so an untouched default is not sent and reported
back as a refusal.
Condition true/false dots were drawn on the input handle: the hit-area
class sets left and right on the handle itself, which over-constrains
React Flow's `right: 0`, so both dots drifted to the card's left edge.
They now take the hit area as a child, like the other handles.
Refusals are honest: `connectHop` reports `changed: false` for a write it
did not make (it used to report true and return a new array), the editor
explains instead of rewriting an identical graph, and a refused
tail-drag keeps the original hop rather than deleting it first.
A passing connection test now really is invalidated when the
configuration changes. That ran in `afterChange`, whose return value is
only the operation's response, so the stored row kept showing a stale
pass while the test asserted the response. It moved to `beforeChange`,
counts only fields actually submitted (so the Test button's own result
write does not invalidate itself), and the test reads the row back.
Also: the fragment prompt no longer teaches `isStart: true` through the
worked example or asks for "the whole conversation" on retry; requests
carry a ten minute ceiling so an unreachable-but-accepting host cannot
hang Generate, Compose or the Test button; the API key description no
longer claims at-rest encryption, which does not exist; the per-dialogue
voice override gets the same dash and length cleaning as the global it
outranks; and the unused `describeAttachmentPoint` is gone, with the
attachment output now included in the hint the model receives.
Generate could only hand back a whole graph, so using it inside a
conversation meant losing what was already there. It now offers three
placements, and the branch one is the default whenever a node is selected.
Select a node, press Generate, and the model writes the next beat as a
branch that is wired in from that node's output: a new choice button, a
condition's free branch, or the node's continuation. A "come back" toggle
points the branch's open end back at where it attached, which is what
turns a generated tangent into a side question that returns to the menu.
Empty canvas keeps the old behaviour: a whole conversation, no selector.
The splice lives in `fragmentInsert.ts`, pure and under test. It remaps
every id (a collision would silently repoint the author's hops), strips
any start flag, requires an open end so the branch can be continued, and
places the branch beside its attachment while nudging clear of individual
cards. Attaching under a choice node derives the new button's text from
the branch's first line, since a blank button fails validation; attaching
under an end node inserts the branch unwired and says why rather than
discarding it.
The prompt splits its structure contract by scope (full demands one start
node, fragment demands none and one open end) while FIELDS, STATE and
OUTPUT stay shared, so the schema contract cannot fork. PROMPT_VERSION is
bumped to npc-gen-v2.
Three defects in the flow editor, all of which made it look like drag
and drop was simply broken:
- Reconnection was a silent no-op. React Flow enables it by default, so
the drag drew a line and then threw the drop away with no handler: the
edge snapped back. Reconnects now write the hop, and a drop over a node
card (which arrives with no resolved connection) retargets, carrying
the existing choice text, tooltip, once flag and gate instead of
blanking the button.
- A refused drop said nothing. Dropping on the start node looked like the
canvas had frozen; it now explains why nothing can point there.
- Handle dots were unmissable at 100% zoom and unusable zoomed out. A
child element widens the press target, generously horizontally where
the only neighbour is empty canvas and barely vertically because choice
rows stack a few pixels apart when zoomed out.
Dropping a condition branch on the card filled true and false with the
same node, which made the condition pointless; it now takes the first
free branch.
Connection writing moved into `connectHop` in the lib so the rules are
unit-tested rather than exercised only by hand.
Three defects found by driving the real admin panel, none of which a
typecheck or a unit test would have caught:
- The API key could not be entered at all. Field-level read access denies
the value, and Payload does not render a field you cannot read, so the
input was absent while the collection said it existed. The input is now
a `ui` component that writes the hidden value through useField, which
keeps the key server-only and gives it a working control.
- The probe panel and key input used frontend/ zinc styling, which reads
as an accidental dark block on the admin panel's light theme. They now
use the admin bundle's own --theme-elevation variables.
- An unreachable host reported "fetch failed" with no cause. Node hides
the connect error inside `cause`, and that string ("connect
ECONNREFUSED 10.0.0.5:8888") is the only part an admin can act on, so
it is now included.
Also labels the acronym fields ("Base URL", "Model ID", "Has API key")
and covers the unreachable-host path in the generate-modes spec.
Every AI surface talked to the Unsloth box through env vars, so swapping
provider or model meant editing .env and restarting. A connection is now
a stored record: base URL, model id, key, structured-output mode, and a
reasoning toggle.
Three surfaces with their own selector (Compose, dialogue draft, line
rewrite), because they want different things from a model: a draft needs
strict schema adherence while a line rewrite only needs prose. Blank
means the env defaults, so an empty global behaves exactly as before.
The API key is write-only: field read access denies everyone, so it never
reaches the admin form, REST, GraphQL, or a populated relationship. Blank
submission means "unchanged" and `clearApiKey` is the only delete, which
avoids the masked-field-round-trips-empty bug. Backups still contain it;
a blank connection key falls back to UNSLOTH_API_KEY for that reason.
Structured output is no longer assumed to be json_schema. Some
OpenAI-compatible providers reject it, so a connection selects
json_schema, json_object or prompt, and the weaker modes serialise the
schema into the prompt and parse the reply. The Test button runs a plain
probe and a structured probe, because a provider that refuses json_schema
passes the first and fails every draft.
Compose keeps a single fixed dropdown entry: plugin config is built at
boot and cannot list database rows, so the handler resolves the selected
connection per request instead.
Draft provenance records the connection label, so a stored conversation
still names the provider that produced it.
The system prompt was a single constant, so tuning how drafted dialogue
sounds meant editing code and redeploying. Split it into the half that is
copy and the half that is a contract.
VOICE and optional HOUSE RULES are now editable from a new
`npc-dialogue-settings` global, and per conversation through an
`voiceOverride` field on `npc-dialogues`. Precedence is dialogue, then
global, then the built-in default, resolved by the pure `resolveVoice`.
STRUCTURE, FIELDS, STATE, OUTPUT and the worked example stay in
`LOCKED_RULES`: the draft validator enforces the same rules, so an edit
there would make every draft fail for reasons an author cannot trace.
Both surfaces render the assembled prompt through the same pure
composer the server calls, so the preview cannot drift from what the
model receives. The global normalises dashes on save, bumps `revision`
only on a real text change, and keeps 20 versions for rollback.
Provenance gains `promptSource` and `promptRevision` so a stored draft
still names the voice that shaped it. A draft that fails twice while a
custom voice is active now says so, instead of looking like a model bug.
`composeDialogueSystemPrompt()` with no arguments reproduces the old
prompt byte for byte, pinned by a golden fixture.
Planners can now drop annotation cards on the Tech Tree canvas without inventing fake technologies. Notes live in their own tech-tree-notes collection (title, body, treePosition) and carry no prerequisites, costs, approval workflow or research state, so the layout engine, edge builder and research rules never see them.
showOnFrontend defaults to false, making notes a backend authoring aid; ticking it publishes the amber card read-only to the member tech tree, which queries showOnFrontend = true.
Canvas work: amber NoteNode card with no connection handles, NoteDialog for create/edit/delete, a New Note toolbar button (technologies:create gated), viewport-centre placement, and namespaced note-<id> React Flow ids so note and technology ids can never collide. Note drags, Save positions and Auto-arrange reuse the single-statement bulk /api/tech-tree/positions write by sending collection: "tech-tree-notes"; no PATCH-per-note path was added.
Also fixes the note card body being clipped by the inherited line-height: the classification strip and footer now have fixed heights with leading-none, and the body takes the remaining flex space instead of line-clamp.
Tests: tech-tree-notes.int.spec.ts (defaults, required title, publication filter, in-place edits, note layout and id namespacing) plus note coverage in tech-tree-positions.int.spec.ts. Migration 20261123_073019_add_tech_tree_notes must be run on prod after deploy.
The admin bundle never loads src/app/(frontend)/styles.css, so the shadcn
theme variables (--background, --popover, --border-input) do not exist inside
a custom admin field. The brief dialog rendered transparent, and its portaled
Radix Select could not take pointer events, so the dropdowns were keyboard
only.
- describe every surface explicitly in zinc, as NodeEditDialog already does
- replace the four Radix Selects with native selects, which need no theme
scope and work with mouse and keyboard
- scroll the form body at 62vh instead of letting it collide with the footer
- note the rule in src/lib/npc-dialogue/AGENTS.md and correct the root
AGENTS.md shadcn sentence, which claimed the admin panel handles styling
Under 10-12 concurrent users the app queued behind itself: every SSE
game-event/profile-update made each client run router.refresh(), i.e. a
full layout + page render at ~15-25 queries, and a mission completion
emitted one XP event per attendee row. Measured against production, no
single query is slow and the DB is small, so this targets render count
and per-render query count instead of indexes.
Fewer renders per event:
- GameTickRealtime: 250ms coalescing window -> 1s, hidden tabs skip the
render and refresh once when shown again.
- Delete OperationsRealtimeRefresher (5 routes) and the duplicate
useGameTick refreshers in ProductionPanel/SlotsPanel; the global
subscriber already refreshes those routes.
- Presence heartbeats no longer broadcast (was O(N^2) per channel every
15s for a lastSeen no surface renders).
- NavCore links opt out of prefetch: the layout is force-dynamic with no
loading.tsx, so ~35 prefetched links per tab were 35 server renders.
Fewer queries per render:
- Qualification flags go through one cached, single-flight profile read
instead of one query per auth check; invalidated on profile writes.
- Dedupe DIVISION_ADMIN_QUALIFICATIONS (5 identical lookups -> 1).
- Anchor the permission cache on globalThis so route bundles share it.
- Minigame registry: real TTL cache plus invalidation on write.
- New cachedConfig TTL cache for the shims/game-rules globals, with
invalidation hooks; bank-account existence check stops hydrating.
- pg pool max 10 -> 20 (node-postgres default throttled concurrent
renders).
Hot-path per-item work:
- Contribution grant sweep: one status write per batch, one bucket write
and one name lookup per user, one existence query per source
collection instead of ~5 queries per entry.
- Notifications bell: coalesced refetch, hidden-tab skip; mark-all-read
filters by the actor instead of scanning 100 foreign unread rows.
- Polling loops (shipments, ledger, mission reminders, chip bank) pause
while the tab is hidden.
Missions gain an attendanceUnlocks tier list (admin tab plus side-op dialog),
rendered as a timeline under the attendance card: reached tiers light up in
their accent, unreached tiers stay muted with an X TO GO tag.
- shared derivation, validation and side-op parser in lib/intelligence
- thresholds sorted on save, duplicates rejected, above-max allowed
- one compact field in the Discord roll-call; attendance hash now includes
tiers, embed schema version 4
- int tests and an e2e render check at two attendance levels
Discord renders <t:epoch:D> in each viewer's timezone, so the slot's Friday
00:00 Eastern epoch read as Thursday for members west of Eastern. Render the
date as a pinned Eastern label instead.
- add fridayDateLabel(): the upcoming Friday in America/New_York
- noticeToken() now returns that label, keeping dedup stable per Friday
- legacyNoticeToken() still matches older <t:epoch:D> notices and the service
rewrites them in place, so a deploy does not duplicate or leave one behind
- only match the bot's own messages, since a plain-date token could otherwise
hit a member's message (which the bot cannot edit)
- document the timezone rule in the bot AGENTS.md
The matrix answers "what is this faction's score", not "who is tied to whom".
Add a graph view behind a Matrix/Graph switch on the same page.
The player faction sits at the center and every other faction is placed on a
ring by classification (majors innermost, then minors, corporations, specials),
so its relations read as spokes and the rest as chords. Positions are
deterministic: rings ordered by type, members by name, starting at twelve
o'clock, with faint guide rings so the structure is legible without hovering.
Relations are straight lines. A relationship runs both ways, so where both
sides have an opinion the two directions are drawn side by side on either side
of the axis, each spanning the full distance between the factions, colored and
weighted by its own score, with an arrowhead at the faction being regarded. The
two directions differ independently: a faction can be resented by one that it
regards neutrally. A pair with only one opinion keeps a single centered line.
A line that would cut through an unrelated faction steps aside just far enough
to clear it, and only for factions actually alongside the line rather than
beyond either end. Straight stays straight.
Hovering a faction isolates its web and opens a panel listing what it regards
and who regards it; clicking opens the dossier. Pan, wheel zoom and reset are
local, and the whole view is hand-drawn SVG, so no graph library was added.
The layout is pure and unit-tested: input order cannot move a node, the two
directions of a pair run parallel rather than overlapping, single-direction
pairs span the whole pair, and a blocked line dodges instead of crossing a node.
The body editor painted highlighted markdown in a div behind a transparent-text
textarea, so the painted text and the caret were two different layout engines.
Any wrap-point difference (borders, scrollbar gutters, engine rounding, trailing
newlines) shifted the overlay by whole lines once content soft-wrapped, making
clicks land on the wrong glyph and the document end feel unreachable. The CSS
patch that preceded this reduced the drift but could not remove the class of bug.
CodeMirror 6 owns text and caret together, so the failure mode is gone by
construction rather than by maintenance. The body remains a markdown string, so
prepareMarkdown, ::: directives, wikilinks, templates, revisions and the preview
pipeline are untouched, with no data migration.
- WikiMarkdownEditor: EditorView lifecycle, theme and markdown HighlightStyle
bound to the app's CSS tokens, history, line wrapping, IME-safe keymap.
- markdownCommands: one pure command table shared by toolbar buttons and keys.
- editorChange: toolbar updates dispatch only the differing span, keeping undo
granular and selections outside the edit intact.
- Removes WikiEditorHighlightLayer, editorMetrics, lib/wiki/editorHighlight,
useEditorHistory and the now-dead textarea selection reader.
- Adds e2e proof: glyph-precise clicks across wrapped paragraphs, list items,
image markdown and scrolled documents land at the exact clicked offset.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Nothing stores a pairwise score on a faction any more, so remove the array
field, its admin UI and the masking line that blanked it for undiscovered
factions. The disposal-mask doc comment now points at the ledger, which
applies the same rule by filtering entries that name an undiscovered faction.
The second migration converts every non-zero legacy value into an
opening-balance entry (custom delta, dated at the owning faction's last update
so it does not read as a fresh event, legacy note preserved) and then drops
the table. Zero rows are skipped because a stored 0 and no entries mean the
same thing.
Two integration specs that created or asserted `relationships` now use the
ledger instead.
Pairwise faction attitudes were hand-typed into a per-faction array, so the
two directions of one relationship lived in different documents and could
disagree with each other.
Add `faction-relation-entries`: one row per event that moved one faction's
attitude toward another, with the score computed on read instead of stored.
Entries are directed by default with a mutual flag for shared events; severity
tiers set the delta with a custom override; decaying entries halve per
half-life (new GameRules knob, 30 days default) while lasting shifts never
fade; voiding retires an entry with a stamped reason instead of deleting it;
hidden entries still move the score but never explain it to players.
`factionRelations.ts` holds the pure math (severity presets, decay, directed
and mutual scores, bands), and `factionRelationLedger.ts` is the single read
path so the voided, hidden and undiscovered-faction rules exist in one place.
Reads run as the caller, never with `overrideAccess`; GM notes are gated by
field read access, and hidden rows are censored by an `afterRead` hook.
Includes the permission group, the `admin:faction-relation-entries:manage`
page gate, the integration spec, and the migration that creates the table and
its enums.
RichText authored in the admin panel was rendered as plain text on the
public site: headings/lists/quotes were flattened by Tailwind preflight
(no @tailwindcss/typography installed), and Payload's default JSX
converter ignored text colours.
- src/lib/lexical: shared editor factory (ptfLexicalEditor) + shared
colour palette (textState) + colour converter (richTextConverters)
- RichTextView: canonical .lexical-content renderer (colour-aware),
swapped into every frontend render site
- All rich-text editors route through the factory, so every field
inherits the coloured editor (incl. the previously-unedited ones)
- .lexical-content CSS extended with checklist/table/heading rules,
wrapped in @layer components so per-page utilities still override;
dropped the now-dead per-page prose hacks
- Remove the now-dead briefingConverters in favour of the shared
converter; add tests/int/rich-text-view.int.spec.ts
Wiki pages gain a Draft flag pinned to their original creator. A draft is
visible only to its creator, wiki moderators and admins: the collection's
read access returns a where clause so the REST/local API filters drafts,
and every frontend query ANDs the same clause (they run with overrideAccess).
Publishing is one-way. A page whose stored draft is false is rejected (403)
when sent draft: true, both in the service and in access.update.
UI: amber DraftBanner on the detail page, a Draft chip in WikiRow, and a
Draft switch in the editor that disables once the page is published.
Factions gain a discovered checkbox plus a read-time mask so players see
the entry (UNDISCOVERED card, classified detail stub) without its name,
description, standing, relationships, campaigns or cover image.
The mask runs in the Factions afterRead hook, so every reader path is
covered: pages, REST, and populated relationships. Readers holding the new
factions:view-undiscovered permission or system:admin-access see the real
record; admin panel reads are exempt so a masked edit form can never write
the placeholder name back over a record.
Add a Generate button to the flow editor that drafts a whole conversation
from a form brief, and per-line Rewrite/Shorten/Sharpen controls in the node
dialog. Both land in unsaved field state, so a draft only reaches players when
an author saves the document: neither server action writes to npc-dialogues.
- src/lib/ai/generate.ts: extract the Unsloth client out of payload.config so
Compose and dialogue drafting share one path; add generateStructured and
resolveModel, with an optional UNSLOTH_MODEL_STRUCTURED override
- generationSchema.ts (pure): strict-safe JSON schema, normalizer with
breadth layout, validator that rejects unknown flag keys, unauthorised
effects, dangling hops and missing keys
- generation.ts: context loading, one validate-and-retry, then give up rather
than hand back a broken graph; dash normalization keeps shipped copy clean
- effect vocabulary limited to notify and flag; emit, reward and discord stay
author-only
- provenance group on npc-dialogues (migration 20261112_171955) records model,
prompt version, attempts and the brief the draft was accepted from
- tests: 21 cases covering the normalizer, validator, retry paths and the
rewrite parser, with the model call injected
- docs/npc-dialogue-ai.md and src/lib/npc-dialogue/AGENTS.md
The reminder endpoint/lib now treats a supervisor->subordinate command link as a
rateable relationship, so a completed mission prompts feedback even when the
co-attendees are at equal rank but linked by the mission chain.
Resolve each evaluation mission against the command chain so a rater can rate a
ratee at equal rank when a supervisor->subordinate command link exists. Partition
graded docs into command vs spectrum buckets and surface command-link missions on
profiles that lack a strict rank gap.
Introduce a per-mission command chain: a new MissionCommandLinks collection, a
lib/command-chain resolver, and an admin/mission-page editor for supervisor ->
subordinate links. Evaluations and mission reminders later consume this chain to
resolve equal-rank command relationships.
- peer eligibility now requires a yes-RSVP from both rater and ratee, so
absent players can neither rate nor be rated for that op
- a rating from the ratee's direct supervisor (rater leads an assignment the
ratee is a member of and ranks above them) is the command review; every
other rating feeds the anonymous leadership spectrum
- dialog copy and collection docs updated to match; tests cover both rules
Authors can no longer rate a mission they ran or planned. The rating action, the availability check and the server submit all enforce it, and the UI explains why. The mission-ratings fixtures now use a dedicated author so the rater accounts stay non-authors.
Logistics operation-extraction effects now park as pending_action instead of auto-settling. Officers visit Operations > Extractions to keep, scrap, or expel each line; only kept lines deposit into HQ. A capacity failure leaves the effect retryable (pending_action) so a full HQ can free space and re-resolve. Adds resolveLogisticsExtraction/listPendingExtractions actions + ExtractionReview UI + tests.
Eligibility now requires a strict rank gap plus a yes-RSVP from at least
one side of the pair on an evaluable mission. Junior rates senior writes
leader-direct (feeds the anonymous aggregate); senior rates junior writes
subordinate; leader-indirect stays readable for legacy rows only.
- New src/lib/evaluations/ranks.ts ladder helpers shared by all call sites
- Profile page: eligible missions union viewer+subject attendance, dialog
hidden without a rank gap, subordinate line visible to higher ranks
- Bot and in-app reminder planners pair co-attendees by rank, not squads
- isDirectLeaderOf/isAnyLeader removed; no schema change or migration
Four prediction generations shipped and production still disagreed with the
server: v0.12.16's ack-sized envelope, wall-clock catch-up with a 1s cap,
ghost parity in both sims, and a forward-only replay clock. The last playtest
(n=645, rtt 41-69ms) still read gapP50 1.26, gapP95 7.05, 30% of snapshots
easing, with frameMax 17ms and zero server-side jumps. A second simulation
cannot be kept in agreement with the server by tuning.
Remove the second simulation instead:
- own seat renders the server's snapshot position through the same one-pole
ease as remote players (shorter constant, 0.6 vs 0.4 per frame, because
easing reads as input lag), snapping only past 1.5 cells (respawn/reset)
- drop the pending ledger, ack drain, input-to-ack EMA, envelope, trim and
ease correction, optimistic kick overlay, and the local movement copy
- drop ghosts stay as visual feedback, placed at the server's own copy of our
cell so they align with where the charge will appear
- telemetry now reports the ease's own-seat trail, own/remote snaps, snapshot
cadence, frame max, ghost rows and RTT
- delete bomperator/prediction.ts, its offline harness and the prod-RTT
fixture: they covered a mechanism that no longer exists
Input stays level-triggered on the monotonic seq + 400ms keepalive path. Cost
is one tick of queue (~25ms) plus one-way latency, the explicit trade for a
render that cannot diverge from the server.
tsc clean; bomperator-registry 19/19.
Root cause of the remaining jitter, and why stride tuning never touched it.
projectServerPosition replayed every unacknowledged input, then moved its
replay clock back to that input's receive time even when it predated the
snapshot. The trailing segment (targetMs - t) then included the input's
whole age, so a keepalive still in flight inflated the estimate by up to
the 400ms re-assert cadence: a phantom lead of 1-4 cells that the reconcile
then chased toward a position the server never occupied.
Prod telemetry fits exactly: gap p50 1.0, p95 4.12, max 4.5, 22% of
snapshots easing, frameMax 38ms, remoteSnaps 0, 13 ghost rows. No hitches,
no server-side jumps, just an estimator biased by pending input age. The
bias scale with ack latency, which is why the first match looked clean
(p50 0.18) and a match with RTT spikes to 53ms did not.
- clamp the replay clock: an input whose receive time is at or before `t`
contributes its direction only, never a rewind
- the component now calls the shared projectServerPosition instead of
keeping an inline copy of the same replay (one implementation, one fix)
- unit tests pin both behaviors (stale input adds no travel, newer input
still advances); harness 12 scenarios plus the two new tests green
Prod telemetry (3291 snapshots, one match): gap p50 0.18 but p95 1.22,
max 4.19 cells and 43 eases. A 4-cell gap is ~0.6s of running, so these
are events, not latency noise. Tuning the correction envelope could only
change how they were presented.
- advance prediction by real elapsed time (1s sanity cap) instead of a
100ms slice: the engine runs on wall clock, so every main-thread hitch
over 100ms left a permanent gap that had to be eased back. The ease
branch keeps its own 100ms slice so a catch-up frame cannot discharge
a whole gap at once
- release held keys when the tab hides: input is level-triggered, so a
backgrounded tab kept the technician running server-side and then
snapped back on return
- replay optimistic ghost charges in the server estimate too; pred saw a
charge the estimate did not, so every unconfirmed placement read as
divergence while it was in flight
- telemetry: per-row longest frame and ghost count, frameMax/ghostRows in
stats, so the next playtest attributes any remaining gap directly
- harness mirror: same 1s catch-up and 100ms ease slice; 12 scenarios green
completeInteriorJob restores broken fixtures on repair jobs. New decay.ts applies per-room condition loss (elapsed days x conditionPerDay x Game Rules multiplier) on the interior-tick bin, gated by interior.decayEnabled with a baseline first run that only stamps the structure clock; fixtures at or below the authored effectFloor break with new interior:fixture-broken events, floors condition at 0, and station starts fail room_damaged below the floor.
Declares blocksStation on structure-rooms fixture state: provisioning wrote it but the missing column silently stripped it, so broken doorway fixtures could never block stations. Regression test covers persistence through provisioning plus the end-to-end gate.
Produce starts now honor presence-based unlocks_recipe/unlocks_station effects (station marker is its authored name) and reject unknown or gated recipes with recipe_locked, locked stations with station_locked. Asset outputs credit game-structures.storedAssets behind a new Game Rules interior.assetOutputsEnabled switch (default off), prechecked before any deposit so a disabled switch parks the job untouched; storageBridge.depositAssetsToStructure merges quantities by asset without duplicate rows.
Complete-time level advance (clamped to maxLevel), open/upgrade tech and labor gates sourced from npc-staffing and technologies.researchedAt, and pure duration/output math in effects.ts applied to job durations and produce resource output.
Adds interior_job_speed and interior_output_bonus module effect types to the shared module system (additive aggregates; existing consumers unaffected) with a migration, which also closes Step 1 drift making structures_rooms_levels_effects.value nullable and adding its target column.
Open jobs consume the entry level's materials and duration, then flip the room to its destination level at completion. Cleanup runs fixed-time, decrement one junk level per run, and roll one weighted drop from the authored junk loot table onto the job for collection.
Fixes provisionInterior's inverted guard so rooms provision lazily on first entry instead of requiring an already-set provisionedAt, and adds the interior integration suite covering provisioning idempotency, access modes, start gates, cancel refund, collect refusal on full storage, sweep completion, notifications, and loot roll determinism.
Adds the interior authoring fields on structure blueprints, runtime interior snapshot fields on game structures, the structure-rooms and interior-jobs collections, GameRules toggles, and a Scrap resource seed.
Adds the src/lib/interior engine: access gate, room provisioning, job-start gates, structure storage bridge, job lifecycle (start, cancel, complete, collect), completion sweep, and the interior-tick bin.
Registers interior event types and the interior:job-ready notification type.
Add a briefing export dialog with a diary script and a structured text array. Convert Lexical formatting, including bold, code, underline, colors, headings, lists, and quotes, into Arma Structured Text. Scope the shared color palette to the briefing editors and render colors on the mission page.