@sharpee/stdlib 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -66
- package/actions/author/index.d.ts.map +1 -1
- package/actions/author/trace.d.ts +1 -1
- package/actions/author/trace.d.ts.map +1 -1
- package/actions/base/index.d.ts.map +1 -1
- package/actions/base/migration-shim.d.ts +1 -1
- package/actions/base/migration-shim.d.ts.map +1 -1
- package/actions/base/report-helpers.d.ts +1 -1
- package/actions/base/report-helpers.d.ts.map +1 -1
- package/actions/base/snapshot-utils.d.ts +1 -1
- package/actions/base/snapshot-utils.d.ts.map +1 -1
- package/actions/base/snapshot-utils.js +1 -1
- package/actions/capability-dispatch.d.ts.map +1 -1
- package/actions/capability-dispatch.js +1 -1
- package/actions/constants.d.ts.map +1 -1
- package/actions/context-adapter.d.ts +3 -3
- package/actions/context-adapter.d.ts.map +1 -1
- package/actions/data-builder-types.d.ts +1 -1
- package/actions/data-builder-types.d.ts.map +1 -1
- package/actions/enhanced-context.d.ts +1 -1
- package/actions/enhanced-context.d.ts.map +1 -1
- package/actions/enhanced-context.js +2 -2
- package/actions/enhanced-types.d.ts +3 -3
- package/actions/enhanced-types.d.ts.map +1 -1
- package/actions/helpers/emit-illustrations.d.ts +2 -2
- package/actions/helpers/emit-illustrations.d.ts.map +1 -1
- package/actions/index.d.ts +1 -1
- package/actions/index.d.ts.map +1 -1
- package/actions/index.js +1 -1
- package/actions/meta-action.d.ts +1 -1
- package/actions/meta-action.d.ts.map +1 -1
- package/actions/meta-registry.d.ts.map +1 -1
- package/actions/registry.d.ts +1 -1
- package/actions/registry.d.ts.map +1 -1
- package/actions/standard/about/about-events.d.ts.map +1 -1
- package/actions/standard/about/about.d.ts.map +1 -1
- package/actions/standard/about/about.js +1 -1
- package/actions/standard/about/index.d.ts.map +1 -1
- package/actions/standard/again/again-events.d.ts.map +1 -1
- package/actions/standard/again/again.d.ts.map +1 -1
- package/actions/standard/again/again.js +1 -1
- package/actions/standard/again/index.d.ts.map +1 -1
- package/actions/standard/attacking/attacking-data.d.ts.map +1 -1
- package/actions/standard/attacking/attacking-events.d.ts +1 -1
- package/actions/standard/attacking/attacking-events.d.ts.map +1 -1
- package/actions/standard/attacking/attacking-types.d.ts +1 -1
- package/actions/standard/attacking/attacking-types.d.ts.map +1 -1
- package/actions/standard/attacking/attacking.d.ts.map +1 -1
- package/actions/standard/attacking/attacking.js +1 -1
- package/actions/standard/attacking/index.d.ts.map +1 -1
- package/actions/standard/climbing/climbing-events.d.ts +1 -1
- package/actions/standard/climbing/climbing-events.d.ts.map +1 -1
- package/actions/standard/climbing/climbing.d.ts.map +1 -1
- package/actions/standard/climbing/climbing.js +1 -1
- package/actions/standard/climbing/index.d.ts.map +1 -1
- package/actions/standard/closing/closing-data.d.ts.map +1 -1
- package/actions/standard/closing/closing-error-prevents-closing.d.ts.map +1 -1
- package/actions/standard/closing/closing-event-data.d.ts +1 -1
- package/actions/standard/closing/closing-event-data.d.ts.map +1 -1
- package/actions/standard/closing/closing-messages.d.ts.map +1 -1
- package/actions/standard/closing/closing.d.ts.map +1 -1
- package/actions/standard/closing/closing.js +1 -1
- package/actions/standard/closing/index.d.ts.map +1 -1
- package/actions/standard/drinking/drinking-events.d.ts +1 -1
- package/actions/standard/drinking/drinking-events.d.ts.map +1 -1
- package/actions/standard/drinking/drinking.d.ts.map +1 -1
- package/actions/standard/drinking/drinking.js +1 -1
- package/actions/standard/drinking/index.d.ts.map +1 -1
- package/actions/standard/dropping/dropping-data.d.ts.map +1 -1
- package/actions/standard/dropping/dropping-data.js +1 -1
- package/actions/standard/dropping/dropping-events.d.ts +1 -1
- package/actions/standard/dropping/dropping-events.d.ts.map +1 -1
- package/actions/standard/dropping/dropping-messages.d.ts.map +1 -1
- package/actions/standard/dropping/dropping-types.d.ts +2 -2
- package/actions/standard/dropping/dropping-types.d.ts.map +1 -1
- package/actions/standard/dropping/dropping.d.ts.map +1 -1
- package/actions/standard/dropping/dropping.js +1 -1
- package/actions/standard/dropping/index.d.ts.map +1 -1
- package/actions/standard/eating/eating-events.d.ts +1 -1
- package/actions/standard/eating/eating-events.d.ts.map +1 -1
- package/actions/standard/eating/eating.d.ts.map +1 -1
- package/actions/standard/eating/eating.js +1 -1
- package/actions/standard/eating/index.d.ts.map +1 -1
- package/actions/standard/entering/entering-events.d.ts +1 -1
- package/actions/standard/entering/entering-events.d.ts.map +1 -1
- package/actions/standard/entering/entering-messages.d.ts.map +1 -1
- package/actions/standard/entering/entering.d.ts.map +1 -1
- package/actions/standard/entering/entering.js +1 -1
- package/actions/standard/entering/index.d.ts.map +1 -1
- package/actions/standard/examining/examining-data.d.ts +1 -1
- package/actions/standard/examining/examining-data.d.ts.map +1 -1
- package/actions/standard/examining/examining-data.js +2 -2
- package/actions/standard/examining/examining-events.d.ts +1 -1
- package/actions/standard/examining/examining-events.d.ts.map +1 -1
- package/actions/standard/examining/examining-messages.d.ts.map +1 -1
- package/actions/standard/examining/examining.d.ts.map +1 -1
- package/actions/standard/examining/index.d.ts.map +1 -1
- package/actions/standard/exiting/exiting-events.d.ts +1 -1
- package/actions/standard/exiting/exiting-events.d.ts.map +1 -1
- package/actions/standard/exiting/exiting-messages.d.ts.map +1 -1
- package/actions/standard/exiting/exiting.d.ts.map +1 -1
- package/actions/standard/exiting/exiting.js +1 -1
- package/actions/standard/exiting/index.d.ts.map +1 -1
- package/actions/standard/giving/giving-events.d.ts.map +1 -1
- package/actions/standard/giving/giving.d.ts.map +1 -1
- package/actions/standard/giving/giving.js +1 -1
- package/actions/standard/giving/index.d.ts.map +1 -1
- package/actions/standard/going/going-data.d.ts.map +1 -1
- package/actions/standard/going/going-data.js +1 -1
- package/actions/standard/going/going-events.d.ts +1 -1
- package/actions/standard/going/going-events.d.ts.map +1 -1
- package/actions/standard/going/going-messages.d.ts.map +1 -1
- package/actions/standard/going/going.d.ts +1 -1
- package/actions/standard/going/going.d.ts.map +1 -1
- package/actions/standard/going/going.js +1 -1
- package/actions/standard/going/index.d.ts.map +1 -1
- package/actions/standard/help/help-events.d.ts.map +1 -1
- package/actions/standard/help/help.d.ts.map +1 -1
- package/actions/standard/help/index.d.ts.map +1 -1
- package/actions/standard/hiding/concealment-break.d.ts +1 -1
- package/actions/standard/hiding/concealment-break.d.ts.map +1 -1
- package/actions/standard/hiding/concealment-break.js +1 -1
- package/actions/standard/hiding/hiding-events.d.ts +2 -2
- package/actions/standard/hiding/hiding-events.d.ts.map +1 -1
- package/actions/standard/hiding/hiding.d.ts.map +1 -1
- package/actions/standard/hiding/hiding.js +1 -1
- package/actions/standard/hiding/index.d.ts.map +1 -1
- package/actions/standard/hiding/revealing.d.ts.map +1 -1
- package/actions/standard/hiding/revealing.js +1 -1
- package/actions/standard/index.d.ts.map +1 -1
- package/actions/standard/inserting/index.d.ts.map +1 -1
- package/actions/standard/inserting/inserting-data.d.ts.map +1 -1
- package/actions/standard/inserting/inserting-events.d.ts.map +1 -1
- package/actions/standard/inserting/inserting-messages.d.ts.map +1 -1
- package/actions/standard/inserting/inserting.d.ts.map +1 -1
- package/actions/standard/inventory/index.d.ts.map +1 -1
- package/actions/standard/inventory/inventory-events.d.ts.map +1 -1
- package/actions/standard/inventory/inventory-messages.d.ts.map +1 -1
- package/actions/standard/inventory/inventory.d.ts.map +1 -1
- package/actions/standard/inventory/inventory.js +1 -1
- package/actions/standard/listening/index.d.ts.map +1 -1
- package/actions/standard/listening/listening-events.d.ts +1 -1
- package/actions/standard/listening/listening-events.d.ts.map +1 -1
- package/actions/standard/listening/listening.d.ts.map +1 -1
- package/actions/standard/listening/listening.js +1 -1
- package/actions/standard/lock-shared.d.ts +2 -2
- package/actions/standard/lock-shared.d.ts.map +1 -1
- package/actions/standard/lock-shared.js +1 -1
- package/actions/standard/locking/index.d.ts.map +1 -1
- package/actions/standard/locking/locking-events.d.ts +1 -1
- package/actions/standard/locking/locking-events.d.ts.map +1 -1
- package/actions/standard/locking/locking-messages.d.ts.map +1 -1
- package/actions/standard/locking/locking.d.ts.map +1 -1
- package/actions/standard/locking/locking.js +1 -1
- package/actions/standard/looking/index.d.ts.map +1 -1
- package/actions/standard/looking/looking-data.d.ts.map +1 -1
- package/actions/standard/looking/looking-data.js +2 -2
- package/actions/standard/looking/looking-events.d.ts.map +1 -1
- package/actions/standard/looking/looking-messages.d.ts.map +1 -1
- package/actions/standard/looking/looking.d.ts.map +1 -1
- package/actions/standard/looking/looking.js +1 -1
- package/actions/standard/lowering/index.d.ts.map +1 -1
- package/actions/standard/lowering/lowering.d.ts.map +1 -1
- package/actions/standard/opening/index.d.ts.map +1 -1
- package/actions/standard/opening/opening-data.d.ts.map +1 -1
- package/actions/standard/opening/opening-events.d.ts +1 -1
- package/actions/standard/opening/opening-events.d.ts.map +1 -1
- package/actions/standard/opening/opening-messages.d.ts.map +1 -1
- package/actions/standard/opening/opening-types.d.ts +1 -1
- package/actions/standard/opening/opening-types.d.ts.map +1 -1
- package/actions/standard/opening/opening.d.ts.map +1 -1
- package/actions/standard/opening/opening.js +1 -1
- package/actions/standard/pulling/index.d.ts.map +1 -1
- package/actions/standard/pulling/pulling-events.d.ts +1 -1
- package/actions/standard/pulling/pulling-events.d.ts.map +1 -1
- package/actions/standard/pulling/pulling.d.ts.map +1 -1
- package/actions/standard/pulling/pulling.js +1 -1
- package/actions/standard/pushing/index.d.ts.map +1 -1
- package/actions/standard/pushing/pushing-events.d.ts +1 -1
- package/actions/standard/pushing/pushing-events.d.ts.map +1 -1
- package/actions/standard/pushing/pushing-original.d.ts.map +1 -1
- package/actions/standard/pushing/pushing-original.js +1 -1
- package/actions/standard/pushing/pushing-types.d.ts +1 -1
- package/actions/standard/pushing/pushing-types.d.ts.map +1 -1
- package/actions/standard/pushing/pushing.d.ts.map +1 -1
- package/actions/standard/pushing/pushing.js +1 -1
- package/actions/standard/putting/index.d.ts.map +1 -1
- package/actions/standard/putting/putting-data.d.ts.map +1 -1
- package/actions/standard/putting/putting-events.d.ts.map +1 -1
- package/actions/standard/putting/putting-messages.d.ts.map +1 -1
- package/actions/standard/putting/putting-types.d.ts +1 -1
- package/actions/standard/putting/putting-types.d.ts.map +1 -1
- package/actions/standard/putting/putting.d.ts.map +1 -1
- package/actions/standard/putting/putting.js +1 -1
- package/actions/standard/quitting/index.d.ts.map +1 -1
- package/actions/standard/quitting/quitting-events.d.ts.map +1 -1
- package/actions/standard/quitting/quitting.d.ts.map +1 -1
- package/actions/standard/quitting/quitting.js +1 -1
- package/actions/standard/raising/index.d.ts.map +1 -1
- package/actions/standard/raising/raising.d.ts.map +1 -1
- package/actions/standard/reading/index.d.ts.map +1 -1
- package/actions/standard/reading/reading-events.d.ts +1 -1
- package/actions/standard/reading/reading-events.d.ts.map +1 -1
- package/actions/standard/reading/reading.d.ts.map +1 -1
- package/actions/standard/reading/reading.js +1 -1
- package/actions/standard/removing/index.d.ts.map +1 -1
- package/actions/standard/removing/removing-data.d.ts.map +1 -1
- package/actions/standard/removing/removing-events.d.ts.map +1 -1
- package/actions/standard/removing/removing-messages.d.ts.map +1 -1
- package/actions/standard/removing/removing-types.d.ts +1 -1
- package/actions/standard/removing/removing-types.d.ts.map +1 -1
- package/actions/standard/removing/removing.d.ts.map +1 -1
- package/actions/standard/removing/removing.js +1 -1
- package/actions/standard/restarting/index.d.ts.map +1 -1
- package/actions/standard/restarting/restarting-events.d.ts.map +1 -1
- package/actions/standard/restarting/restarting.d.ts.map +1 -1
- package/actions/standard/restarting/restarting.js +1 -1
- package/actions/standard/restoring/index.d.ts.map +1 -1
- package/actions/standard/restoring/restoring-events.d.ts.map +1 -1
- package/actions/standard/restoring/restoring.d.ts.map +1 -1
- package/actions/standard/restoring/restoring.js +1 -1
- package/actions/standard/saving/index.d.ts.map +1 -1
- package/actions/standard/saving/saving-events.d.ts.map +1 -1
- package/actions/standard/saving/saving.d.ts.map +1 -1
- package/actions/standard/saving/saving.js +1 -1
- package/actions/standard/scoring/index.d.ts.map +1 -1
- package/actions/standard/scoring/scoring-events.d.ts.map +1 -1
- package/actions/standard/scoring/scoring.d.ts.map +1 -1
- package/actions/standard/scoring/scoring.js +1 -1
- package/actions/standard/searching/index.d.ts.map +1 -1
- package/actions/standard/searching/searching-events.d.ts +1 -1
- package/actions/standard/searching/searching-events.d.ts.map +1 -1
- package/actions/standard/searching/searching.d.ts.map +1 -1
- package/actions/standard/searching/searching.js +1 -1
- package/actions/standard/searching-helpers.d.ts +1 -1
- package/actions/standard/searching-helpers.d.ts.map +1 -1
- package/actions/standard/searching-helpers.js +1 -1
- package/actions/standard/showing/index.d.ts.map +1 -1
- package/actions/standard/showing/showing-events.d.ts.map +1 -1
- package/actions/standard/showing/showing.d.ts.map +1 -1
- package/actions/standard/showing/showing.js +1 -1
- package/actions/standard/sleeping/index.d.ts.map +1 -1
- package/actions/standard/sleeping/sleeping-events.d.ts +1 -1
- package/actions/standard/sleeping/sleeping-events.d.ts.map +1 -1
- package/actions/standard/sleeping/sleeping.d.ts.map +1 -1
- package/actions/standard/smelling/index.d.ts.map +1 -1
- package/actions/standard/smelling/smelling-events.d.ts +1 -1
- package/actions/standard/smelling/smelling-events.d.ts.map +1 -1
- package/actions/standard/smelling/smelling.d.ts.map +1 -1
- package/actions/standard/smelling/smelling.js +1 -1
- package/actions/standard/switching-shared.d.ts +1 -1
- package/actions/standard/switching-shared.d.ts.map +1 -1
- package/actions/standard/switching-shared.js +1 -1
- package/actions/standard/switching_off/index.d.ts.map +1 -1
- package/actions/standard/switching_off/switching_off-events.d.ts +1 -1
- package/actions/standard/switching_off/switching_off-events.d.ts.map +1 -1
- package/actions/standard/switching_off/switching_off-messages.d.ts.map +1 -1
- package/actions/standard/switching_off/switching_off.d.ts.map +1 -1
- package/actions/standard/switching_off/switching_off.js +1 -1
- package/actions/standard/switching_on/index.d.ts.map +1 -1
- package/actions/standard/switching_on/switching_on-events.d.ts +1 -1
- package/actions/standard/switching_on/switching_on-events.d.ts.map +1 -1
- package/actions/standard/switching_on/switching_on-messages.d.ts.map +1 -1
- package/actions/standard/switching_on/switching_on.d.ts.map +1 -1
- package/actions/standard/switching_on/switching_on.js +1 -1
- package/actions/standard/taking/index.d.ts.map +1 -1
- package/actions/standard/taking/taking-data.d.ts.map +1 -1
- package/actions/standard/taking/taking-events.d.ts +1 -1
- package/actions/standard/taking/taking-events.d.ts.map +1 -1
- package/actions/standard/taking/taking-messages.d.ts.map +1 -1
- package/actions/standard/taking/taking-types.d.ts +2 -2
- package/actions/standard/taking/taking-types.d.ts.map +1 -1
- package/actions/standard/taking/taking.d.ts.map +1 -1
- package/actions/standard/taking/taking.js +1 -1
- package/actions/standard/taking_off/index.d.ts.map +1 -1
- package/actions/standard/taking_off/taking-off-events.d.ts +1 -1
- package/actions/standard/taking_off/taking-off-events.d.ts.map +1 -1
- package/actions/standard/taking_off/taking-off.d.ts.map +1 -1
- package/actions/standard/taking_off/taking-off.js +1 -1
- package/actions/standard/talking/index.d.ts.map +1 -1
- package/actions/standard/talking/talking-events.d.ts +1 -1
- package/actions/standard/talking/talking-events.d.ts.map +1 -1
- package/actions/standard/talking/talking.d.ts.map +1 -1
- package/actions/standard/talking/talking.js +1 -1
- package/actions/standard/throwing/index.d.ts.map +1 -1
- package/actions/standard/throwing/throwing-events.d.ts.map +1 -1
- package/actions/standard/throwing/throwing.d.ts.map +1 -1
- package/actions/standard/throwing/throwing.js +1 -1
- package/actions/standard/touching/index.d.ts.map +1 -1
- package/actions/standard/touching/touching-events.d.ts +1 -1
- package/actions/standard/touching/touching-events.d.ts.map +1 -1
- package/actions/standard/touching/touching.d.ts.map +1 -1
- package/actions/standard/touching/touching.js +1 -1
- package/actions/standard/undoing/index.d.ts.map +1 -1
- package/actions/standard/undoing/undoing-events.d.ts.map +1 -1
- package/actions/standard/undoing/undoing.d.ts.map +1 -1
- package/actions/standard/undoing/undoing.js +1 -1
- package/actions/standard/unlocking/index.d.ts.map +1 -1
- package/actions/standard/unlocking/unlocking-events.d.ts +1 -1
- package/actions/standard/unlocking/unlocking-events.d.ts.map +1 -1
- package/actions/standard/unlocking/unlocking-messages.d.ts.map +1 -1
- package/actions/standard/unlocking/unlocking.d.ts.map +1 -1
- package/actions/standard/unlocking/unlocking.js +1 -1
- package/actions/standard/version/index.d.ts.map +1 -1
- package/actions/standard/version/version-events.d.ts.map +1 -1
- package/actions/standard/version/version.d.ts.map +1 -1
- package/actions/standard/version/version.js +1 -1
- package/actions/standard/waiting/index.d.ts.map +1 -1
- package/actions/standard/waiting/waiting-events.d.ts +1 -1
- package/actions/standard/waiting/waiting-events.d.ts.map +1 -1
- package/actions/standard/waiting/waiting.d.ts.map +1 -1
- package/actions/standard/wearable-shared.d.ts +2 -2
- package/actions/standard/wearable-shared.d.ts.map +1 -1
- package/actions/standard/wearable-shared.js +1 -1
- package/actions/standard/wearing/index.d.ts.map +1 -1
- package/actions/standard/wearing/wearing-events.d.ts +1 -1
- package/actions/standard/wearing/wearing-events.d.ts.map +1 -1
- package/actions/standard/wearing/wearing-messages.d.ts.map +1 -1
- package/actions/standard/wearing/wearing.d.ts.map +1 -1
- package/actions/standard/wearing/wearing.js +1 -1
- package/actions/types.d.ts +1 -1
- package/actions/types.d.ts.map +1 -1
- package/capabilities/command-history.d.ts +1 -1
- package/capabilities/command-history.d.ts.map +1 -1
- package/capabilities/conversation.d.ts +1 -1
- package/capabilities/conversation.d.ts.map +1 -1
- package/capabilities/debug.d.ts +1 -1
- package/capabilities/debug.d.ts.map +1 -1
- package/capabilities/game-meta.d.ts +1 -1
- package/capabilities/game-meta.d.ts.map +1 -1
- package/capabilities/index.d.ts.map +1 -1
- package/capabilities/index.js +1 -1
- package/capabilities/save-restore.d.ts +1 -1
- package/capabilities/save-restore.d.ts.map +1 -1
- package/capabilities/scoring.d.ts +1 -1
- package/capabilities/scoring.d.ts.map +1 -1
- package/chains/index.d.ts +1 -1
- package/chains/index.d.ts.map +1 -1
- package/chains/opened-revealed.d.ts +2 -2
- package/chains/opened-revealed.d.ts.map +1 -1
- package/chains/opened-revealed.js +1 -1
- package/channels/index.d.ts +1 -1
- package/channels/index.d.ts.map +1 -1
- package/channels/keys.d.ts.map +1 -1
- package/channels/keys.js +1 -1
- package/channels/media.d.ts +2 -2
- package/channels/media.d.ts.map +1 -1
- package/channels/registry.d.ts +1 -1
- package/channels/registry.d.ts.map +1 -1
- package/channels/sound-events.d.ts +2 -2
- package/channels/sound-events.d.ts.map +1 -1
- package/channels/standard.d.ts +1 -1
- package/channels/standard.d.ts.map +1 -1
- package/channels/standard.js +1 -1
- package/channels/world-helpers.d.ts +2 -2
- package/channels/world-helpers.d.ts.map +1 -1
- package/combat/index.d.ts.map +1 -1
- package/combat/weapon-utils.d.ts +1 -1
- package/combat/weapon-utils.d.ts.map +1 -1
- package/combat/weapon-utils.js +1 -1
- package/events/action-events.d.ts.map +1 -1
- package/events/base-event.d.ts.map +1 -1
- package/events/common-patterns.d.ts +1 -1
- package/events/common-patterns.d.ts.map +1 -1
- package/events/event-registry.d.ts +1 -1
- package/events/event-registry.d.ts.map +1 -1
- package/events/event-utils.d.ts +2 -2
- package/events/event-utils.d.ts.map +1 -1
- package/events/index.d.ts.map +1 -1
- package/helpers/index.d.ts.map +1 -1
- package/helpers/multi-object-handler.d.ts +2 -2
- package/helpers/multi-object-handler.d.ts.map +1 -1
- package/helpers/multi-object-handler.js +1 -1
- package/index.d.ts.map +1 -1
- package/inference/implicit-inference.d.ts +1 -1
- package/inference/implicit-inference.d.ts.map +1 -1
- package/inference/index.d.ts.map +1 -1
- package/npc/behaviors.d.ts.map +1 -1
- package/npc/behaviors.js +1 -1
- package/npc/character-messages.d.ts.map +1 -1
- package/npc/character-observer.d.ts +2 -2
- package/npc/character-observer.d.ts.map +1 -1
- package/npc/character-observer.js +1 -1
- package/npc/index.d.ts.map +1 -1
- package/npc/lucidity-decay.d.ts +2 -2
- package/npc/lucidity-decay.d.ts.map +1 -1
- package/npc/lucidity-decay.js +1 -1
- package/npc/npc-messages.d.ts.map +1 -1
- package/npc/npc-service.d.ts +2 -2
- package/npc/npc-service.d.ts.map +1 -1
- package/npc/npc-service.js +1 -1
- package/npc/types.d.ts +2 -2
- package/npc/types.d.ts.map +1 -1
- package/package.json +7 -7
- package/parser/index.d.ts +1 -1
- package/parser/index.d.ts.map +1 -1
- package/parser/index.js +1 -1
- package/query-handlers/index.d.ts.map +1 -1
- package/query-handlers/quit-handler.d.ts +1 -1
- package/query-handlers/quit-handler.d.ts.map +1 -1
- package/query-handlers/quit-handler.js +1 -1
- package/query-handlers/restart-handler.d.ts +1 -1
- package/query-handlers/restart-handler.d.ts.map +1 -1
- package/query-handlers/restart-handler.js +1 -1
- package/scope/index.d.ts.map +1 -1
- package/scope/scope-resolver.d.ts +1 -1
- package/scope/scope-resolver.d.ts.map +1 -1
- package/scope/scope-resolver.js +1 -1
- package/scope/types.d.ts +1 -1
- package/scope/types.d.ts.map +1 -1
- package/scope/witness-system.d.ts +1 -1
- package/scope/witness-system.d.ts.map +1 -1
- package/scope/witness-system.js +2 -2
- package/services/PerceptionService.d.ts +4 -4
- package/services/PerceptionService.d.ts.map +1 -1
- package/services/PerceptionService.js +1 -1
- package/services/index.d.ts.map +1 -1
- package/utils/entity-info.d.ts +2 -2
- package/utils/entity-info.d.ts.map +1 -1
- package/utils/entity-info.js +1 -1
- package/utils/index.d.ts.map +1 -1
- package/validation/command-validator.d.ts +2 -2
- package/validation/command-validator.d.ts.map +1 -1
- package/validation/command-validator.js +1 -1
- package/validation/index.d.ts.map +1 -1
- package/validation/types.d.ts +1 -1
- package/validation/types.d.ts.map +1 -1
- package/vocabulary/index.d.ts.map +1 -1
- package/vocabulary/standard-english.d.ts.map +1 -1
- package/actions/context.d.ts +0 -95
- package/actions/context.d.ts.map +0 -1
- package/actions/context.js +0 -272
- package/actions/context.js.map +0 -1
- package/actions/standard/inserting/inserting-semantic.d.ts +0 -42
- package/actions/standard/inserting/inserting-semantic.d.ts.map +0 -1
- package/actions/standard/inserting/inserting-semantic.js +0 -219
- package/actions/standard/inserting/inserting-semantic.js.map +0 -1
- package/combat/combat-messages.d.ts +0 -52
- package/combat/combat-messages.d.ts.map +0 -1
- package/combat/combat-messages.js +0 -69
- package/combat/combat-messages.js.map +0 -1
- package/combat/combat-service.d.ts +0 -109
- package/combat/combat-service.d.ts.map +0 -1
- package/combat/combat-service.js +0 -244
- package/combat/combat-service.js.map +0 -1
- package/events/helpers.d.ts +0 -44
- package/events/helpers.d.ts.map +0 -1
- package/events/helpers.js +0 -141
- package/events/helpers.js.map +0 -1
- package/services/scoring/index.d.ts +0 -6
- package/services/scoring/index.d.ts.map +0 -1
- package/services/scoring/index.js +0 -12
- package/services/scoring/index.js.map +0 -1
- package/services/scoring/scoring-event-processor.d.ts +0 -337
- package/services/scoring/scoring-event-processor.d.ts.map +0 -1
- package/services/scoring/scoring-event-processor.js +0 -613
- package/services/scoring/scoring-event-processor.js.map +0 -1
- package/services/scoring/scoring-service.d.ts +0 -185
- package/services/scoring/scoring-service.d.ts.map +0 -1
- package/services/scoring/scoring-service.js +0 -279
- package/services/scoring/scoring-service.js.map +0 -1
- package/sharpee-stdlib-0.9.109.tgz +0 -0
- package/sharpee-stdlib-0.9.110.tgz +0 -0
package/actions/context.js
DELETED
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Read-only action context implementation
|
|
4
|
-
*
|
|
5
|
-
* Provides query methods for actions without allowing state mutations
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ReadOnlyActionContext = void 0;
|
|
9
|
-
const world_model_1 = require("../../world-model/index.js");
|
|
10
|
-
const types_1 = require("../scope/types");
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Use createActionContext from enhanced-context.ts instead
|
|
13
|
-
* This class is kept for backward compatibility but will be removed in Phase 4
|
|
14
|
-
*/
|
|
15
|
-
class ReadOnlyActionContext {
|
|
16
|
-
world;
|
|
17
|
-
player;
|
|
18
|
-
currentLocation;
|
|
19
|
-
command;
|
|
20
|
-
action;
|
|
21
|
-
scopeResolver;
|
|
22
|
-
sharedData = {};
|
|
23
|
-
constructor(world, player, currentLocation, command, action, scopeResolver) {
|
|
24
|
-
this.world = world;
|
|
25
|
-
this.player = player;
|
|
26
|
-
this.currentLocation = currentLocation;
|
|
27
|
-
this.command = command;
|
|
28
|
-
// Temporary compatibility - action is required by interface but this class is deprecated
|
|
29
|
-
this.action = action || {
|
|
30
|
-
id: 'unknown',
|
|
31
|
-
validate: () => ({ valid: true }),
|
|
32
|
-
execute: () => []
|
|
33
|
-
};
|
|
34
|
-
this.scopeResolver = scopeResolver || {}; // Temporary fix for deprecated class
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Check if an entity is visible to the player
|
|
38
|
-
*/
|
|
39
|
-
canSee(entity) {
|
|
40
|
-
return this.world.canSee(this.player.id, entity.id);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Check if an entity is physically reachable by the player
|
|
44
|
-
*
|
|
45
|
-
* An entity is reachable if:
|
|
46
|
-
* 1. It's in the same location as the player
|
|
47
|
-
* 2. It's held by the player
|
|
48
|
-
* 3. It's in an open container in the same location
|
|
49
|
-
* 4. It's on a supporter in the same location
|
|
50
|
-
*/
|
|
51
|
-
canReach(entity) {
|
|
52
|
-
const entityLocation = this.world.getLocation(entity.id);
|
|
53
|
-
// Held by player
|
|
54
|
-
if (entityLocation === this.player.id) {
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
// In same location as player
|
|
58
|
-
if (entityLocation === this.currentLocation.id) {
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
// In an accessible container/supporter
|
|
62
|
-
if (entityLocation) {
|
|
63
|
-
const container = this.world.getEntity(entityLocation);
|
|
64
|
-
if (container) {
|
|
65
|
-
const containerLocation = this.world.getLocation(container.id);
|
|
66
|
-
// Container is in same location as player
|
|
67
|
-
if (containerLocation === this.currentLocation.id) {
|
|
68
|
-
// Check if it's an open container
|
|
69
|
-
if (container.has('container')) {
|
|
70
|
-
const openableTrait = container.getTrait(world_model_1.OpenableTrait);
|
|
71
|
-
if (!openableTrait || openableTrait.isOpen) {
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
// Or a supporter (always accessible)
|
|
76
|
-
if (container.has('supporter')) {
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
// Container is held by player
|
|
81
|
-
if (containerLocation === this.player.id) {
|
|
82
|
-
// Check if it's an open container
|
|
83
|
-
if (container.has('container')) {
|
|
84
|
-
const openableTrait = container.getTrait(world_model_1.OpenableTrait);
|
|
85
|
-
if (!openableTrait || openableTrait.isOpen) {
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Check if an entity can be taken by the player
|
|
96
|
-
*
|
|
97
|
-
* An entity can be taken if:
|
|
98
|
-
* 1. It's visible
|
|
99
|
-
* 2. It's reachable
|
|
100
|
-
* 3. It's not a room
|
|
101
|
-
* 4. It's not scenery (fixed in place)
|
|
102
|
-
* 5. It's not already held by the player
|
|
103
|
-
*/
|
|
104
|
-
canTake(entity) {
|
|
105
|
-
// Must be visible
|
|
106
|
-
if (!this.canSee(entity)) {
|
|
107
|
-
return false;
|
|
108
|
-
}
|
|
109
|
-
// Must be reachable
|
|
110
|
-
if (!this.canReach(entity)) {
|
|
111
|
-
return false;
|
|
112
|
-
}
|
|
113
|
-
// Can't take rooms
|
|
114
|
-
if (entity.has('room')) {
|
|
115
|
-
return false;
|
|
116
|
-
}
|
|
117
|
-
// Can't take scenery
|
|
118
|
-
if (entity.has('scenery')) {
|
|
119
|
-
return false;
|
|
120
|
-
}
|
|
121
|
-
// Already held
|
|
122
|
-
const location = this.world.getLocation(entity.id);
|
|
123
|
-
if (location === this.player.id) {
|
|
124
|
-
return false;
|
|
125
|
-
}
|
|
126
|
-
return true;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Check if an entity is in scope for the player
|
|
130
|
-
*/
|
|
131
|
-
isInScope(entity) {
|
|
132
|
-
const inScopeEntities = this.world.getInScope(this.player.id);
|
|
133
|
-
return inScopeEntities.some(e => e.id === entity.id);
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Get all entities visible to the player
|
|
137
|
-
*/
|
|
138
|
-
getVisible() {
|
|
139
|
-
return this.world.getVisible(this.player.id);
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Get all entities in scope for the player
|
|
143
|
-
*/
|
|
144
|
-
getInScope() {
|
|
145
|
-
return this.world.getInScope(this.player.id);
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Get capability data (convenience method)
|
|
149
|
-
*/
|
|
150
|
-
getCapability(name) {
|
|
151
|
-
return this.world.getCapability(name);
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Event creation method (required by ActionContext interface)
|
|
155
|
-
* @deprecated This implementation throws an error - use createActionContext instead
|
|
156
|
-
*/
|
|
157
|
-
event(type, data) {
|
|
158
|
-
throw new Error('ReadOnlyActionContext does not support event creation. Use createActionContext from enhanced-context.ts instead.');
|
|
159
|
-
}
|
|
160
|
-
// =========================================================================
|
|
161
|
-
// Scope validation methods (Phase 4 - stub implementations for deprecated class)
|
|
162
|
-
// =========================================================================
|
|
163
|
-
/**
|
|
164
|
-
* Get the scope level for an entity.
|
|
165
|
-
* @deprecated This implementation returns basic scope levels - use createActionContext instead
|
|
166
|
-
*/
|
|
167
|
-
getEntityScope(entity) {
|
|
168
|
-
// Basic implementation for deprecated class
|
|
169
|
-
const entityLocation = this.world.getLocation(entity.id);
|
|
170
|
-
// Carried - in player's inventory
|
|
171
|
-
if (entityLocation === this.player.id) {
|
|
172
|
-
return types_1.ScopeLevel.CARRIED;
|
|
173
|
-
}
|
|
174
|
-
// Reachable - in same location
|
|
175
|
-
if (entityLocation === this.currentLocation.id || this.canReach(entity)) {
|
|
176
|
-
return types_1.ScopeLevel.REACHABLE;
|
|
177
|
-
}
|
|
178
|
-
// Visible - can see but not reach
|
|
179
|
-
if (this.canSee(entity)) {
|
|
180
|
-
return types_1.ScopeLevel.VISIBLE;
|
|
181
|
-
}
|
|
182
|
-
// Not in scope
|
|
183
|
-
return types_1.ScopeLevel.UNAWARE;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Get the scope level for an entity in a command slot.
|
|
187
|
-
* @deprecated This implementation returns basic scope levels - use createActionContext instead
|
|
188
|
-
*/
|
|
189
|
-
getSlotScope(slot) {
|
|
190
|
-
const slotMap = {
|
|
191
|
-
target: 'directObject',
|
|
192
|
-
item: 'directObject',
|
|
193
|
-
container: 'indirectObject',
|
|
194
|
-
recipient: 'indirectObject'
|
|
195
|
-
};
|
|
196
|
-
const commandSlot = slotMap[slot] || slot;
|
|
197
|
-
const ref = this.command[commandSlot];
|
|
198
|
-
const entity = ref?.entity;
|
|
199
|
-
if (!entity) {
|
|
200
|
-
return types_1.ScopeLevel.UNAWARE;
|
|
201
|
-
}
|
|
202
|
-
return this.getEntityScope(entity);
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Check if an entity meets a required scope level.
|
|
206
|
-
* @deprecated This implementation is basic - use createActionContext instead
|
|
207
|
-
*/
|
|
208
|
-
requireScope(entity, required) {
|
|
209
|
-
const actualScope = this.getEntityScope(entity);
|
|
210
|
-
if (actualScope >= required) {
|
|
211
|
-
return { ok: true, actualScope };
|
|
212
|
-
}
|
|
213
|
-
// Return appropriate error based on what's missing
|
|
214
|
-
let errorCode;
|
|
215
|
-
if (required === types_1.ScopeLevel.CARRIED) {
|
|
216
|
-
errorCode = 'scope.not_carried';
|
|
217
|
-
}
|
|
218
|
-
else if (required === types_1.ScopeLevel.REACHABLE) {
|
|
219
|
-
errorCode = 'scope.not_reachable';
|
|
220
|
-
}
|
|
221
|
-
else if (required === types_1.ScopeLevel.VISIBLE) {
|
|
222
|
-
errorCode = 'scope.not_visible';
|
|
223
|
-
}
|
|
224
|
-
else {
|
|
225
|
-
errorCode = 'scope.out_of_scope';
|
|
226
|
-
}
|
|
227
|
-
return {
|
|
228
|
-
ok: false,
|
|
229
|
-
actualScope,
|
|
230
|
-
error: {
|
|
231
|
-
valid: false,
|
|
232
|
-
error: errorCode,
|
|
233
|
-
params: { entityId: entity.id, entityName: entity.name, required, actual: actualScope }
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* Check if a command slot entity meets a required scope level.
|
|
239
|
-
* @deprecated This implementation is basic - use createActionContext instead
|
|
240
|
-
*/
|
|
241
|
-
requireSlotScope(slot, required) {
|
|
242
|
-
const slotMap = {
|
|
243
|
-
target: 'directObject',
|
|
244
|
-
item: 'directObject',
|
|
245
|
-
container: 'indirectObject',
|
|
246
|
-
recipient: 'indirectObject'
|
|
247
|
-
};
|
|
248
|
-
const commandSlot = slotMap[slot] || slot;
|
|
249
|
-
const ref = this.command[commandSlot];
|
|
250
|
-
const entity = ref?.entity;
|
|
251
|
-
if (!entity) {
|
|
252
|
-
return {
|
|
253
|
-
ok: false,
|
|
254
|
-
error: {
|
|
255
|
-
valid: false,
|
|
256
|
-
error: 'scope.not_found',
|
|
257
|
-
params: { slot }
|
|
258
|
-
}
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
return this.requireScope(entity, required);
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Check if an entity is carried, attempting implicit take if needed.
|
|
265
|
-
* @deprecated This implementation throws an error - use createActionContext instead
|
|
266
|
-
*/
|
|
267
|
-
requireCarriedOrImplicitTake(_entity) {
|
|
268
|
-
throw new Error('ReadOnlyActionContext does not support implicit takes. Use createActionContext from enhanced-context.ts instead.');
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
exports.ReadOnlyActionContext = ReadOnlyActionContext;
|
|
272
|
-
//# sourceMappingURL=context.js.map
|
package/actions/context.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../../../../repos/sharpee/packages/stdlib/src/actions/context.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,sDAA+G;AAG/G,0CAA2D;AAE3D;;;GAGG;AACH,MAAa,qBAAqB;IAMd;IACA;IACA;IACA;IARF,MAAM,CAAS;IACf,aAAa,CAAgB;IACtC,UAAU,GAAwB,EAAE,CAAC;IAE5C,YACkB,KAAiB,EACjB,MAAgB,EAChB,eAAyB,EACzB,OAA0B,EAC1C,MAAe,EACf,aAA6B;QALb,UAAK,GAAL,KAAK,CAAY;QACjB,WAAM,GAAN,MAAM,CAAU;QAChB,oBAAe,GAAf,eAAe,CAAU;QACzB,YAAO,GAAP,OAAO,CAAmB;QAI1C,yFAAyF;QACzF,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI;YACtB,EAAE,EAAE,SAAS;YACb,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;YACjC,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE;SAClB,CAAC;QACF,IAAI,CAAC,aAAa,GAAG,aAAa,IAAK,EAAoB,CAAC,CAAC,qCAAqC;IACpG,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAgB;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;IACtD,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,MAAgB;QACvB,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAEzD,iBAAiB;QACjB,IAAI,cAAc,KAAK,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACtC,OAAO,IAAI,CAAC;QACd,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;YACtB,IAAI,EAAE,cAAc;YACpB,SAAS,EAAE,gBAAgB;YAC3B,SAAS,EAAE,gBAAgB;SAC5B,CAAC;QAEF,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,IAAyC,CAAC;QAC/E,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACtC,MAAM,MAAM,GAAG,GAAG,EAAE,MAAM,CAAC;QAE3B,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE;oBACL,KAAK,EAAE,KAAK;oBACZ,KAAK,EAAE,iBAAiB;oBACxB,MAAM,EAAE,EAAE,IAAI,EAAE;iBACjB;aACF,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACH,4BAA4B,CAAC,OAAiB;QAC5C,MAAM,IAAI,KAAK,CAAC,kHAAkH,CAAC,CAAC;IACtI,CAAC;CACF;AAnSD,sDAmSC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SEMANTIC VERSION: Inserting action - insert objects specifically into containers
|
|
3
|
-
*
|
|
4
|
-
* This version demonstrates how semantic grammar eliminates the need for:
|
|
5
|
-
* - Modifying parsed commands to add implicit prepositions
|
|
6
|
-
* - Checking verb.text for variations
|
|
7
|
-
* - Tight coupling to parser internals
|
|
8
|
-
*
|
|
9
|
-
* Instead, the grammar provides semantic properties that tell us:
|
|
10
|
-
* - spatialRelation: 'in' (normalized from 'in', 'into', or implicit)
|
|
11
|
-
* - manner: how the insertion should be performed
|
|
12
|
-
* - implicitPreposition: whether the user said "insert X Y" vs "insert X into Y"
|
|
13
|
-
*/
|
|
14
|
-
import { IAction } from "../../../../if-domain/index";
|
|
15
|
-
export declare const insertingActionSemantic: IAction;
|
|
16
|
-
/**
|
|
17
|
-
* Key improvements in this semantic version:
|
|
18
|
-
*
|
|
19
|
-
* 1. NO COMMAND MODIFICATION
|
|
20
|
-
* - The old version modified context.command.parsed to add 'in' preposition
|
|
21
|
-
* - This version trusts the grammar-provided semantics.spatialRelation
|
|
22
|
-
*
|
|
23
|
-
* 2. SEMANTIC-BASED BEHAVIOR
|
|
24
|
-
* - Different messages based on manner (forceful, careful, stealthy)
|
|
25
|
-
* - Sound events based on how the action was performed
|
|
26
|
-
* - Validation considers semantics (forceful + fragile = error)
|
|
27
|
-
*
|
|
28
|
-
* 3. CLEANER ARCHITECTURE
|
|
29
|
-
* - No delegation to putting action needed
|
|
30
|
-
* - No need to create modified contexts
|
|
31
|
-
* - Action is self-contained and focused
|
|
32
|
-
*
|
|
33
|
-
* 4. IMPLICIT PREPOSITION HANDLING
|
|
34
|
-
* - Grammar tells us if user said "insert X Y" via implicitPreposition flag
|
|
35
|
-
* - We can provide clearer feedback without hacking the command
|
|
36
|
-
*
|
|
37
|
-
* 5. NO PARSER COUPLING
|
|
38
|
-
* - Never accesses context.command.parsed
|
|
39
|
-
* - Never checks verb.text
|
|
40
|
-
* - Never looks at structure.preposition.text
|
|
41
|
-
*/
|
|
42
|
-
//# sourceMappingURL=inserting-semantic.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inserting-semantic.d.ts","sourceRoot":"","sources":["../../../../../../../../repos/sharpee/packages/stdlib/src/actions/standard/inserting/inserting-semantic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAsD,MAAM,oBAAoB,CAAC;AAIjG,eAAO,MAAM,uBAAuB,EAAE,OAkMrC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG"}
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* SEMANTIC VERSION: Inserting action - insert objects specifically into containers
|
|
4
|
-
*
|
|
5
|
-
* This version demonstrates how semantic grammar eliminates the need for:
|
|
6
|
-
* - Modifying parsed commands to add implicit prepositions
|
|
7
|
-
* - Checking verb.text for variations
|
|
8
|
-
* - Tight coupling to parser internals
|
|
9
|
-
*
|
|
10
|
-
* Instead, the grammar provides semantic properties that tell us:
|
|
11
|
-
* - spatialRelation: 'in' (normalized from 'in', 'into', or implicit)
|
|
12
|
-
* - manner: how the insertion should be performed
|
|
13
|
-
* - implicitPreposition: whether the user said "insert X Y" vs "insert X into Y"
|
|
14
|
-
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.insertingActionSemantic = void 0;
|
|
17
|
-
exports.insertingActionSemantic = {
|
|
18
|
-
id: 'if.action.inserting',
|
|
19
|
-
requiredMessages: [
|
|
20
|
-
'no_target',
|
|
21
|
-
'no_destination',
|
|
22
|
-
'not_held',
|
|
23
|
-
'not_insertable',
|
|
24
|
-
'not_container',
|
|
25
|
-
'already_there',
|
|
26
|
-
'inserted',
|
|
27
|
-
'inserted_forcefully',
|
|
28
|
-
'inserted_carefully',
|
|
29
|
-
'wont_fit',
|
|
30
|
-
'container_closed'
|
|
31
|
-
],
|
|
32
|
-
validate(context) {
|
|
33
|
-
const item = context.command.directObject?.entity;
|
|
34
|
-
const container = context.command.indirectObject?.entity;
|
|
35
|
-
const semantics = context.command.semantics || {};
|
|
36
|
-
// Validate we have an item
|
|
37
|
-
if (!item) {
|
|
38
|
-
return {
|
|
39
|
-
valid: false,
|
|
40
|
-
error: 'no_target'
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
// Validate we have a destination
|
|
44
|
-
if (!container) {
|
|
45
|
-
return {
|
|
46
|
-
valid: false,
|
|
47
|
-
error: 'no_destination',
|
|
48
|
-
params: { item: item.attributes.name || item.id }
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
// Check if player is holding the item
|
|
52
|
-
if (!context.canReach(item)) {
|
|
53
|
-
return {
|
|
54
|
-
valid: false,
|
|
55
|
-
error: 'not_held',
|
|
56
|
-
params: { item: item.attributes.name || item.id }
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
// Check if container is actually a container
|
|
60
|
-
// Note: IEntity doesn't have getCapability - need to check attributes
|
|
61
|
-
const capabilities = container.capabilities;
|
|
62
|
-
const containerData = (container.attributes?.['container'] || capabilities?.['container']);
|
|
63
|
-
if (!containerData) {
|
|
64
|
-
return {
|
|
65
|
-
valid: false,
|
|
66
|
-
error: 'not_container',
|
|
67
|
-
params: { container: container.attributes.name || container.id }
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
// Check if container is closed
|
|
71
|
-
if (containerData.closed) {
|
|
72
|
-
return {
|
|
73
|
-
valid: false,
|
|
74
|
-
error: 'container_closed',
|
|
75
|
-
params: { container: container.attributes.name || container.id }
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
// Check if item is already in container
|
|
79
|
-
if (context.getEntityLocation(item.id) === container.id) {
|
|
80
|
-
return {
|
|
81
|
-
valid: false,
|
|
82
|
-
error: 'already_there',
|
|
83
|
-
params: {
|
|
84
|
-
item: item.attributes.name || item.id,
|
|
85
|
-
container: container.attributes.name || container.id
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
// Check capacity if applicable
|
|
90
|
-
if (containerData.maxCapacity !== undefined) {
|
|
91
|
-
const contents = context.getEntityContents(container.id);
|
|
92
|
-
if (contents.length >= containerData.maxCapacity) {
|
|
93
|
-
return {
|
|
94
|
-
valid: false,
|
|
95
|
-
error: 'wont_fit',
|
|
96
|
-
params: {
|
|
97
|
-
item: item.attributes.name || item.id,
|
|
98
|
-
container: container.attributes.name || container.id
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
// Semantic validation: forceful insertion might damage fragile containers
|
|
104
|
-
if (semantics.manner === 'forceful' && container.attributes?.['fragile']) {
|
|
105
|
-
return {
|
|
106
|
-
valid: false,
|
|
107
|
-
error: 'would_damage',
|
|
108
|
-
params: {
|
|
109
|
-
item: item.attributes.name || item.id,
|
|
110
|
-
container: container.attributes.name || container.id
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
return { valid: true };
|
|
115
|
-
},
|
|
116
|
-
execute(context) {
|
|
117
|
-
// Revalidate
|
|
118
|
-
const validation = this.validate(context);
|
|
119
|
-
if (!validation.valid) {
|
|
120
|
-
return [context.event('if.event.insert_blocked', {
|
|
121
|
-
messageId: `${this.id}.${validation.error}`,
|
|
122
|
-
params: validation.params || {},
|
|
123
|
-
reason: validation.error
|
|
124
|
-
})];
|
|
125
|
-
}
|
|
126
|
-
const item = context.command.directObject.entity;
|
|
127
|
-
const container = context.command.indirectObject.entity;
|
|
128
|
-
const semantics = context.command.semantics || {};
|
|
129
|
-
// Move the item into the container
|
|
130
|
-
const success = context.moveEntity(item.id, container.id);
|
|
131
|
-
if (!success) {
|
|
132
|
-
return [context.event('if.event.insert_blocked', {
|
|
133
|
-
messageId: `${this.id}.insertion_failed`,
|
|
134
|
-
params: {
|
|
135
|
-
item: item.attributes.name || item.id,
|
|
136
|
-
container: container.attributes.name || container.id
|
|
137
|
-
},
|
|
138
|
-
reason: 'insertion_failed'
|
|
139
|
-
})];
|
|
140
|
-
}
|
|
141
|
-
// Choose message based on semantic manner
|
|
142
|
-
let messageId = 'inserted';
|
|
143
|
-
if (semantics.manner === 'forceful') {
|
|
144
|
-
messageId = 'inserted_forcefully';
|
|
145
|
-
}
|
|
146
|
-
else if (semantics.manner === 'careful') {
|
|
147
|
-
messageId = 'inserted_carefully';
|
|
148
|
-
}
|
|
149
|
-
else if (semantics.manner === 'stealthy') {
|
|
150
|
-
messageId = 'inserted_stealthily';
|
|
151
|
-
}
|
|
152
|
-
// If the preposition was implicit, we might want to be more explicit in the response
|
|
153
|
-
if (semantics.implicitPreposition) {
|
|
154
|
-
// The grammar told us the user said "insert X Y" not "insert X into Y"
|
|
155
|
-
// We can provide clearer feedback
|
|
156
|
-
messageId = 'inserted_into'; // "You insert the coin into the slot."
|
|
157
|
-
}
|
|
158
|
-
const itemName = item.attributes.name || item.id;
|
|
159
|
-
const containerName = container.attributes.name || container.id;
|
|
160
|
-
return [
|
|
161
|
-
// Domain event with embedded messageId (ADR-097)
|
|
162
|
-
context.event('if.event.inserted', {
|
|
163
|
-
// Rendering data (messageId + params for text-service)
|
|
164
|
-
messageId: `${this.id}.${messageId}`,
|
|
165
|
-
params: {
|
|
166
|
-
item: itemName,
|
|
167
|
-
container: containerName,
|
|
168
|
-
manner: semantics.manner || 'normal'
|
|
169
|
-
},
|
|
170
|
-
// Domain data (for event sourcing / handlers)
|
|
171
|
-
itemId: item.id,
|
|
172
|
-
itemName: itemName,
|
|
173
|
-
containerId: container.id,
|
|
174
|
-
containerName: containerName,
|
|
175
|
-
manner: semantics.manner || 'normal'
|
|
176
|
-
}),
|
|
177
|
-
// Additional semantic events based on manner
|
|
178
|
-
...(semantics.manner === 'forceful' ? [
|
|
179
|
-
context.event('sound.loud', {
|
|
180
|
-
source: container.id,
|
|
181
|
-
description: 'clunk'
|
|
182
|
-
})
|
|
183
|
-
] : []),
|
|
184
|
-
...(semantics.manner === 'stealthy' ? [
|
|
185
|
-
context.event('sound.quiet', {
|
|
186
|
-
source: container.id,
|
|
187
|
-
description: 'soft sliding'
|
|
188
|
-
})
|
|
189
|
-
] : [])
|
|
190
|
-
];
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* Key improvements in this semantic version:
|
|
195
|
-
*
|
|
196
|
-
* 1. NO COMMAND MODIFICATION
|
|
197
|
-
* - The old version modified context.command.parsed to add 'in' preposition
|
|
198
|
-
* - This version trusts the grammar-provided semantics.spatialRelation
|
|
199
|
-
*
|
|
200
|
-
* 2. SEMANTIC-BASED BEHAVIOR
|
|
201
|
-
* - Different messages based on manner (forceful, careful, stealthy)
|
|
202
|
-
* - Sound events based on how the action was performed
|
|
203
|
-
* - Validation considers semantics (forceful + fragile = error)
|
|
204
|
-
*
|
|
205
|
-
* 3. CLEANER ARCHITECTURE
|
|
206
|
-
* - No delegation to putting action needed
|
|
207
|
-
* - No need to create modified contexts
|
|
208
|
-
* - Action is self-contained and focused
|
|
209
|
-
*
|
|
210
|
-
* 4. IMPLICIT PREPOSITION HANDLING
|
|
211
|
-
* - Grammar tells us if user said "insert X Y" via implicitPreposition flag
|
|
212
|
-
* - We can provide clearer feedback without hacking the command
|
|
213
|
-
*
|
|
214
|
-
* 5. NO PARSER COUPLING
|
|
215
|
-
* - Never accesses context.command.parsed
|
|
216
|
-
* - Never checks verb.text
|
|
217
|
-
* - Never looks at structure.preposition.text
|
|
218
|
-
*/
|
|
219
|
-
//# sourceMappingURL=inserting-semantic.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inserting-semantic.js","sourceRoot":"","sources":["../../../../../../../../../repos/sharpee/packages/stdlib/src/actions/standard/inserting/inserting-semantic.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAMU,QAAA,uBAAuB,GAAY;IAC9C,EAAE,EAAE,qBAAqB;IAEzB,gBAAgB,EAAE;QAChB,WAAW;QACX,gBAAgB;QAChB,UAAU;QACV,gBAAgB;QAChB,eAAe;QACf,eAAe;QACf,UAAU;QACV,qBAAqB;QACrB,oBAAoB;QACpB,UAAU;QACV,kBAAkB;KACnB;IAED,QAAQ,CAAC,OAAuB;QAC9B,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;QAClD,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC;QACzD,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC;QAElD,2BAA2B;QAC3B,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,WAAW;aACnB,CAAC;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C;aACH,CAAC,CAAC,CAAC,EAAE,CAAC;YAEP,GAAG,CAAC,SAAS,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC;gBACpC,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE;oBAC3B,MAAM,EAAE,SAAS,CAAC,EAAE;oBACpB,WAAW,EAAE,cAAc;iBAC5B,CAAC;aACH,CAAC,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;IACJ,CAAC;CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Combat Message IDs (ADR-072)
|
|
3
|
-
*
|
|
4
|
-
* Semantic message IDs for combat-related events.
|
|
5
|
-
* Actual text is provided by the language layer.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Message IDs for combat events
|
|
9
|
-
*/
|
|
10
|
-
export declare const CombatMessages: {
|
|
11
|
-
readonly ATTACK_MISSED: "combat.attack.missed";
|
|
12
|
-
readonly ATTACK_HIT: "combat.attack.hit";
|
|
13
|
-
readonly ATTACK_HIT_LIGHT: "combat.attack.hit_light";
|
|
14
|
-
readonly ATTACK_HIT_HEAVY: "combat.attack.hit_heavy";
|
|
15
|
-
readonly ATTACK_KNOCKED_OUT: "combat.attack.knocked_out";
|
|
16
|
-
readonly ATTACK_KILLED: "combat.attack.killed";
|
|
17
|
-
readonly DEFEND_BLOCKED: "combat.defend.blocked";
|
|
18
|
-
readonly DEFEND_PARRIED: "combat.defend.parried";
|
|
19
|
-
readonly DEFEND_DODGED: "combat.defend.dodged";
|
|
20
|
-
readonly HEALTH_HEALTHY: "combat.health.healthy";
|
|
21
|
-
readonly HEALTH_WOUNDED: "combat.health.wounded";
|
|
22
|
-
readonly HEALTH_BADLY_WOUNDED: "combat.health.badly_wounded";
|
|
23
|
-
readonly HEALTH_NEAR_DEATH: "combat.health.near_death";
|
|
24
|
-
readonly HEALTH_UNCONSCIOUS: "combat.health.unconscious";
|
|
25
|
-
readonly HEALTH_DEAD: "combat.health.dead";
|
|
26
|
-
readonly SWORD_GLOWS: "combat.special.sword_glows";
|
|
27
|
-
readonly SWORD_STOPS_GLOWING: "combat.special.sword_stops_glowing";
|
|
28
|
-
readonly BLESSED_WEAPON_EFFECT: "combat.special.blessed_weapon";
|
|
29
|
-
readonly CANNOT_ATTACK: "combat.cannot_attack";
|
|
30
|
-
readonly ALREADY_DEAD: "combat.already_dead";
|
|
31
|
-
readonly NOT_HOSTILE: "combat.not_hostile";
|
|
32
|
-
readonly NO_TARGET: "combat.no_target";
|
|
33
|
-
readonly TARGET_UNCONSCIOUS: "combat.target_unconscious";
|
|
34
|
-
readonly NEED_WEAPON: "combat.need_weapon";
|
|
35
|
-
readonly COMBAT_STARTED: "combat.started";
|
|
36
|
-
readonly COMBAT_ENDED: "combat.ended";
|
|
37
|
-
readonly PLAYER_DIED: "combat.player_died";
|
|
38
|
-
readonly PLAYER_RESURRECTED: "combat.player_resurrected";
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Type for combat message IDs
|
|
42
|
-
*/
|
|
43
|
-
export type CombatMessageId = (typeof CombatMessages)[keyof typeof CombatMessages];
|
|
44
|
-
/**
|
|
45
|
-
* Health status levels
|
|
46
|
-
*/
|
|
47
|
-
export type HealthStatus = 'healthy' | 'wounded' | 'badly_wounded' | 'near_death' | 'unconscious' | 'dead';
|
|
48
|
-
/**
|
|
49
|
-
* Get message ID for a health status
|
|
50
|
-
*/
|
|
51
|
-
export declare function getHealthStatusMessageId(status: HealthStatus): CombatMessageId;
|
|
52
|
-
//# sourceMappingURL=combat-messages.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"combat-messages.d.ts","sourceRoot":"","sources":["../../../../repos/sharpee/packages/stdlib/src/combat/combat-messages.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCjB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEnF;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,SAAS,GACT,eAAe,GACf,YAAY,GACZ,aAAa,GACb,MAAM,CAAC;AAEX;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,YAAY,GAAG,eAAe,CAe9E"}
|