Puppets master to dev - #13
Merged
Merged
Conversation
Add the first NPC Puppet Master gameplay slice with scene log persistence, SAY speech handling, NPC runtime objectives, PM DSL execution, move scheduling, and debug peek support. Include the supporting content and fixtures for the test room, NPC text assets, system prompt, sprite assets, and targeted tests covering parser, scene log, and NPC planning behavior.
Schedule a single plan_continued PM trigger after move_completed responses that update NPC memory or objectives without scheduling WAIT or MOVE_TO. Clarify the PM prompt so OBJECTIVES_SET and MEMORY_SET are treated as internal state updates, not physical actions, and add regression coverage for the remote-to-TV stall.
Add TAKE to the NPC Puppet Master DSL and execute it through ActorPlanExecutor. NPCs can now take reachable Item entities into their own inventory via the existing InventoryManager, receive an action_completed trigger, and continue planning from the action result. Update the PM prompt and add regression coverage for taking the TV remote into NPC inventory.
Add an actor-aware command executor for authored parser command plans so Puppet Master output can execute command ids without routing NPC actions through the text parser or LLM cascade. Expose compact per-object command affordances in NPC world context, extend the PM DSL with COMMAND and USE fallback steps, and keep player USE wired through the shared fallback while preserving existing no-effect behavior. Cover NPC command affordances, successful turn_tv_on state changes, prerequisite failures relative to the NPC actor, and parser USE regression.
real PM PUT so NPCs can place/drop items with the same semantic capabilities as player PUT.
Use explicit PM DSL shape: { "type": "PUT", "itemId": "tv_rc", "targetId": "Desk", "relation": "on" }.
Support actor parity in v1: held NPC items, reachable scene items, target/null drop, and relations on | in | under | behind | null.
Key Changes
Extend PM DSL and prompt:
Add PUT to NpcPlanStep, PM normalization, accepted reliable actions, and public/text/system/npc-pm-system.md.
targetId: null means drop/place on the current reachable floor/auto-drop surface.
relation defaults to null; for object placement PM should prefer explicit on, in, under, or behind.
Add an actor-aware path such as putEntityForActor(actor, entity, target, { relation }), or an equivalent putEntity(..., { relation, actor }) overload.
Existing player putEntity(entity, target, { relation }) remains behavior-compatible and defaults to scene.player.
Source availability checks use the acting Actor’s inventory and reachability, not game.inventory.
Target/storage accessibility and distance checks use the acting Actor, not always scene.player.
Auto-drop/floor placement uses the acting Actor’s current point when dropping to a Walkbox.
PM execution:
ActorPlanExecutor resolves itemId and optional targetId to scene objects.
Reject invalid cases with controlled action_completed outcomes: put_item_not_found, put_target_not_found, put_target_is_source, put_item_unavailable, or existing semantic put_* codes.
On success, schedule action_completed with code from semantic PUT and include itemId, targetId, and message.
Preserve existing player behavior:
Parser PUT, DROP, group PUT, relation-aware PUT, and LLM putTarget continue to call the same semantic path with default player actor.
Player inventory UI remains tied to player inventory only; NPC inventory updates should notify generic inventory storage changes but not open/alter player preview.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.