@pie-players/pie-assessment-toolkit 0.3.44 → 0.3.45
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 +54 -69
- package/dist/components/ItemToolBar.custom-element.js +479 -324
- package/dist/components/PieAssessmentToolkit.custom-element.js +19498 -3590
- package/dist/components/SectionToolBar.custom-element.js +761 -507
- package/dist/index.d.ts +3 -6
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/policy/core/ToolPolicyEngine.d.ts +1 -2
- package/dist/policy/core/ToolPolicyEngine.js +1 -2
- package/dist/policy/core/ToolPolicyEngine.js.map +1 -1
- package/dist/policy/core/pnp-policy-inputs.d.ts +2 -3
- package/dist/policy/core/pnp-policy-inputs.js +2 -3
- package/dist/policy/core/pnp-policy-inputs.js.map +1 -1
- package/dist/policy/core/provenance.d.ts +7 -34
- package/dist/policy/core/provenance.js +4 -21
- package/dist/policy/core/provenance.js.map +1 -1
- package/dist/policy/sources/PnpPolicySource.d.ts +6 -19
- package/dist/policy/sources/PnpPolicySource.js +6 -19
- package/dist/policy/sources/PnpPolicySource.js.map +1 -1
- package/dist/runtime/SectionRuntimeEngine.d.ts +13 -28
- package/dist/runtime/SectionRuntimeEngine.js +13 -27
- package/dist/runtime/SectionRuntimeEngine.js.map +1 -1
- package/dist/runtime/adapter/SectionEngineAdapter.d.ts +2 -2
- package/dist/runtime/adapter/SectionEngineAdapter.js +2 -2
- package/dist/runtime/adapter/SectionEngineAdapter.js.map +1 -1
- package/dist/runtime/adapter/coordinator-bridge.d.ts +1 -1
- package/dist/runtime/adapter/coordinator-bridge.js +1 -1
- package/dist/runtime/adapter/coordinator-bridge.js.map +1 -1
- package/dist/runtime/adapter/dom-event-bridge.d.ts +1 -1
- package/dist/runtime/adapter/dom-event-bridge.js +1 -1
- package/dist/runtime/adapter/dom-event-bridge.js.map +1 -1
- package/dist/runtime/catalog-registration.d.ts +12 -0
- package/dist/runtime/catalog-registration.js +54 -0
- package/dist/runtime/catalog-registration.js.map +1 -0
- package/dist/runtime/core/engine-output.d.ts +2 -2
- package/dist/runtime/core/engine-output.js +2 -2
- package/dist/runtime/core/engine-output.js.map +1 -1
- package/dist/runtime/core/engine-readiness.d.ts +2 -2
- package/dist/runtime/core/engine-readiness.js.map +1 -1
- package/dist/runtime/core/engine-resolver.d.ts +13 -41
- package/dist/runtime/core/engine-resolver.js +19 -76
- package/dist/runtime/core/engine-resolver.js.map +1 -1
- package/dist/runtime/core/engine-transition.d.ts +1 -1
- package/dist/runtime/core/engine-transition.js +1 -1
- package/dist/runtime/core/engine-transition.js.map +1 -1
- package/dist/runtime/engine.d.ts +1 -1
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/section-runtime-engine-host-context.d.ts +22 -15
- package/dist/runtime/section-runtime-engine-host-context.js +10 -10
- package/dist/runtime/section-runtime-engine-host-context.js.map +1 -1
- package/dist/runtime/stage-emit-gate.d.ts +4 -4
- package/dist/runtime/stage-emit-gate.js +3 -3
- package/dist/runtime/stage-emit-gate.js.map +1 -1
- package/dist/services/AccessibilityCatalogResolver.d.ts +23 -0
- package/dist/services/AccessibilityCatalogResolver.js +200 -28
- package/dist/services/AccessibilityCatalogResolver.js.map +1 -1
- package/dist/services/HighlightCoordinator.d.ts +25 -0
- package/dist/services/HighlightCoordinator.js +125 -0
- package/dist/services/HighlightCoordinator.js.map +1 -1
- package/dist/services/SSMLExtractor.d.ts +16 -1
- package/dist/services/SSMLExtractor.js +86 -7
- package/dist/services/SSMLExtractor.js.map +1 -1
- package/dist/services/TTSService.d.ts +30 -4
- package/dist/services/TTSService.js +652 -159
- package/dist/services/TTSService.js.map +1 -1
- package/dist/services/ToolRegistry.d.ts +2 -2
- package/dist/services/ToolRegistry.js +1 -1
- package/dist/services/ToolRegistry.js.map +1 -1
- package/dist/services/ToolkitCoordinator.d.ts +16 -73
- package/dist/services/ToolkitCoordinator.js +34 -113
- package/dist/services/ToolkitCoordinator.js.map +1 -1
- package/dist/services/interfaces.d.ts +20 -2
- package/dist/services/interfaces.js.map +1 -1
- package/dist/services/tool-config-validation.d.ts +1 -1
- package/dist/services/tool-config-validation.js +7 -7
- package/dist/services/tool-config-validation.js.map +1 -1
- package/dist/services/tool-instance-id.js +1 -1
- package/dist/services/tool-instance-id.js.map +1 -1
- package/dist/services/tool-providers/TTSToolProvider.js +3 -3
- package/dist/services/tool-providers/TTSToolProvider.js.map +1 -1
- package/dist/services/tools-config-normalizer.d.ts +13 -2
- package/dist/services/tools-config-normalizer.js +3 -8
- package/dist/services/tools-config-normalizer.js.map +1 -1
- package/dist/services/tts/browser-provider.js +2 -0
- package/dist/services/tts/browser-provider.js.map +1 -1
- package/dist/services/tts/catalog-span-alignment.d.ts +39 -0
- package/dist/services/tts/catalog-span-alignment.js +300 -0
- package/dist/services/tts/catalog-span-alignment.js.map +1 -0
- package/dist/services/tts/generated-speech/assemble-plan.d.ts +33 -0
- package/dist/services/tts/generated-speech/assemble-plan.js +111 -0
- package/dist/services/tts/generated-speech/assemble-plan.js.map +1 -0
- package/dist/services/tts/generated-speech/dom/build-dom-plan.d.ts +25 -0
- package/dist/services/tts/generated-speech/dom/build-dom-plan.js +66 -0
- package/dist/services/tts/generated-speech/dom/build-dom-plan.js.map +1 -0
- package/dist/services/tts/generated-speech/dom/to-chunk-inputs.d.ts +19 -0
- package/dist/services/tts/generated-speech/dom/to-chunk-inputs.js +71 -0
- package/dist/services/tts/generated-speech/dom/to-chunk-inputs.js.map +1 -0
- package/dist/services/tts/generated-speech/dom/types.d.ts +37 -0
- package/dist/services/tts/generated-speech/dom/types.js +2 -0
- package/dist/services/tts/generated-speech/dom/types.js.map +1 -0
- package/dist/services/tts/generated-speech/index.d.ts +17 -0
- package/dist/services/tts/generated-speech/index.js +17 -0
- package/dist/services/tts/generated-speech/index.js.map +1 -0
- package/dist/services/tts/generated-speech/math-speech-cache.d.ts +15 -0
- package/dist/services/tts/generated-speech/math-speech-cache.js +78 -0
- package/dist/services/tts/generated-speech/math-speech-cache.js.map +1 -0
- package/dist/services/tts/generated-speech/types.d.ts +104 -0
- package/dist/services/tts/generated-speech/types.js +18 -0
- package/dist/services/tts/generated-speech/types.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/boundary-normalizer.d.ts +2 -0
- package/dist/services/tts/highlight-pipeline/boundary-normalizer.js +106 -0
- package/dist/services/tts/highlight-pipeline/boundary-normalizer.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/create-highlight-plan.d.ts +6 -0
- package/dist/services/tts/highlight-pipeline/create-highlight-plan.js +217 -0
- package/dist/services/tts/highlight-pipeline/create-highlight-plan.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/highlight-policy.d.ts +2 -0
- package/dist/services/tts/highlight-pipeline/highlight-policy.js +32 -0
- package/dist/services/tts/highlight-pipeline/highlight-policy.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/index.d.ts +9 -0
- package/dist/services/tts/highlight-pipeline/index.js +9 -0
- package/dist/services/tts/highlight-pipeline/index.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/math-semantic-resolver.d.ts +3 -0
- package/dist/services/tts/highlight-pipeline/math-semantic-resolver.js +32 -0
- package/dist/services/tts/highlight-pipeline/math-semantic-resolver.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/normalize-speech-chunks.d.ts +29 -0
- package/dist/services/tts/highlight-pipeline/normalize-speech-chunks.js +44 -0
- package/dist/services/tts/highlight-pipeline/normalize-speech-chunks.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/prose-boundary-resolver.d.ts +2 -0
- package/dist/services/tts/highlight-pipeline/prose-boundary-resolver.js +20 -0
- package/dist/services/tts/highlight-pipeline/prose-boundary-resolver.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/readable-region.d.ts +1 -0
- package/dist/services/tts/highlight-pipeline/readable-region.js +19 -0
- package/dist/services/tts/highlight-pipeline/readable-region.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/rendered-math-target-resolver.d.ts +6 -0
- package/dist/services/tts/highlight-pipeline/rendered-math-target-resolver.js +198 -0
- package/dist/services/tts/highlight-pipeline/rendered-math-target-resolver.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/types.d.ts +72 -0
- package/dist/services/tts/highlight-pipeline/types.js +2 -0
- package/dist/services/tts/highlight-pipeline/types.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/visible-map-range.d.ts +2 -0
- package/dist/services/tts/highlight-pipeline/visible-map-range.js +22 -0
- package/dist/services/tts/highlight-pipeline/visible-map-range.js.map +1 -0
- package/dist/services/tts/math-alignment/index.d.ts +30 -0
- package/dist/services/tts/math-alignment/index.js +66 -0
- package/dist/services/tts/math-alignment/index.js.map +1 -0
- package/dist/services/tts/math-alignment/mathml-tokenizer.d.ts +2 -0
- package/dist/services/tts/math-alignment/mathml-tokenizer.js +317 -0
- package/dist/services/tts/math-alignment/mathml-tokenizer.js.map +1 -0
- package/dist/services/tts/math-alignment/range-resolver.d.ts +10 -0
- package/dist/services/tts/math-alignment/range-resolver.js +13 -0
- package/dist/services/tts/math-alignment/range-resolver.js.map +1 -0
- package/dist/services/tts/math-alignment/sequence-aligner.d.ts +7 -0
- package/dist/services/tts/math-alignment/sequence-aligner.js +119 -0
- package/dist/services/tts/math-alignment/sequence-aligner.js.map +1 -0
- package/dist/services/tts/math-alignment/speech-tokenizer.d.ts +31 -0
- package/dist/services/tts/math-alignment/speech-tokenizer.js +143 -0
- package/dist/services/tts/math-alignment/speech-tokenizer.js.map +1 -0
- package/dist/services/tts/math-alignment/types.d.ts +58 -0
- package/dist/services/tts/math-alignment/types.js +2 -0
- package/dist/services/tts/math-alignment/types.js.map +1 -0
- package/dist/services/tts/math-aware-text-processing.d.ts +18 -0
- package/dist/services/tts/math-aware-text-processing.js +348 -0
- package/dist/services/tts/math-aware-text-processing.js.map +1 -0
- package/dist/services/tts/math-speech.d.ts +44 -0
- package/dist/services/tts/math-speech.js +147 -0
- package/dist/services/tts/math-speech.js.map +1 -0
- package/dist/services/tts/mathml-sanitization.d.ts +1 -0
- package/dist/services/tts/mathml-sanitization.js +170 -0
- package/dist/services/tts/mathml-sanitization.js.map +1 -0
- package/dist/services/tts/ssml/spoken-text.d.ts +33 -0
- package/dist/services/tts/ssml/spoken-text.js +159 -0
- package/dist/services/tts/ssml/spoken-text.js.map +1 -0
- package/dist/services/tts/text-processing.d.ts +3 -0
- package/dist/services/tts/text-processing.js +30 -4
- package/dist/services/tts/text-processing.js.map +1 -1
- package/dist/services/tts-runtime-config.d.ts +17 -1
- package/dist/services/tts-runtime-config.js +11 -1
- package/dist/services/tts-runtime-config.js.map +1 -1
- package/dist/tools/registrations/accessibility-tools.js +0 -1
- package/dist/tools/registrations/accessibility-tools.js.map +1 -1
- package/dist/tools/registrations/calculator.js +41 -2
- package/dist/tools/registrations/calculator.js.map +1 -1
- package/dist/tools/tool-tag-map.js +0 -1
- package/dist/tools/tool-tag-map.js.map +1 -1
- package/package.json +8 -11
- package/dist/services/PNPToolResolver.d.ts +0 -280
- package/dist/services/PNPToolResolver.js +0 -514
- package/dist/services/PNPToolResolver.js.map +0 -1
- package/dist/services/pnp-provenance.d.ts +0 -166
- package/dist/services/pnp-provenance.js +0 -231
- package/dist/services/pnp-provenance.js.map +0 -1
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PNP Tool Resolver
|
|
3
|
-
*
|
|
4
|
-
* Resolves tool availability from QTI 3.0 Personal Needs Profile (PNP) and
|
|
5
|
-
* assessment settings. Implements a precedence hierarchy for tool configuration
|
|
6
|
-
* based on common assessment platform governance patterns.
|
|
7
|
-
*
|
|
8
|
-
* PRECEDENCE HIERARCHY (highest to lowest):
|
|
9
|
-
* ==========================================
|
|
10
|
-
*
|
|
11
|
-
* Standards-Based (QTI 3.0):
|
|
12
|
-
* - PNP supports (#6): Student's documented accessibility needs (accessibilityInfo.accessFeature)
|
|
13
|
-
* - Item-level settings (#3, #4): Per-item accessibility requirements/restrictions
|
|
14
|
-
*
|
|
15
|
-
* Implementation-Specific (Common Practice):
|
|
16
|
-
* - District policy (#1, #5): Institutional governance and legal compliance
|
|
17
|
-
* - Test administration (#2): Session-level operational control
|
|
18
|
-
*
|
|
19
|
-
* The hierarchy itself is NOT defined by QTI 3.0 standards but follows common
|
|
20
|
-
* patterns in K-12 assessment platforms, aligning with US IEP/504 accommodation
|
|
21
|
-
* hierarchies where legal requirements and institutional policies take precedence.
|
|
22
|
-
*
|
|
23
|
-
* Precedence Order:
|
|
24
|
-
* 1. District block (absolute veto) - Legal/policy requirements
|
|
25
|
-
* 2. Test administration override - Proctor/administrator operational control
|
|
26
|
-
* 3. Item restriction (per-item block) - Content author can disable for specific items
|
|
27
|
-
* 4. Item requirement (forces enable) - Required by IEP/504 or content needs
|
|
28
|
-
* 5. District requirement - Institutional accessibility requirements
|
|
29
|
-
* 6. PNP supports (student needs) - QTI 3.0 standard student preferences
|
|
30
|
-
*
|
|
31
|
-
* Governance Context:
|
|
32
|
-
* - Institutional veto (district) trumps individual preferences (legal compliance)
|
|
33
|
-
* - Session control (test admin) enables operational flexibility
|
|
34
|
-
* - Content restrictions (item) prevent tools that invalidate assessment
|
|
35
|
-
* - Required accommodations (IEP/504) ensure legal compliance
|
|
36
|
-
* - Student preferences (PNP) are honored when not overridden
|
|
37
|
-
*
|
|
38
|
-
* References:
|
|
39
|
-
* - QTI 3.0: https://www.imsglobal.org/spec/qti/v3p0
|
|
40
|
-
* - IMS AfA 3.0: https://www.imsglobal.org/spec/afa/v3p0
|
|
41
|
-
* - Common assessment platform governance patterns (not standardized)
|
|
42
|
-
*
|
|
43
|
-
* Part of PIE Assessment Toolkit.
|
|
44
|
-
*/
|
|
45
|
-
import type { AssessmentEntity, AssessmentItemRef, PersonalNeedsProfile } from "@pie-players/pie-players-shared/types";
|
|
46
|
-
import type { ToolRegistry } from "./ToolRegistry.js";
|
|
47
|
-
import { type PnpResolutionProvenance } from "./pnp-provenance.js";
|
|
48
|
-
/**
|
|
49
|
-
* Resolved tool configuration with source tracking
|
|
50
|
-
*/
|
|
51
|
-
export interface ResolvedToolConfig {
|
|
52
|
-
id: string;
|
|
53
|
-
enabled: boolean;
|
|
54
|
-
required?: boolean;
|
|
55
|
-
alwaysAvailable?: boolean;
|
|
56
|
-
settings?: any;
|
|
57
|
-
source: "district" | "item" | "pnp" | "settings";
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Resolution result with provenance tracking
|
|
61
|
-
*/
|
|
62
|
-
export interface ToolResolutionResult {
|
|
63
|
-
/** Resolved tool configurations */
|
|
64
|
-
tools: ResolvedToolConfig[];
|
|
65
|
-
/** Complete provenance trail (for debugging/display) */
|
|
66
|
-
provenance: PnpResolutionProvenance;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Resolves tool availability from QTI 3.0 assessment structure
|
|
70
|
-
*/
|
|
71
|
-
export declare class PnpToolResolver {
|
|
72
|
-
private toolRegistry;
|
|
73
|
-
private enableProvenance;
|
|
74
|
-
/**
|
|
75
|
-
* Create a PnpToolResolver
|
|
76
|
-
*
|
|
77
|
-
* @param toolRegistry Tool registry for PNP support mapping
|
|
78
|
-
* @param enableProvenance Enable detailed provenance tracking (default: true)
|
|
79
|
-
*/
|
|
80
|
-
constructor(toolRegistry: ToolRegistry, enableProvenance?: boolean);
|
|
81
|
-
/**
|
|
82
|
-
* Resolve all tools from QTI 3.0 assessment + optional item context
|
|
83
|
-
*
|
|
84
|
-
* @param assessment QTI 3.0 assessment with personalNeedsProfile
|
|
85
|
-
* @param currentItemRef Current item for item-specific requirements (optional)
|
|
86
|
-
* @returns Array of resolved tool configurations
|
|
87
|
-
*
|
|
88
|
-
* @example
|
|
89
|
-
* const resolver = new PnpToolResolver(registry);
|
|
90
|
-
* const tools = resolver.resolveTools(assessment, itemRef);
|
|
91
|
-
* tools.forEach(tool => {
|
|
92
|
-
* console.log(`${tool.id}: ${tool.enabled ? 'enabled' : 'disabled'}`);
|
|
93
|
-
* });
|
|
94
|
-
*/
|
|
95
|
-
resolveTools(assessment: AssessmentEntity, currentItemRef?: AssessmentItemRef): ResolvedToolConfig[];
|
|
96
|
-
/**
|
|
97
|
-
* Resolve all tools with full provenance tracking
|
|
98
|
-
*
|
|
99
|
-
* Returns both resolved tools and complete provenance trail showing:
|
|
100
|
-
* - All configuration sources consulted
|
|
101
|
-
* - Decision steps at each precedence level
|
|
102
|
-
* - Reasons for enabling/blocking each feature
|
|
103
|
-
* - Human-readable explanations
|
|
104
|
-
*
|
|
105
|
-
* @param assessment QTI 3.0 assessment with personalNeedsProfile
|
|
106
|
-
* @param currentItemRef Current item for item-specific requirements (optional)
|
|
107
|
-
* @returns Resolution result with tools and provenance
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* const resolver = new PnpToolResolver(registry);
|
|
111
|
-
* const result = resolver.resolveToolsWithProvenance(assessment, itemRef);
|
|
112
|
-
*
|
|
113
|
-
* // Use resolved tools
|
|
114
|
-
* result.tools.forEach(tool => console.log(tool.id, tool.enabled));
|
|
115
|
-
*
|
|
116
|
-
* // Display provenance to user
|
|
117
|
-
* console.log(result.provenance.summary);
|
|
118
|
-
* result.provenance.features.forEach((trail, featureId) => {
|
|
119
|
-
* console.log(`${featureId}: ${trail.explanation}`);
|
|
120
|
-
* });
|
|
121
|
-
*/
|
|
122
|
-
resolveToolsWithProvenance(assessment: AssessmentEntity, currentItemRef?: AssessmentItemRef): ToolResolutionResult;
|
|
123
|
-
/**
|
|
124
|
-
* Resolve availability of a single PNP support
|
|
125
|
-
*
|
|
126
|
-
* Applies precedence rules to determine if support should be enabled.
|
|
127
|
-
*
|
|
128
|
-
* @param supportId PNP support identifier
|
|
129
|
-
* @param context Resolution context with all configuration sources
|
|
130
|
-
* @param provenanceBuilder Provenance tracking (optional)
|
|
131
|
-
* @returns Resolved config or null if blocked/disabled
|
|
132
|
-
*/
|
|
133
|
-
private resolveSupport;
|
|
134
|
-
/**
|
|
135
|
-
* Create empty provenance when tracking is disabled
|
|
136
|
-
*/
|
|
137
|
-
private createEmptyProvenance;
|
|
138
|
-
/**
|
|
139
|
-
* Build resolved tool configuration
|
|
140
|
-
*
|
|
141
|
-
* Maps PNP support ID to PIE tool ID and merges tool-specific settings.
|
|
142
|
-
*
|
|
143
|
-
* @param supportId PNP support identifier
|
|
144
|
-
* @param context Resolution context for settings lookup
|
|
145
|
-
* @param flags Availability flags (required, alwaysAvailable, source)
|
|
146
|
-
* @returns Complete resolved tool configuration
|
|
147
|
-
*/
|
|
148
|
-
private buildToolConfig;
|
|
149
|
-
/**
|
|
150
|
-
* Check if a specific tool is enabled
|
|
151
|
-
*
|
|
152
|
-
* @param toolId Toolkit tool identifier (e.g., 'calculator')
|
|
153
|
-
* @param assessment Assessment with PNP
|
|
154
|
-
* @param itemRef Optional item context
|
|
155
|
-
* @returns true if tool is enabled
|
|
156
|
-
*/
|
|
157
|
-
isToolEnabled(toolId: string, assessment: AssessmentEntity, itemRef?: AssessmentItemRef): boolean;
|
|
158
|
-
/**
|
|
159
|
-
* Check if a tool is required (cannot be disabled)
|
|
160
|
-
*
|
|
161
|
-
* @param toolId Toolkit tool identifier
|
|
162
|
-
* @param assessment Assessment with PNP
|
|
163
|
-
* @param itemRef Optional item context
|
|
164
|
-
* @returns true if tool is required or always available
|
|
165
|
-
*/
|
|
166
|
-
isToolRequired(toolId: string, assessment: AssessmentEntity, itemRef?: AssessmentItemRef): boolean;
|
|
167
|
-
/**
|
|
168
|
-
* Get list of auto-activate tools from PNP
|
|
169
|
-
*
|
|
170
|
-
* Returns PIE tool IDs that should be automatically opened/activated
|
|
171
|
-
* when the assessment starts, based on PNP activateAtInit field.
|
|
172
|
-
*
|
|
173
|
-
* @param assessment Assessment with PNP
|
|
174
|
-
* @returns Array of PIE tool IDs to auto-activate
|
|
175
|
-
*
|
|
176
|
-
* @example
|
|
177
|
-
* const autoActivate = resolver.getAutoActivateTools(assessment);
|
|
178
|
-
* // Returns: ['textToSpeech', 'lineReader']
|
|
179
|
-
*/
|
|
180
|
-
getAutoActivateTools(assessment: AssessmentEntity): string[];
|
|
181
|
-
/**
|
|
182
|
-
* Get all enabled tools
|
|
183
|
-
*
|
|
184
|
-
* @param assessment Assessment with PNP
|
|
185
|
-
* @param itemRef Optional item context
|
|
186
|
-
* @returns Array of PIE tool IDs that are enabled
|
|
187
|
-
*/
|
|
188
|
-
getEnabledTools(assessment: AssessmentEntity, itemRef?: AssessmentItemRef): string[];
|
|
189
|
-
/**
|
|
190
|
-
* Get allowed tool IDs (Pass 1 of two-pass visibility model)
|
|
191
|
-
*
|
|
192
|
-
* Returns tool IDs that pass orchestrator-level checks (PNP + policies + settings).
|
|
193
|
-
* This is the first gate - tools still need to pass Pass 2 (relevance check).
|
|
194
|
-
*
|
|
195
|
-
* This is the primary method to use with ToolRegistry.filterVisibleInContext()
|
|
196
|
-
*
|
|
197
|
-
* @param assessment Assessment with PNP
|
|
198
|
-
* @param itemRef Optional item context
|
|
199
|
-
* @returns Array of allowed tool IDs (Pass 1)
|
|
200
|
-
*
|
|
201
|
-
* @example
|
|
202
|
-
* // Two-pass visibility model
|
|
203
|
-
* const allowedToolIds = resolver.getAllowedToolIds(assessment, itemRef);
|
|
204
|
-
* const visibleTools = toolRegistry.filterVisibleInContext(allowedToolIds, context);
|
|
205
|
-
*/
|
|
206
|
-
getAllowedToolIds(assessment: AssessmentEntity, itemRef?: AssessmentItemRef): string[];
|
|
207
|
-
/**
|
|
208
|
-
* Resolve tools with a test/override PNP profile
|
|
209
|
-
*
|
|
210
|
-
* FOR TESTING/DEVELOPMENT ONLY
|
|
211
|
-
*
|
|
212
|
-
* Allows direct injection of a PNP profile for testing accessibility configurations
|
|
213
|
-
* without modifying the assessment entity. The override profile replaces the
|
|
214
|
-
* assessment's personalNeedsProfile entirely.
|
|
215
|
-
*
|
|
216
|
-
* Use cases:
|
|
217
|
-
* - Development/testing UI for trying different profiles
|
|
218
|
-
* - Automated testing with various accessibility configurations
|
|
219
|
-
* - Preview tools with profile simulation
|
|
220
|
-
* - Accessibility team testing and validation
|
|
221
|
-
*
|
|
222
|
-
* @param assessment Base assessment (settings, policies, etc.)
|
|
223
|
-
* @param overrideProfile PNP profile to inject (replaces assessment.personalNeedsProfile)
|
|
224
|
-
* @param itemRef Optional item context
|
|
225
|
-
* @returns Resolution result with tools and provenance
|
|
226
|
-
*
|
|
227
|
-
* @example
|
|
228
|
-
* // Test with low vision profile
|
|
229
|
-
* const testProfile = {
|
|
230
|
-
* supports: ['magnification', 'textToSpeech', 'highContrastDisplay']
|
|
231
|
-
* };
|
|
232
|
-
* const result = resolver.resolveWithOverride(assessment, testProfile);
|
|
233
|
-
*
|
|
234
|
-
* @example
|
|
235
|
-
* // Test with null profile (no accessibility features)
|
|
236
|
-
* const result = resolver.resolveWithOverride(assessment, null);
|
|
237
|
-
*/
|
|
238
|
-
resolveWithOverride(assessment: AssessmentEntity, overrideProfile: PersonalNeedsProfile | null, itemRef?: AssessmentItemRef): ToolResolutionResult;
|
|
239
|
-
/**
|
|
240
|
-
* Get allowed tool IDs with full provenance tracking
|
|
241
|
-
*
|
|
242
|
-
* Returns both tool IDs and complete resolution provenance for debugging,
|
|
243
|
-
* auditing, and displaying to users.
|
|
244
|
-
*
|
|
245
|
-
* @param assessment Assessment with PNP
|
|
246
|
-
* @param itemRef Optional item context
|
|
247
|
-
* @returns Object with tool IDs and provenance
|
|
248
|
-
*
|
|
249
|
-
* @example
|
|
250
|
-
* const result = resolver.getAllowedToolIdsWithProvenance(assessment, itemRef);
|
|
251
|
-
*
|
|
252
|
-
* // Use tool IDs
|
|
253
|
-
* const visibleTools = toolRegistry.filterVisibleInContext(result.toolIds, context);
|
|
254
|
-
*
|
|
255
|
-
* // Display provenance to user
|
|
256
|
-
* console.log('Resolution Summary:', result.provenance.summary);
|
|
257
|
-
* console.log('Explanation for calculator:', result.provenance.features.get('calculator')?.explanation);
|
|
258
|
-
*/
|
|
259
|
-
getAllowedToolIdsWithProvenance(assessment: AssessmentEntity, itemRef?: AssessmentItemRef): {
|
|
260
|
-
toolIds: string[];
|
|
261
|
-
provenance: PnpResolutionProvenance;
|
|
262
|
-
};
|
|
263
|
-
/**
|
|
264
|
-
* Get all required tools
|
|
265
|
-
*
|
|
266
|
-
* @param assessment Assessment with PNP
|
|
267
|
-
* @param itemRef Optional item context
|
|
268
|
-
* @returns Array of PIE tool IDs that are required
|
|
269
|
-
*/
|
|
270
|
-
getRequiredTools(assessment: AssessmentEntity, itemRef?: AssessmentItemRef): string[];
|
|
271
|
-
/**
|
|
272
|
-
* Get tool configuration settings
|
|
273
|
-
*
|
|
274
|
-
* @param toolId Toolkit tool identifier
|
|
275
|
-
* @param assessment Assessment with PNP
|
|
276
|
-
* @param itemRef Optional item context
|
|
277
|
-
* @returns Tool-specific settings or null if not found
|
|
278
|
-
*/
|
|
279
|
-
getToolSettings(toolId: string, assessment: AssessmentEntity, itemRef?: AssessmentItemRef): any | null;
|
|
280
|
-
}
|