1
0
Fork 0
polaris-task-force/src/collections
Z8MB1E 4264431e4d feat(npc-dialogue): AI-assisted conversation drafting behind the review gate
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
2026-11-12 12:26:35 -05:00
..
banking feat(rbac): migrate collection access controls to RBAC permissions 2026-08-19 19:47:51 -04:00
discord feat(bot): add editable Discord Rich Presence via command and CMS 2026-10-12 10:21:37 -04:00
game feat(npc-dialogue): AI-assisted conversation drafting behind the review gate 2026-11-12 12:26:35 -05:00
intelligence feat(missions): add command chain editor and MissionCommandLinks collection 2026-11-02 09:59:55 -05:00
interior feat(interior): fixture repairs, condition decay, and station blocking 2026-10-20 16:17:01 -04:00
locker chore(locker): commit pending stock handling refinements 2026-10-25 21:23:40 -04:00
logistics feat(vehicles): add per-vehicle disallowed-cargo blacklist enforced at shipment 2026-10-26 22:17:21 -04:00
market style(collections): replace dashes in admin field descriptions 2026-09-07 05:19:50 -04:00
minigames feat(minigames): add phasing-out status with estimated removal date 2026-10-14 23:51:37 -04:00
operations feat(operations): gate logistics extractions behind an officer review screen 2026-10-26 22:20:14 -04:00
projects feat(projects): enforce permissions and improve search 2026-08-21 00:26:33 -04:00
server fix(modlists): allow anonymous link download of preset files 2026-10-31 15:01:29 -04:00
story feat(journals): member-authored journal entries with author-owned publishing 2026-10-12 14:39:48 -04:00
tickets feat(tickets): allow staff to archive tickets, hiding them from the front-end 2026-10-07 01:22:51 -04:00
users fix(evaluations): require attendance from both players and route direct-supervisor reviews 2026-11-01 15:51:45 -05:00
voiceover fix(uploads): store upload collections under the persistent media volume 2026-10-08 12:14:46 -04:00
wiki feat(wiki): add page curation for featured strip 2026-10-09 17:56:02 -04:00
world feat(map-objectives): superuser-authored strategic objectives on mission maps 2026-10-27 02:12:31 -04:00
AGENTS.md fix(modlists): allow anonymous link download of preset files 2026-10-31 15:01:29 -04:00
Announcements.ts feat(announcements): add announcements system with roleDocs targeting and richText 2026-09-22 21:08:46 -04:00
Media.ts feat: application staging deployment (ensure better commits after this) 2025-12-15 01:14:30 -05:00
Shims.ts style(collections): replace dashes in admin field descriptions 2026-09-07 05:19:50 -04:00