@sharpee/world-model 2.0.0 → 2.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/capabilities/capability-binding.d.ts +58 -0
- package/capabilities/capability-binding.d.ts.map +1 -0
- package/capabilities/capability-binding.js +25 -0
- package/capabilities/capability-binding.js.map +1 -0
- package/capabilities/index.d.ts +2 -2
- package/capabilities/index.d.ts.map +1 -1
- package/capabilities/index.js +1 -19
- package/capabilities/index.js.map +1 -1
- package/capabilities/interceptor-binding.d.ts +57 -0
- package/capabilities/interceptor-binding.d.ts.map +1 -0
- package/capabilities/interceptor-binding.js +26 -0
- package/capabilities/interceptor-binding.js.map +1 -0
- package/package.json +3 -3
- package/traits/concealment/concealedVisibilityBehavior.d.ts +9 -4
- package/traits/concealment/concealedVisibilityBehavior.d.ts.map +1 -1
- package/traits/concealment/concealedVisibilityBehavior.js +9 -6
- package/traits/concealment/concealedVisibilityBehavior.js.map +1 -1
- package/world/AuthorModel.d.ts +15 -1
- package/world/AuthorModel.d.ts.map +1 -1
- package/world/AuthorModel.js +29 -1
- package/world/AuthorModel.js.map +1 -1
- package/world/VisibilityBehavior.js +4 -4
- package/world/VisibilityBehavior.js.map +1 -1
- package/world/WorldModel.d.ts +132 -2
- package/world/WorldModel.d.ts.map +1 -1
- package/world/WorldModel.js +112 -3
- package/world/WorldModel.js.map +1 -1
- package/capabilities/capability-registry.d.ts +0 -115
- package/capabilities/capability-registry.d.ts.map +0 -1
- package/capabilities/capability-registry.js +0 -157
- package/capabilities/capability-registry.js.map +0 -1
- package/capabilities/interceptor-registry.d.ts +0 -125
- package/capabilities/interceptor-registry.d.ts.map +0 -1
- package/capabilities/interceptor-registry.js +0 -176
- package/capabilities/interceptor-registry.js.map +0 -1
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Capability Registry (ADR-090)
|
|
3
|
-
*
|
|
4
|
-
* Registry for trait-behavior bindings. Stories register behaviors
|
|
5
|
-
* for their traits, and the dispatch system looks them up at runtime.
|
|
6
|
-
*/
|
|
7
|
-
import { ITrait } from '../traits/trait';
|
|
8
|
-
import { CapabilityBehavior } from './capability-behavior';
|
|
9
|
-
import { CapabilityResolution, CapabilityMode } from './capability-defaults';
|
|
10
|
-
/**
|
|
11
|
-
* Options for registering a capability behavior.
|
|
12
|
-
*/
|
|
13
|
-
export interface BehaviorRegistrationOptions<T extends ITrait = ITrait> {
|
|
14
|
-
/** Priority for resolution (higher = checked first). Default: 0 */
|
|
15
|
-
priority?: number;
|
|
16
|
-
/** Override global resolution strategy for this binding */
|
|
17
|
-
resolution?: CapabilityResolution;
|
|
18
|
-
/** Override global mode for this binding */
|
|
19
|
-
mode?: CapabilityMode;
|
|
20
|
-
/** Optional runtime validation */
|
|
21
|
-
validateBinding?: (trait: T) => boolean;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Binding between a trait type, capability, and behavior.
|
|
25
|
-
*/
|
|
26
|
-
export interface TraitBehaviorBinding<T extends ITrait = ITrait> {
|
|
27
|
-
/** Trait type identifier */
|
|
28
|
-
traitType: string;
|
|
29
|
-
/** Action ID (capability) this binding handles */
|
|
30
|
-
capability: string;
|
|
31
|
-
/** The behavior that handles this trait+capability */
|
|
32
|
-
behavior: CapabilityBehavior;
|
|
33
|
-
/** Priority for resolution (higher = checked first) */
|
|
34
|
-
priority: number;
|
|
35
|
-
/** Override resolution strategy (undefined = use global default) */
|
|
36
|
-
resolution?: CapabilityResolution;
|
|
37
|
-
/** Override mode (undefined = use global default) */
|
|
38
|
-
mode?: CapabilityMode;
|
|
39
|
-
/** Optional runtime validation */
|
|
40
|
-
validateBinding?: (trait: T) => boolean;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Register a behavior for a trait+capability combination.
|
|
44
|
-
*
|
|
45
|
-
* Stories call this to register their behaviors during initialization.
|
|
46
|
-
* Each trait+capability pair can only have one behavior registered.
|
|
47
|
-
*
|
|
48
|
-
* @param traitType - The trait type identifier (e.g., 'dungeo.trait.basket_elevator')
|
|
49
|
-
* @param capability - The action ID (e.g., 'if.action.lowering')
|
|
50
|
-
* @param behavior - The behavior implementation
|
|
51
|
-
* @param options - Optional configuration (priority, resolution override, mode override)
|
|
52
|
-
*
|
|
53
|
-
* @example
|
|
54
|
-
* ```typescript
|
|
55
|
-
* // Basic registration (uses global defaults)
|
|
56
|
-
* registerCapabilityBehavior(
|
|
57
|
-
* BasketElevatorTrait.type,
|
|
58
|
-
* 'if.action.lowering',
|
|
59
|
-
* BasketLoweringBehavior
|
|
60
|
-
* );
|
|
61
|
-
*
|
|
62
|
-
* // With priority and overrides
|
|
63
|
-
* registerCapabilityBehavior(
|
|
64
|
-
* TrollAxeTrait.type,
|
|
65
|
-
* 'if.action.taking',
|
|
66
|
-
* TrollAxeTakingBehavior,
|
|
67
|
-
* { priority: 100, resolution: 'any-blocks' }
|
|
68
|
-
* );
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
export declare function registerCapabilityBehavior<T extends ITrait>(traitType: string, capability: string, behavior: CapabilityBehavior, options?: BehaviorRegistrationOptions<T>): void;
|
|
72
|
-
/**
|
|
73
|
-
* Get behavior for a trait instance and capability.
|
|
74
|
-
*
|
|
75
|
-
* Called by capability-dispatch actions to find the right behavior.
|
|
76
|
-
*
|
|
77
|
-
* @param trait - The trait instance
|
|
78
|
-
* @param capability - The action ID
|
|
79
|
-
* @returns The behavior, or undefined if not registered
|
|
80
|
-
*/
|
|
81
|
-
export declare function getBehaviorForCapability(trait: ITrait, capability: string): CapabilityBehavior | undefined;
|
|
82
|
-
/**
|
|
83
|
-
* Get the full binding for a trait instance and capability.
|
|
84
|
-
*
|
|
85
|
-
* Includes priority and configuration overrides. Used by dispatch helper
|
|
86
|
-
* for resolution logic.
|
|
87
|
-
*
|
|
88
|
-
* @param trait - The trait instance
|
|
89
|
-
* @param capability - The action ID
|
|
90
|
-
* @returns The binding, or undefined if not registered
|
|
91
|
-
*/
|
|
92
|
-
export declare function getBehaviorBinding(trait: ITrait, capability: string): TraitBehaviorBinding | undefined;
|
|
93
|
-
/**
|
|
94
|
-
* Check if a behavior is registered for a trait+capability.
|
|
95
|
-
*
|
|
96
|
-
* @param traitType - The trait type identifier
|
|
97
|
-
* @param capability - The action ID
|
|
98
|
-
*/
|
|
99
|
-
export declare function hasCapabilityBehavior(traitType: string, capability: string): boolean;
|
|
100
|
-
/**
|
|
101
|
-
* Unregister a behavior (primarily for testing).
|
|
102
|
-
*
|
|
103
|
-
* @param traitType - The trait type identifier
|
|
104
|
-
* @param capability - The action ID
|
|
105
|
-
*/
|
|
106
|
-
export declare function unregisterCapabilityBehavior(traitType: string, capability: string): void;
|
|
107
|
-
/**
|
|
108
|
-
* Clear all registered behaviors (for testing).
|
|
109
|
-
*/
|
|
110
|
-
export declare function clearCapabilityRegistry(): void;
|
|
111
|
-
/**
|
|
112
|
-
* Get all registered bindings (for debugging/introspection).
|
|
113
|
-
*/
|
|
114
|
-
export declare function getAllCapabilityBindings(): Map<string, TraitBehaviorBinding>;
|
|
115
|
-
//# sourceMappingURL=capability-registry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capability-registry.d.ts","sourceRoot":"","sources":["../../../../../../../repos/sharpee_v2/packages/world-model/src/capabilities/capability-registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAqB,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE7E;;GAEG;AACH,MAAM,WAAW,2BAA2B,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACpE,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,4CAA4C;IA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,EAAE,MAAM,GAAG,IAAI,CAExF;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAE5E"}
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Capability Registry (ADR-090)
|
|
4
|
-
*
|
|
5
|
-
* Registry for trait-behavior bindings. Stories register behaviors
|
|
6
|
-
* for their traits, and the dispatch system looks them up at runtime.
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.registerCapabilityBehavior = registerCapabilityBehavior;
|
|
10
|
-
exports.getBehaviorForCapability = getBehaviorForCapability;
|
|
11
|
-
exports.getBehaviorBinding = getBehaviorBinding;
|
|
12
|
-
exports.hasCapabilityBehavior = hasCapabilityBehavior;
|
|
13
|
-
exports.unregisterCapabilityBehavior = unregisterCapabilityBehavior;
|
|
14
|
-
exports.clearCapabilityRegistry = clearCapabilityRegistry;
|
|
15
|
-
exports.getAllCapabilityBindings = getAllCapabilityBindings;
|
|
16
|
-
/**
|
|
17
|
-
* Registry storage: key = `${traitType}:${capability}`
|
|
18
|
-
* Uses globalThis to ensure the registry is shared across module boundaries
|
|
19
|
-
* (e.g., when story modules import from packages but actions run from bundle)
|
|
20
|
-
*/
|
|
21
|
-
const CAPABILITY_REGISTRY_KEY = '__sharpee_capability_behaviors__';
|
|
22
|
-
function getCapabilityRegistry() {
|
|
23
|
-
const global = globalThis;
|
|
24
|
-
if (!global[CAPABILITY_REGISTRY_KEY]) {
|
|
25
|
-
global[CAPABILITY_REGISTRY_KEY] = new Map();
|
|
26
|
-
}
|
|
27
|
-
return global[CAPABILITY_REGISTRY_KEY];
|
|
28
|
-
}
|
|
29
|
-
const behaviorRegistry = {
|
|
30
|
-
get size() { return getCapabilityRegistry().size; },
|
|
31
|
-
has(key) { return getCapabilityRegistry().has(key); },
|
|
32
|
-
get(key) { return getCapabilityRegistry().get(key); },
|
|
33
|
-
set(key, value) { return getCapabilityRegistry().set(key, value); },
|
|
34
|
-
delete(key) { return getCapabilityRegistry().delete(key); },
|
|
35
|
-
clear() { return getCapabilityRegistry().clear(); },
|
|
36
|
-
keys() { return getCapabilityRegistry().keys(); },
|
|
37
|
-
values() { return getCapabilityRegistry().values(); },
|
|
38
|
-
entries() { return getCapabilityRegistry().entries(); },
|
|
39
|
-
[Symbol.iterator]() { return getCapabilityRegistry()[Symbol.iterator](); }
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Generate registry key for trait+capability combination.
|
|
43
|
-
*/
|
|
44
|
-
function registryKey(traitType, capability) {
|
|
45
|
-
return `${traitType}:${capability}`;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Register a behavior for a trait+capability combination.
|
|
49
|
-
*
|
|
50
|
-
* Stories call this to register their behaviors during initialization.
|
|
51
|
-
* Each trait+capability pair can only have one behavior registered.
|
|
52
|
-
*
|
|
53
|
-
* @param traitType - The trait type identifier (e.g., 'dungeo.trait.basket_elevator')
|
|
54
|
-
* @param capability - The action ID (e.g., 'if.action.lowering')
|
|
55
|
-
* @param behavior - The behavior implementation
|
|
56
|
-
* @param options - Optional configuration (priority, resolution override, mode override)
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```typescript
|
|
60
|
-
* // Basic registration (uses global defaults)
|
|
61
|
-
* registerCapabilityBehavior(
|
|
62
|
-
* BasketElevatorTrait.type,
|
|
63
|
-
* 'if.action.lowering',
|
|
64
|
-
* BasketLoweringBehavior
|
|
65
|
-
* );
|
|
66
|
-
*
|
|
67
|
-
* // With priority and overrides
|
|
68
|
-
* registerCapabilityBehavior(
|
|
69
|
-
* TrollAxeTrait.type,
|
|
70
|
-
* 'if.action.taking',
|
|
71
|
-
* TrollAxeTakingBehavior,
|
|
72
|
-
* { priority: 100, resolution: 'any-blocks' }
|
|
73
|
-
* );
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
function registerCapabilityBehavior(traitType, capability, behavior, options) {
|
|
77
|
-
const key = registryKey(traitType, capability);
|
|
78
|
-
if (behaviorRegistry.has(key)) {
|
|
79
|
-
throw new Error(`Behavior already registered for trait "${traitType}" and capability "${capability}"`);
|
|
80
|
-
}
|
|
81
|
-
behaviorRegistry.set(key, {
|
|
82
|
-
traitType,
|
|
83
|
-
capability,
|
|
84
|
-
behavior,
|
|
85
|
-
priority: options?.priority ?? 0,
|
|
86
|
-
resolution: options?.resolution,
|
|
87
|
-
mode: options?.mode,
|
|
88
|
-
validateBinding: options?.validateBinding
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Get behavior for a trait instance and capability.
|
|
93
|
-
*
|
|
94
|
-
* Called by capability-dispatch actions to find the right behavior.
|
|
95
|
-
*
|
|
96
|
-
* @param trait - The trait instance
|
|
97
|
-
* @param capability - The action ID
|
|
98
|
-
* @returns The behavior, or undefined if not registered
|
|
99
|
-
*/
|
|
100
|
-
function getBehaviorForCapability(trait, capability) {
|
|
101
|
-
const binding = getBehaviorBinding(trait, capability);
|
|
102
|
-
return binding?.behavior;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Get the full binding for a trait instance and capability.
|
|
106
|
-
*
|
|
107
|
-
* Includes priority and configuration overrides. Used by dispatch helper
|
|
108
|
-
* for resolution logic.
|
|
109
|
-
*
|
|
110
|
-
* @param trait - The trait instance
|
|
111
|
-
* @param capability - The action ID
|
|
112
|
-
* @returns The binding, or undefined if not registered
|
|
113
|
-
*/
|
|
114
|
-
function getBehaviorBinding(trait, capability) {
|
|
115
|
-
const traitType = trait.constructor.type;
|
|
116
|
-
const key = registryKey(traitType, capability);
|
|
117
|
-
const binding = behaviorRegistry.get(key);
|
|
118
|
-
if (!binding) {
|
|
119
|
-
return undefined;
|
|
120
|
-
}
|
|
121
|
-
// Runtime validation if provided
|
|
122
|
-
if (binding.validateBinding && !binding.validateBinding(trait)) {
|
|
123
|
-
throw new Error(`Behavior validation failed for trait "${traitType}", capability "${capability}"`);
|
|
124
|
-
}
|
|
125
|
-
return binding;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Check if a behavior is registered for a trait+capability.
|
|
129
|
-
*
|
|
130
|
-
* @param traitType - The trait type identifier
|
|
131
|
-
* @param capability - The action ID
|
|
132
|
-
*/
|
|
133
|
-
function hasCapabilityBehavior(traitType, capability) {
|
|
134
|
-
return behaviorRegistry.has(registryKey(traitType, capability));
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Unregister a behavior (primarily for testing).
|
|
138
|
-
*
|
|
139
|
-
* @param traitType - The trait type identifier
|
|
140
|
-
* @param capability - The action ID
|
|
141
|
-
*/
|
|
142
|
-
function unregisterCapabilityBehavior(traitType, capability) {
|
|
143
|
-
behaviorRegistry.delete(registryKey(traitType, capability));
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Clear all registered behaviors (for testing).
|
|
147
|
-
*/
|
|
148
|
-
function clearCapabilityRegistry() {
|
|
149
|
-
behaviorRegistry.clear();
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Get all registered bindings (for debugging/introspection).
|
|
153
|
-
*/
|
|
154
|
-
function getAllCapabilityBindings() {
|
|
155
|
-
return new Map(getCapabilityRegistry());
|
|
156
|
-
}
|
|
157
|
-
//# sourceMappingURL=capability-registry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capability-registry.js","sourceRoot":"","sources":["../../../../../../../repos/sharpee_v2/packages/world-model/src/capabilities/capability-registry.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAwGH,gEAuBC;AAWD,4DAMC;AAYD,gDAoBC;AAQD,sDAEC;AAQD,oEAEC;AAKD,0DAEC;AAKD,4DAEC;AA1KD;;;;GAIG;AACH,MAAM,uBAAuB,GAAG,kCAAkC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ACjC,IAAI,OAAO,CAAC,eAAe,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/D,MAAM,IAAI,KAAK,CACb,yCAAyC,SAAS,kBAAkB,UAAU,GAAG,CAClF,CAAC;IACJ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;GAKG;AACH,SAAgB,qBAAqB,CAAC,SAAiB,EAAE,UAAkB;IACzE,OAAO,gBAAgB,CAAC,GAAG,CAAC,WAAW,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAClE,CAAC;AAED;;;;;GAKG;AACH,SAAgB,4BAA4B,CAAC,SAAiB,EAAE,UAAkB;IAChF,gBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED;;GAEG;AACH,SAAgB,uBAAuB;IACrC,gBAAgB,CAAC,KAAK,EAAE,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,SAAgB,wBAAwB;IACtC,OAAO,IAAI,GAAG,CAAC,qBAAqB,EAAE,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interceptor Registry (ADR-118)
|
|
3
|
-
*
|
|
4
|
-
* Registry for trait-interceptor bindings. Stories register interceptors
|
|
5
|
-
* for their traits, and stdlib actions look them up at runtime.
|
|
6
|
-
*
|
|
7
|
-
* Mirrors capability-registry.ts pattern but for interceptors instead
|
|
8
|
-
* of full-delegation behaviors.
|
|
9
|
-
*/
|
|
10
|
-
import { ITrait } from '../traits/trait';
|
|
11
|
-
import { ActionInterceptor } from './action-interceptor';
|
|
12
|
-
/**
|
|
13
|
-
* Options for registering an action interceptor.
|
|
14
|
-
*/
|
|
15
|
-
export interface InterceptorRegistrationOptions {
|
|
16
|
-
/** Priority for resolution (higher = checked first). Default: 0 */
|
|
17
|
-
priority?: number;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Binding between a trait type, action, and interceptor.
|
|
21
|
-
*/
|
|
22
|
-
export interface TraitInterceptorBinding {
|
|
23
|
-
/** Trait type identifier */
|
|
24
|
-
traitType: string;
|
|
25
|
-
/** Action ID this interceptor handles */
|
|
26
|
-
actionId: string;
|
|
27
|
-
/** The interceptor that handles this trait+action */
|
|
28
|
-
interceptor: ActionInterceptor;
|
|
29
|
-
/** Priority for resolution (higher = checked first) */
|
|
30
|
-
priority: number;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Register an interceptor for a trait+action combination.
|
|
34
|
-
*
|
|
35
|
-
* Stories call this to register their interceptors during initialization.
|
|
36
|
-
* Each trait+action pair can only have one interceptor registered.
|
|
37
|
-
*
|
|
38
|
-
* @param traitType - The trait type identifier (e.g., 'dungeo.trait.inflatable')
|
|
39
|
-
* @param actionId - The action ID (e.g., 'if.action.entering')
|
|
40
|
-
* @param interceptor - The interceptor implementation
|
|
41
|
-
* @param options - Optional configuration (priority)
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* ```typescript
|
|
45
|
-
* // Register boat puncture interceptor
|
|
46
|
-
* registerActionInterceptor(
|
|
47
|
-
* InflatableTrait.type,
|
|
48
|
-
* 'if.action.entering',
|
|
49
|
-
* InflatableEnteringInterceptor
|
|
50
|
-
* );
|
|
51
|
-
*
|
|
52
|
-
* // With priority
|
|
53
|
-
* registerActionInterceptor(
|
|
54
|
-
* TrollGuardianTrait.type,
|
|
55
|
-
* 'if.action.going',
|
|
56
|
-
* TrollGoingInterceptor,
|
|
57
|
-
* { priority: 100 }
|
|
58
|
-
* );
|
|
59
|
-
* ```
|
|
60
|
-
*/
|
|
61
|
-
export declare function registerActionInterceptor(traitType: string, actionId: string, interceptor: ActionInterceptor, options?: InterceptorRegistrationOptions): void;
|
|
62
|
-
/**
|
|
63
|
-
* Result from looking up an interceptor for an entity+action.
|
|
64
|
-
*/
|
|
65
|
-
export interface InterceptorLookupResult {
|
|
66
|
-
/** The interceptor */
|
|
67
|
-
interceptor: ActionInterceptor;
|
|
68
|
-
/** The trait that declared this interceptor */
|
|
69
|
-
trait: ITrait;
|
|
70
|
-
/** The binding metadata */
|
|
71
|
-
binding: TraitInterceptorBinding;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Get interceptor for an entity and action.
|
|
75
|
-
*
|
|
76
|
-
* Finds a trait on the entity that has an interceptor registered for
|
|
77
|
-
* the given action. Looks up by trait type string in the registry.
|
|
78
|
-
*
|
|
79
|
-
* @param entity - The entity to check
|
|
80
|
-
* @param actionId - The action ID
|
|
81
|
-
* @returns The interceptor and trait, or undefined if not found
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```typescript
|
|
85
|
-
* const result = getInterceptorForAction(boat, 'if.action.entering');
|
|
86
|
-
* if (result) {
|
|
87
|
-
* const { interceptor, trait, binding } = result;
|
|
88
|
-
* // Call interceptor hooks during action execution
|
|
89
|
-
* }
|
|
90
|
-
* ```
|
|
91
|
-
*/
|
|
92
|
-
export declare function getInterceptorForAction(entity: {
|
|
93
|
-
traits: Map<string, ITrait>;
|
|
94
|
-
}, actionId: string): InterceptorLookupResult | undefined;
|
|
95
|
-
/**
|
|
96
|
-
* Get the interceptor binding for a trait type and action.
|
|
97
|
-
*
|
|
98
|
-
* @param traitType - The trait type identifier
|
|
99
|
-
* @param actionId - The action ID
|
|
100
|
-
* @returns The binding, or undefined if not registered
|
|
101
|
-
*/
|
|
102
|
-
export declare function getInterceptorBinding(traitType: string, actionId: string): TraitInterceptorBinding | undefined;
|
|
103
|
-
/**
|
|
104
|
-
* Check if an interceptor is registered for a trait+action.
|
|
105
|
-
*
|
|
106
|
-
* @param traitType - The trait type identifier
|
|
107
|
-
* @param actionId - The action ID
|
|
108
|
-
*/
|
|
109
|
-
export declare function hasActionInterceptor(traitType: string, actionId: string): boolean;
|
|
110
|
-
/**
|
|
111
|
-
* Unregister an interceptor (primarily for testing).
|
|
112
|
-
*
|
|
113
|
-
* @param traitType - The trait type identifier
|
|
114
|
-
* @param actionId - The action ID
|
|
115
|
-
*/
|
|
116
|
-
export declare function unregisterActionInterceptor(traitType: string, actionId: string): void;
|
|
117
|
-
/**
|
|
118
|
-
* Clear all registered interceptors (for testing).
|
|
119
|
-
*/
|
|
120
|
-
export declare function clearInterceptorRegistry(): void;
|
|
121
|
-
/**
|
|
122
|
-
* Get all registered interceptor bindings (for debugging/introspection).
|
|
123
|
-
*/
|
|
124
|
-
export declare function getAllInterceptorBindings(): Map<string, TraitInterceptorBinding>;
|
|
125
|
-
//# sourceMappingURL=interceptor-registry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interceptor-registry.d.ts","sourceRoot":"","sources":["../../../../../../../repos/sharpee_v2/packages/world-model/src/capabilities/interceptor-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,EAAqB,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,WAAW,EAAE,iBAAiB,CAAC;IAC/B,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAuCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,iBAAiB,EAC9B,OAAO,CAAC,EAAE,8BAA8B,GACvC,IAAI,CAeN;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,sBAAsB;IACtB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,OAAO,EAAE,uBAAuB,CAAC;CAClC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE;IAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,EACvC,QAAQ,EAAE,MAAM,GACf,uBAAuB,GAAG,SAAS,CA4BrC;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GACf,uBAAuB,GAAG,SAAS,CAErC;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEjF;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAErF;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,GAAG,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAEhF"}
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Interceptor Registry (ADR-118)
|
|
4
|
-
*
|
|
5
|
-
* Registry for trait-interceptor bindings. Stories register interceptors
|
|
6
|
-
* for their traits, and stdlib actions look them up at runtime.
|
|
7
|
-
*
|
|
8
|
-
* Mirrors capability-registry.ts pattern but for interceptors instead
|
|
9
|
-
* of full-delegation behaviors.
|
|
10
|
-
*/
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.registerActionInterceptor = registerActionInterceptor;
|
|
13
|
-
exports.getInterceptorForAction = getInterceptorForAction;
|
|
14
|
-
exports.getInterceptorBinding = getInterceptorBinding;
|
|
15
|
-
exports.hasActionInterceptor = hasActionInterceptor;
|
|
16
|
-
exports.unregisterActionInterceptor = unregisterActionInterceptor;
|
|
17
|
-
exports.clearInterceptorRegistry = clearInterceptorRegistry;
|
|
18
|
-
exports.getAllInterceptorBindings = getAllInterceptorBindings;
|
|
19
|
-
/**
|
|
20
|
-
* Registry storage: key = `${traitType}:${actionId}`
|
|
21
|
-
* Uses globalThis to ensure the registry is shared across module boundaries
|
|
22
|
-
* (e.g., when story modules import from packages but actions run from bundle)
|
|
23
|
-
*/
|
|
24
|
-
const INTERCEPTOR_REGISTRY_KEY = '__sharpee_interceptor_registry__';
|
|
25
|
-
// Use globalThis to share registry across module instances
|
|
26
|
-
function getInterceptorRegistry() {
|
|
27
|
-
const global = globalThis;
|
|
28
|
-
if (!global[INTERCEPTOR_REGISTRY_KEY]) {
|
|
29
|
-
global[INTERCEPTOR_REGISTRY_KEY] = new Map();
|
|
30
|
-
}
|
|
31
|
-
return global[INTERCEPTOR_REGISTRY_KEY];
|
|
32
|
-
}
|
|
33
|
-
// For backwards compatibility, expose as const (but delegates to globalThis)
|
|
34
|
-
const interceptorRegistry = {
|
|
35
|
-
get size() { return getInterceptorRegistry().size; },
|
|
36
|
-
has(key) { return getInterceptorRegistry().has(key); },
|
|
37
|
-
get(key) { return getInterceptorRegistry().get(key); },
|
|
38
|
-
set(key, value) { return getInterceptorRegistry().set(key, value); },
|
|
39
|
-
delete(key) { return getInterceptorRegistry().delete(key); },
|
|
40
|
-
clear() { return getInterceptorRegistry().clear(); },
|
|
41
|
-
keys() { return getInterceptorRegistry().keys(); },
|
|
42
|
-
values() { return getInterceptorRegistry().values(); },
|
|
43
|
-
entries() { return getInterceptorRegistry().entries(); },
|
|
44
|
-
[Symbol.iterator]() { return getInterceptorRegistry()[Symbol.iterator](); }
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Generate registry key for trait+action combination.
|
|
48
|
-
*/
|
|
49
|
-
function registryKey(traitType, actionId) {
|
|
50
|
-
return `${traitType}:${actionId}`;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Register an interceptor for a trait+action combination.
|
|
54
|
-
*
|
|
55
|
-
* Stories call this to register their interceptors during initialization.
|
|
56
|
-
* Each trait+action pair can only have one interceptor registered.
|
|
57
|
-
*
|
|
58
|
-
* @param traitType - The trait type identifier (e.g., 'dungeo.trait.inflatable')
|
|
59
|
-
* @param actionId - The action ID (e.g., 'if.action.entering')
|
|
60
|
-
* @param interceptor - The interceptor implementation
|
|
61
|
-
* @param options - Optional configuration (priority)
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```typescript
|
|
65
|
-
* // Register boat puncture interceptor
|
|
66
|
-
* registerActionInterceptor(
|
|
67
|
-
* InflatableTrait.type,
|
|
68
|
-
* 'if.action.entering',
|
|
69
|
-
* InflatableEnteringInterceptor
|
|
70
|
-
* );
|
|
71
|
-
*
|
|
72
|
-
* // With priority
|
|
73
|
-
* registerActionInterceptor(
|
|
74
|
-
* TrollGuardianTrait.type,
|
|
75
|
-
* 'if.action.going',
|
|
76
|
-
* TrollGoingInterceptor,
|
|
77
|
-
* { priority: 100 }
|
|
78
|
-
* );
|
|
79
|
-
* ```
|
|
80
|
-
*/
|
|
81
|
-
function registerActionInterceptor(traitType, actionId, interceptor, options) {
|
|
82
|
-
const key = registryKey(traitType, actionId);
|
|
83
|
-
if (interceptorRegistry.has(key)) {
|
|
84
|
-
throw new Error(`Interceptor already registered for trait "${traitType}" and action "${actionId}"`);
|
|
85
|
-
}
|
|
86
|
-
interceptorRegistry.set(key, {
|
|
87
|
-
traitType,
|
|
88
|
-
actionId,
|
|
89
|
-
interceptor,
|
|
90
|
-
priority: options?.priority ?? 0
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Get interceptor for an entity and action.
|
|
95
|
-
*
|
|
96
|
-
* Finds a trait on the entity that has an interceptor registered for
|
|
97
|
-
* the given action. Looks up by trait type string in the registry.
|
|
98
|
-
*
|
|
99
|
-
* @param entity - The entity to check
|
|
100
|
-
* @param actionId - The action ID
|
|
101
|
-
* @returns The interceptor and trait, or undefined if not found
|
|
102
|
-
*
|
|
103
|
-
* @example
|
|
104
|
-
* ```typescript
|
|
105
|
-
* const result = getInterceptorForAction(boat, 'if.action.entering');
|
|
106
|
-
* if (result) {
|
|
107
|
-
* const { interceptor, trait, binding } = result;
|
|
108
|
-
* // Call interceptor hooks during action execution
|
|
109
|
-
* }
|
|
110
|
-
* ```
|
|
111
|
-
*/
|
|
112
|
-
function getInterceptorForAction(entity, actionId) {
|
|
113
|
-
// Find all traits that have an interceptor registered for this action
|
|
114
|
-
const candidates = [];
|
|
115
|
-
for (const trait of entity.traits.values()) {
|
|
116
|
-
// Look up interceptor by trait type string (more reliable than static property)
|
|
117
|
-
const traitType = trait.type;
|
|
118
|
-
const key = registryKey(traitType, actionId);
|
|
119
|
-
const binding = interceptorRegistry.get(key);
|
|
120
|
-
if (binding) {
|
|
121
|
-
candidates.push({ trait, binding });
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
if (candidates.length === 0) {
|
|
125
|
-
return undefined;
|
|
126
|
-
}
|
|
127
|
-
// Sort by priority (highest first) and return the first one
|
|
128
|
-
candidates.sort((a, b) => b.binding.priority - a.binding.priority);
|
|
129
|
-
const { trait, binding } = candidates[0];
|
|
130
|
-
return {
|
|
131
|
-
interceptor: binding.interceptor,
|
|
132
|
-
trait,
|
|
133
|
-
binding
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Get the interceptor binding for a trait type and action.
|
|
138
|
-
*
|
|
139
|
-
* @param traitType - The trait type identifier
|
|
140
|
-
* @param actionId - The action ID
|
|
141
|
-
* @returns The binding, or undefined if not registered
|
|
142
|
-
*/
|
|
143
|
-
function getInterceptorBinding(traitType, actionId) {
|
|
144
|
-
return interceptorRegistry.get(registryKey(traitType, actionId));
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Check if an interceptor is registered for a trait+action.
|
|
148
|
-
*
|
|
149
|
-
* @param traitType - The trait type identifier
|
|
150
|
-
* @param actionId - The action ID
|
|
151
|
-
*/
|
|
152
|
-
function hasActionInterceptor(traitType, actionId) {
|
|
153
|
-
return interceptorRegistry.has(registryKey(traitType, actionId));
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Unregister an interceptor (primarily for testing).
|
|
157
|
-
*
|
|
158
|
-
* @param traitType - The trait type identifier
|
|
159
|
-
* @param actionId - The action ID
|
|
160
|
-
*/
|
|
161
|
-
function unregisterActionInterceptor(traitType, actionId) {
|
|
162
|
-
interceptorRegistry.delete(registryKey(traitType, actionId));
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Clear all registered interceptors (for testing).
|
|
166
|
-
*/
|
|
167
|
-
function clearInterceptorRegistry() {
|
|
168
|
-
interceptorRegistry.clear();
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Get all registered interceptor bindings (for debugging/introspection).
|
|
172
|
-
*/
|
|
173
|
-
function getAllInterceptorBindings() {
|
|
174
|
-
return new Map(interceptorRegistry);
|
|
175
|
-
}
|
|
176
|
-
//# sourceMappingURL=interceptor-registry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interceptor-registry.js","sourceRoot":"","sources":["../../../../../../../repos/sharpee_v2/packages/world-model/src/capabilities/interceptor-registry.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AA6FH,8DAoBC;AAiCD,0DA+BC;AASD,sDAKC;AAQD,oDAEC;AAQD,kEAEC;AAKD,4DAEC;AAKD,8DAEC;AAtMD;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,kCAAkC,CAAC;AAEpE,2DAA2D;AAC3D,SAAS,sBAAsB;IAC7B,MAAM,MAAM,GAAG,UAAqC,CAAC;IACrD,IAAI,CAAC,MAAM,CAAC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