Commit Graph

31 Commits

Author SHA1 Message Date
anadoris007 a7bc6ef148
Merge 484689735f into b5b53acc57 2026-08-09 03:06:10 -04:00
666ghj f0d487f310 fix: harden ontology JSON generation 2026-07-23 02:08:17 +08:00
666ghj 407c391f35 fix: keep Zep timeouts internal 2026-07-23 00:32:53 +08:00
666ghj 54bd7a3d4e fix: validate complete Zep entity context 2026-07-23 00:20:50 +08:00
666ghj e4aa38dff2 fix: modernize Zep Cloud integration 2026-07-23 00:20:28 +08:00
666ghj 0d8c23a3c2 fix: use the supported Zep node-edge method 2026-07-22 20:08:18 +08:00
666ghj d2f9e56eea fix: enforce Zep ontology contract limits 2026-07-22 19:53:59 +08:00
666ghj 9506e6f5e0 fix: normalize ontology attributes centrally 2026-07-22 19:51:41 +08:00
666ghj 9f80ad66fd fix: normalize profile fields at construction 2026-07-22 19:49:33 +08:00
666ghj e67a52e80f fix: keep GPT-5 compatibility handling narrow 2026-07-22 19:48:32 +08:00
666ghj 05bea4a330 fix: stop Step2 polling after preparation failure 2026-07-22 19:47:20 +08:00
666ghj f0e379471a fix: sanitize fabricated tool results everywhere 2026-07-22 19:46:23 +08:00
666ghj b651883d66 fix: load Twitter profiles from CSV 2026-07-22 19:45:30 +08:00
666ghj 7d6f6bb135 fix: preserve edge paging call compatibility 2026-07-22 19:42:00 +08:00
Sami Rusani f0e936ae43 fix: sample long text for ontology generation 2026-04-26 23:01:02 +02:00
anadoris007 484689735f feat(narrative): add GodModeView, WorldBuilderView, cinematic locations
- New Vue views: GodModeView (inject event, modify emotions with
  preloaded current values, kill character with typed-name
  confirmation) and WorldBuilderView (rules editor, locations with
  cinematic atmosphere field, event log viewer)
- Shared sim-nav strip across Story/GodMode/World views
- Location schema extended with optional atmosphere field — a short
  mood phrase that anchors the opening visual of every scene set there
- Translator's _format_world_locations surfaces atmosphere to the LLM
  prompt so the field actually influences generation
- Routes added for /godmode/:simId and /world/:simId

Tests: 39/39 passing (added test_location_atmosphere_surfaces_in_prompt).
Frontend builds clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 15:01:08 +05:30
anadoris007 aabe9b42a2 test(narrative): fix dead-filter e2e test — need living actor in round 2
When Marcus (the only round-2 actor) was killed, generate_prose
short-circuited on empty actions without calling the LLM, so
mock_llm.call_args_list only had one entry. Added Elena as a
second round-2 actor to exercise the filter with a live participant.
2026-04-22 14:55:28 +05:30
anadoris007 c223d77267 test(narrative): add e2e tests for event injection and kill 2026-04-22 14:55:03 +05:30
anadoris007 d3bec344c7 feat(narrative): extend translator with world context + dead filter
- PROSE_PROMPT_TEMPLATE extended with world_rules, world_events,
  world_locations, and event_enforcement substitution fields
- EVENT_ENFORCEMENT_STRENGTH set to "hard" — opening line MUST
  reference the most recent world event (aligns with existing
  punchy, cinematic voice)
- Character summaries now resolve location id → name for prompts
- translate_round loads world_state and filters dead characters
  from both the roster and the action list before prose generation
- User-supplied strings (rules, events, locations) brace-escaped
  before str.format() to prevent KeyError on stray { or }

Tests: 36/36 passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 14:54:22 +05:30
anadoris007 a569976d55 feat(narrative): add god_mode.kill_character with auto-death event 2026-04-20 22:25:24 +05:30
anadoris007 f25f68837c feat(narrative): add god_mode.modify_emotion with audit logging 2026-04-20 22:24:54 +05:30
anadoris007 f91dd00f37 feat(narrative): add god_mode.inject_event handler 2026-04-20 22:24:28 +05:30
anadoris007 16b7ef7521 feat(narrative): set status=alive on new characters 2026-04-20 22:23:59 +05:30
anadoris007 1a73b7f672 feat(narrative): add WorldStateStore for rules, locations, event log 2026-04-20 22:23:38 +05:30
anadoris007 d651cb830b test(narrative): add end-to-end pipeline test
Full-pipeline test: fake simulation dir → actions.jsonl → two
translate_round calls → assertions on beat persistence, character
evolution, and translator offset advancement.

Final test suite: 20/20 passing across action mapper, character
engine, story store, translator (read + prose + orchestration), and
E2E.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 22:05:08 +05:30
anadoris007 caec8b5c77 feat(narrative): orchestrate round translation with state updates
translate_round() ties together:
  - reading the round's actions from actions.jsonl
  - generating prose via the LLM
  - updating per-character emotional state
  - persisting the beat, characters, and file offset

Full test suite now at 19/19 passing across action mapper, character
engine, story store, and translator.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 22:01:19 +05:30
anadoris007 9db7b399cc feat(narrative): add LLM-driven prose generation
Module-level call_llm() wrapper (patchable by tests) drives
PROSE_PROMPT_TEMPLATE rendering with character summaries, actions,
previous beats, and user-selected tone. Prompt tuned for punchy,
cinematic, dialogue-heavy voice.

Tests: 5/5 passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 22:00:29 +05:30
anadoris007 052fd87acd feat(narrative): add actions.jsonl round reader
Reads one round's worth of agent actions from the OASIS log file,
tracking file offset so callers can resume across translation calls.
Handles missing files, malformed JSON lines, and non-target rounds
gracefully.

Tests: 3/3 passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 21:29:15 +05:30
anadoris007 6b9e6eeeb2 feat(narrative): add CharacterEngine with emotional state tracking
Character profiles now track a six-dimension emotional state (anger,
fear, joy, sadness, trust, surprise) that evolves based on actions
taken. Initial deltas for all 13 OASIS actions chosen as a balanced
baseline (see module docstring for tuning guidance).

Tests: 5/5 passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 21:28:30 +05:30
anadoris007 05aa9f149e feat(narrative): add StoryStore for file-based narrative persistence
Three JSON files per simulation under narrative/ subdir:
- story_beats.json: chronological story passages
- translator_state.json: per-platform file offsets
- characters.json: extended character profiles

Tests: 4/4 passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 20:50:55 +05:30
anadoris007 2d782f04c1 feat(narrative): add action-to-verb mapping for OASIS actions
New narrative package with action_mapper module that maps the 13 OASIS
action types (CREATE_POST, LIKE_POST, REPOST, etc.) to narrative verbs
and interpretations used when generating story prose.

Tests: 4/4 passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 20:50:05 +05:30