agentic-qe 2.8.0 → 2.8.2
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/CHANGELOG.md +148 -0
- package/README.md +1 -1
- package/dist/agents/BaseAgent.d.ts +329 -0
- package/dist/agents/BaseAgent.d.ts.map +1 -1
- package/dist/agents/BaseAgent.js +657 -0
- package/dist/agents/BaseAgent.js.map +1 -1
- package/dist/cli/commands/supabase/index.d.ts +20 -0
- package/dist/cli/commands/supabase/index.d.ts.map +1 -0
- package/dist/cli/commands/supabase/index.js +632 -0
- package/dist/cli/commands/supabase/index.js.map +1 -0
- package/dist/cli/index.js +3 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/code-intelligence/embeddings/EmbeddingCacheFactory.d.ts +135 -0
- package/dist/code-intelligence/embeddings/EmbeddingCacheFactory.d.ts.map +1 -0
- package/dist/code-intelligence/embeddings/EmbeddingCacheFactory.js +301 -0
- package/dist/code-intelligence/embeddings/EmbeddingCacheFactory.js.map +1 -0
- package/dist/code-intelligence/embeddings/NomicEmbedder.d.ts +78 -6
- package/dist/code-intelligence/embeddings/NomicEmbedder.d.ts.map +1 -1
- package/dist/code-intelligence/embeddings/NomicEmbedder.js +162 -21
- package/dist/code-intelligence/embeddings/NomicEmbedder.js.map +1 -1
- package/dist/code-intelligence/embeddings/backends/MemoryBackend.d.ts +59 -0
- package/dist/code-intelligence/embeddings/backends/MemoryBackend.d.ts.map +1 -0
- package/dist/code-intelligence/embeddings/backends/MemoryBackend.js +173 -0
- package/dist/code-intelligence/embeddings/backends/MemoryBackend.js.map +1 -0
- package/dist/code-intelligence/embeddings/backends/RedisBackend.d.ts +50 -0
- package/dist/code-intelligence/embeddings/backends/RedisBackend.d.ts.map +1 -0
- package/dist/code-intelligence/embeddings/backends/RedisBackend.js +279 -0
- package/dist/code-intelligence/embeddings/backends/RedisBackend.js.map +1 -0
- package/dist/code-intelligence/embeddings/backends/SQLiteBackend.d.ts +64 -0
- package/dist/code-intelligence/embeddings/backends/SQLiteBackend.d.ts.map +1 -0
- package/dist/code-intelligence/embeddings/backends/SQLiteBackend.js +314 -0
- package/dist/code-intelligence/embeddings/backends/SQLiteBackend.js.map +1 -0
- package/dist/code-intelligence/embeddings/backends/index.d.ts +16 -0
- package/dist/code-intelligence/embeddings/backends/index.d.ts.map +1 -0
- package/dist/code-intelligence/embeddings/backends/index.js +28 -0
- package/dist/code-intelligence/embeddings/backends/index.js.map +1 -0
- package/dist/code-intelligence/embeddings/backends/types.d.ts +177 -0
- package/dist/code-intelligence/embeddings/backends/types.d.ts.map +1 -0
- package/dist/code-intelligence/embeddings/backends/types.js +30 -0
- package/dist/code-intelligence/embeddings/backends/types.js.map +1 -0
- package/dist/code-intelligence/embeddings/index.d.ts +7 -0
- package/dist/code-intelligence/embeddings/index.d.ts.map +1 -1
- package/dist/code-intelligence/embeddings/index.js +16 -1
- package/dist/code-intelligence/embeddings/index.js.map +1 -1
- package/dist/core/memory/HNSWVectorMemory.js +1 -1
- package/dist/infrastructure/index.d.ts +15 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +44 -0
- package/dist/infrastructure/index.js.map +1 -0
- package/dist/infrastructure/network/AgentRateLimiter.d.ts +59 -0
- package/dist/infrastructure/network/AgentRateLimiter.d.ts.map +1 -0
- package/dist/infrastructure/network/AgentRateLimiter.js +186 -0
- package/dist/infrastructure/network/AgentRateLimiter.js.map +1 -0
- package/dist/infrastructure/network/AuditLogger.d.ts +102 -0
- package/dist/infrastructure/network/AuditLogger.d.ts.map +1 -0
- package/dist/infrastructure/network/AuditLogger.js +284 -0
- package/dist/infrastructure/network/AuditLogger.js.map +1 -0
- package/dist/infrastructure/network/DomainWhitelist.d.ts +111 -0
- package/dist/infrastructure/network/DomainWhitelist.d.ts.map +1 -0
- package/dist/infrastructure/network/DomainWhitelist.js +216 -0
- package/dist/infrastructure/network/DomainWhitelist.js.map +1 -0
- package/dist/infrastructure/network/NetworkPolicyManager.d.ts +97 -0
- package/dist/infrastructure/network/NetworkPolicyManager.d.ts.map +1 -0
- package/dist/infrastructure/network/NetworkPolicyManager.js +309 -0
- package/dist/infrastructure/network/NetworkPolicyManager.js.map +1 -0
- package/dist/infrastructure/network/index.d.ts +19 -0
- package/dist/infrastructure/network/index.d.ts.map +1 -0
- package/dist/infrastructure/network/index.js +46 -0
- package/dist/infrastructure/network/index.js.map +1 -0
- package/dist/infrastructure/network/policies/default-policies.d.ts +78 -0
- package/dist/infrastructure/network/policies/default-policies.d.ts.map +1 -0
- package/dist/infrastructure/network/policies/default-policies.js +312 -0
- package/dist/infrastructure/network/policies/default-policies.js.map +1 -0
- package/dist/infrastructure/network/types.d.ts +214 -0
- package/dist/infrastructure/network/types.d.ts.map +1 -0
- package/dist/infrastructure/network/types.js +25 -0
- package/dist/infrastructure/network/types.js.map +1 -0
- package/dist/infrastructure/sandbox/ResourceMonitor.d.ts +124 -0
- package/dist/infrastructure/sandbox/ResourceMonitor.d.ts.map +1 -0
- package/dist/infrastructure/sandbox/ResourceMonitor.js +305 -0
- package/dist/infrastructure/sandbox/ResourceMonitor.js.map +1 -0
- package/dist/infrastructure/sandbox/SandboxManager.d.ts +122 -0
- package/dist/infrastructure/sandbox/SandboxManager.d.ts.map +1 -0
- package/dist/infrastructure/sandbox/SandboxManager.js +527 -0
- package/dist/infrastructure/sandbox/SandboxManager.js.map +1 -0
- package/dist/infrastructure/sandbox/index.d.ts +18 -0
- package/dist/infrastructure/sandbox/index.d.ts.map +1 -0
- package/dist/infrastructure/sandbox/index.js +38 -0
- package/dist/infrastructure/sandbox/index.js.map +1 -0
- package/dist/infrastructure/sandbox/profiles/agent-profiles.d.ts +53 -0
- package/dist/infrastructure/sandbox/profiles/agent-profiles.d.ts.map +1 -0
- package/dist/infrastructure/sandbox/profiles/agent-profiles.js +433 -0
- package/dist/infrastructure/sandbox/profiles/agent-profiles.js.map +1 -0
- package/dist/infrastructure/sandbox/types.d.ts +227 -0
- package/dist/infrastructure/sandbox/types.d.ts.map +1 -0
- package/dist/infrastructure/sandbox/types.js +63 -0
- package/dist/infrastructure/sandbox/types.js.map +1 -0
- package/dist/mcp/handlers/NewDomainToolsHandler.d.ts +8 -8
- package/dist/mcp/handlers/NewDomainToolsHandler.d.ts.map +1 -1
- package/dist/mcp/handlers/NewDomainToolsHandler.js.map +1 -1
- package/dist/mcp/handlers/ruvector/RuVectorHandler.d.ts +54 -0
- package/dist/mcp/handlers/ruvector/RuVectorHandler.d.ts.map +1 -0
- package/dist/mcp/handlers/ruvector/RuVectorHandler.js +325 -0
- package/dist/mcp/handlers/ruvector/RuVectorHandler.js.map +1 -0
- package/dist/mcp/handlers/ruvector/index.d.ts +5 -0
- package/dist/mcp/handlers/ruvector/index.d.ts.map +1 -0
- package/dist/mcp/handlers/ruvector/index.js +9 -0
- package/dist/mcp/handlers/ruvector/index.js.map +1 -0
- package/dist/mcp/server-instructions.d.ts +1 -1
- package/dist/mcp/server-instructions.js +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +100 -22
- package/dist/mcp/server.js.map +1 -1
- package/dist/nervous-system/adapters/BTSPAdapter.d.ts +342 -0
- package/dist/nervous-system/adapters/BTSPAdapter.d.ts.map +1 -0
- package/dist/nervous-system/adapters/BTSPAdapter.js +494 -0
- package/dist/nervous-system/adapters/BTSPAdapter.js.map +1 -0
- package/dist/nervous-system/adapters/CircadianController.d.ts +560 -0
- package/dist/nervous-system/adapters/CircadianController.d.ts.map +1 -0
- package/dist/nervous-system/adapters/CircadianController.js +882 -0
- package/dist/nervous-system/adapters/CircadianController.js.map +1 -0
- package/dist/nervous-system/adapters/GlobalWorkspaceAdapter.d.ts +337 -0
- package/dist/nervous-system/adapters/GlobalWorkspaceAdapter.d.ts.map +1 -0
- package/dist/nervous-system/adapters/GlobalWorkspaceAdapter.js +532 -0
- package/dist/nervous-system/adapters/GlobalWorkspaceAdapter.js.map +1 -0
- package/dist/nervous-system/adapters/HdcMemoryAdapter.d.ts +444 -0
- package/dist/nervous-system/adapters/HdcMemoryAdapter.d.ts.map +1 -0
- package/dist/nervous-system/adapters/HdcMemoryAdapter.js +715 -0
- package/dist/nervous-system/adapters/HdcMemoryAdapter.js.map +1 -0
- package/dist/nervous-system/adapters/ReflexLayer.d.ts +231 -0
- package/dist/nervous-system/adapters/ReflexLayer.d.ts.map +1 -0
- package/dist/nervous-system/adapters/ReflexLayer.js +309 -0
- package/dist/nervous-system/adapters/ReflexLayer.js.map +1 -0
- package/dist/nervous-system/index.d.ts +25 -0
- package/dist/nervous-system/index.d.ts.map +1 -0
- package/dist/nervous-system/index.js +80 -0
- package/dist/nervous-system/index.js.map +1 -0
- package/dist/nervous-system/integration/BTSPLearningEngine.d.ts +266 -0
- package/dist/nervous-system/integration/BTSPLearningEngine.d.ts.map +1 -0
- package/dist/nervous-system/integration/BTSPLearningEngine.js +587 -0
- package/dist/nervous-system/integration/BTSPLearningEngine.js.map +1 -0
- package/dist/nervous-system/integration/CircadianAgent.d.ts +389 -0
- package/dist/nervous-system/integration/CircadianAgent.d.ts.map +1 -0
- package/dist/nervous-system/integration/CircadianAgent.js +696 -0
- package/dist/nervous-system/integration/CircadianAgent.js.map +1 -0
- package/dist/nervous-system/integration/HybridPatternStore.d.ts +244 -0
- package/dist/nervous-system/integration/HybridPatternStore.d.ts.map +1 -0
- package/dist/nervous-system/integration/HybridPatternStore.js +622 -0
- package/dist/nervous-system/integration/HybridPatternStore.js.map +1 -0
- package/dist/nervous-system/integration/NervousSystemEnhancement.d.ts +459 -0
- package/dist/nervous-system/integration/NervousSystemEnhancement.d.ts.map +1 -0
- package/dist/nervous-system/integration/NervousSystemEnhancement.js +921 -0
- package/dist/nervous-system/integration/NervousSystemEnhancement.js.map +1 -0
- package/dist/nervous-system/integration/WorkspaceAgent.d.ts +398 -0
- package/dist/nervous-system/integration/WorkspaceAgent.d.ts.map +1 -0
- package/dist/nervous-system/integration/WorkspaceAgent.js +722 -0
- package/dist/nervous-system/integration/WorkspaceAgent.js.map +1 -0
- package/dist/nervous-system/integration/index.d.ts +22 -0
- package/dist/nervous-system/integration/index.d.ts.map +1 -0
- package/dist/nervous-system/integration/index.js +44 -0
- package/dist/nervous-system/integration/index.js.map +1 -0
- package/dist/nervous-system/persistence/BTSPSerializer.d.ts +96 -0
- package/dist/nervous-system/persistence/BTSPSerializer.d.ts.map +1 -0
- package/dist/nervous-system/persistence/BTSPSerializer.js +223 -0
- package/dist/nervous-system/persistence/BTSPSerializer.js.map +1 -0
- package/dist/nervous-system/persistence/CircadianSerializer.d.ts +90 -0
- package/dist/nervous-system/persistence/CircadianSerializer.d.ts.map +1 -0
- package/dist/nervous-system/persistence/CircadianSerializer.js +239 -0
- package/dist/nervous-system/persistence/CircadianSerializer.js.map +1 -0
- package/dist/nervous-system/persistence/HdcSerializer.d.ts +100 -0
- package/dist/nervous-system/persistence/HdcSerializer.d.ts.map +1 -0
- package/dist/nervous-system/persistence/HdcSerializer.js +259 -0
- package/dist/nervous-system/persistence/HdcSerializer.js.map +1 -0
- package/dist/nervous-system/persistence/INervousSystemStore.d.ts +208 -0
- package/dist/nervous-system/persistence/INervousSystemStore.d.ts.map +1 -0
- package/dist/nervous-system/persistence/INervousSystemStore.js +11 -0
- package/dist/nervous-system/persistence/INervousSystemStore.js.map +1 -0
- package/dist/nervous-system/persistence/NervousSystemPersistenceManager.d.ts +187 -0
- package/dist/nervous-system/persistence/NervousSystemPersistenceManager.d.ts.map +1 -0
- package/dist/nervous-system/persistence/NervousSystemPersistenceManager.js +411 -0
- package/dist/nervous-system/persistence/NervousSystemPersistenceManager.js.map +1 -0
- package/dist/nervous-system/persistence/SQLiteNervousSystemStore.d.ts +98 -0
- package/dist/nervous-system/persistence/SQLiteNervousSystemStore.d.ts.map +1 -0
- package/dist/nervous-system/persistence/SQLiteNervousSystemStore.js +510 -0
- package/dist/nervous-system/persistence/SQLiteNervousSystemStore.js.map +1 -0
- package/dist/nervous-system/persistence/index.d.ts +22 -0
- package/dist/nervous-system/persistence/index.d.ts.map +1 -0
- package/dist/nervous-system/persistence/index.js +45 -0
- package/dist/nervous-system/persistence/index.js.map +1 -0
- package/dist/nervous-system/wasm-loader.d.ts +52 -0
- package/dist/nervous-system/wasm-loader.d.ts.map +1 -0
- package/dist/nervous-system/wasm-loader.js +188 -0
- package/dist/nervous-system/wasm-loader.js.map +1 -0
- package/dist/persistence/HybridPersistenceProvider.d.ts +184 -0
- package/dist/persistence/HybridPersistenceProvider.d.ts.map +1 -0
- package/dist/persistence/HybridPersistenceProvider.js +1086 -0
- package/dist/persistence/HybridPersistenceProvider.js.map +1 -0
- package/dist/persistence/IPersistenceProvider.d.ts +657 -0
- package/dist/persistence/IPersistenceProvider.d.ts.map +1 -0
- package/dist/persistence/IPersistenceProvider.js +11 -0
- package/dist/persistence/IPersistenceProvider.js.map +1 -0
- package/dist/persistence/SupabaseConfig.d.ts +176 -0
- package/dist/persistence/SupabaseConfig.d.ts.map +1 -0
- package/dist/persistence/SupabaseConfig.js +277 -0
- package/dist/persistence/SupabaseConfig.js.map +1 -0
- package/dist/persistence/SupabasePersistenceProvider.d.ts +143 -0
- package/dist/persistence/SupabasePersistenceProvider.d.ts.map +1 -0
- package/dist/persistence/SupabasePersistenceProvider.js +959 -0
- package/dist/persistence/SupabasePersistenceProvider.js.map +1 -0
- package/dist/persistence/adapters/CodeIntelligenceSyncAdapter.d.ts +213 -0
- package/dist/persistence/adapters/CodeIntelligenceSyncAdapter.d.ts.map +1 -0
- package/dist/persistence/adapters/CodeIntelligenceSyncAdapter.js +468 -0
- package/dist/persistence/adapters/CodeIntelligenceSyncAdapter.js.map +1 -0
- package/dist/persistence/adapters/MemorySyncAdapter.d.ts +115 -0
- package/dist/persistence/adapters/MemorySyncAdapter.d.ts.map +1 -0
- package/dist/persistence/adapters/MemorySyncAdapter.js +291 -0
- package/dist/persistence/adapters/MemorySyncAdapter.js.map +1 -0
- package/dist/persistence/adapters/index.d.ts +11 -0
- package/dist/persistence/adapters/index.d.ts.map +1 -0
- package/dist/persistence/adapters/index.js +20 -0
- package/dist/persistence/adapters/index.js.map +1 -0
- package/dist/persistence/index.d.ts +14 -0
- package/dist/persistence/index.d.ts.map +1 -1
- package/dist/persistence/index.js +36 -1
- package/dist/persistence/index.js.map +1 -1
- package/package.json +7 -1
|
@@ -0,0 +1,560 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CircadianController - Bio-inspired 4-phase duty cycling for compute efficiency
|
|
3
|
+
*
|
|
4
|
+
* Implements circadian rhythm patterns for AI agents to achieve 5-50x compute savings
|
|
5
|
+
* by intelligently cycling between active and rest phases. Based on biological
|
|
6
|
+
* circadian rhythms that regulate activity levels in living organisms.
|
|
7
|
+
*
|
|
8
|
+
* ## WASM Integration
|
|
9
|
+
* This controller uses the Winner-Take-All (WTA) layer from @ruvector/nervous-system-wasm
|
|
10
|
+
* for biologically-plausible phase selection. The WTA mechanism implements lateral
|
|
11
|
+
* inhibition where phases compete for activation - only one phase can be "active"
|
|
12
|
+
* (winning) at any time, similar to how neural populations compete in biological
|
|
13
|
+
* circadian nuclei like the suprachiasmatic nucleus (SCN).
|
|
14
|
+
*
|
|
15
|
+
* **Current WASM Usage:**
|
|
16
|
+
* - WTALayer: Phase competition and selection via lateral inhibition (compete() method)
|
|
17
|
+
* - Hypervector: Available for future phase state encoding enhancements
|
|
18
|
+
*
|
|
19
|
+
* **Future WASM Enhancements:**
|
|
20
|
+
* When a dedicated circadian oscillator WASM component becomes available
|
|
21
|
+
* (e.g., Kuramoto oscillators, suprachiasmatic nucleus models), it should replace
|
|
22
|
+
* the current time-based phase calculation with true oscillator dynamics.
|
|
23
|
+
*
|
|
24
|
+
* ## Phases
|
|
25
|
+
* - **Active**: Full compute, run tests, make decisions, process requests
|
|
26
|
+
* - **Dawn**: Ramping up, pre-fetch likely patterns, warm caches
|
|
27
|
+
* - **Dusk**: Ramping down, process backlog, prepare reports, batch operations
|
|
28
|
+
* - **Rest**: Memory consolidation, cleanup, minimal compute, only critical reactions
|
|
29
|
+
*
|
|
30
|
+
* ## Compute Savings
|
|
31
|
+
* The duty factor represents the fraction of full compute being used:
|
|
32
|
+
* - Active: 1.0 (100%)
|
|
33
|
+
* - Dawn: 0.6 (60%)
|
|
34
|
+
* - Dusk: 0.4 (40%)
|
|
35
|
+
* - Rest: 0.1 (10%)
|
|
36
|
+
*
|
|
37
|
+
* Average duty factor with default phase durations: ~0.52 (48% savings)
|
|
38
|
+
* Best case with extended rest: ~0.20 (80% savings, 5x reduction)
|
|
39
|
+
*
|
|
40
|
+
* @module nervous-system/adapters/CircadianController
|
|
41
|
+
* @version 2.0.0
|
|
42
|
+
*/
|
|
43
|
+
/**
|
|
44
|
+
* The four circadian phases representing different activity levels
|
|
45
|
+
*/
|
|
46
|
+
export type CircadianPhase = 'Active' | 'Dawn' | 'Dusk' | 'Rest';
|
|
47
|
+
/**
|
|
48
|
+
* Configuration for individual phase behavior
|
|
49
|
+
*/
|
|
50
|
+
export interface PhaseConfig {
|
|
51
|
+
/** Duration as a fraction of the total cycle (0-1, must sum to 1.0) */
|
|
52
|
+
duration: number;
|
|
53
|
+
/** Duty factor during this phase (0-1, where 1 = full compute) */
|
|
54
|
+
dutyFactor: number;
|
|
55
|
+
/** Minimum importance level to react to events (0-1) */
|
|
56
|
+
importanceThreshold: number;
|
|
57
|
+
/** Whether learning/model updates are allowed */
|
|
58
|
+
allowLearning: boolean;
|
|
59
|
+
/** Whether memory consolidation should run */
|
|
60
|
+
allowConsolidation: boolean;
|
|
61
|
+
/** Whether full compute (inference, tests) should run */
|
|
62
|
+
allowCompute: boolean;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* External modulation to adjust circadian behavior
|
|
66
|
+
*/
|
|
67
|
+
export interface CircadianModulation {
|
|
68
|
+
/** Multiplier for importance threshold (>1 = less reactive, <1 = more reactive) */
|
|
69
|
+
importanceMultiplier?: number;
|
|
70
|
+
/** Override phase (force a specific phase) */
|
|
71
|
+
forcePhase?: CircadianPhase;
|
|
72
|
+
/** Adjust duty factor by this amount (-1 to 1) */
|
|
73
|
+
dutyAdjustment?: number;
|
|
74
|
+
/** Duration of modulation in milliseconds (0 = permanent until cleared) */
|
|
75
|
+
duration?: number;
|
|
76
|
+
/** Reason for modulation (for logging/debugging) */
|
|
77
|
+
reason?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Configuration for the CircadianController
|
|
81
|
+
*/
|
|
82
|
+
export interface CircadianConfig {
|
|
83
|
+
/** Total cycle period in milliseconds (default: 24 hours simulation time) */
|
|
84
|
+
cyclePeriodMs: number;
|
|
85
|
+
/** Phase configurations */
|
|
86
|
+
phases: Record<CircadianPhase, PhaseConfig>;
|
|
87
|
+
/** Hysteresis duration to prevent rapid phase switching (ms) */
|
|
88
|
+
hysteresisMs: number;
|
|
89
|
+
/** Initial phase to start in */
|
|
90
|
+
initialPhase: CircadianPhase;
|
|
91
|
+
/** Energy budget per cycle (arbitrary units, 0 = unlimited) */
|
|
92
|
+
energyBudget: number;
|
|
93
|
+
/** Energy cost per compute unit */
|
|
94
|
+
computeEnergyCost: number;
|
|
95
|
+
/** Use WASM-based phase selection (K-WTA competition) */
|
|
96
|
+
useWasmPhaseSelection?: boolean;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Current state of the circadian controller
|
|
100
|
+
*/
|
|
101
|
+
export interface CircadianState {
|
|
102
|
+
/** Current phase */
|
|
103
|
+
phase: CircadianPhase;
|
|
104
|
+
/** Time elapsed in current cycle (ms) */
|
|
105
|
+
cycleTime: number;
|
|
106
|
+
/** Time spent in current phase (ms) */
|
|
107
|
+
phaseTime: number;
|
|
108
|
+
/** Remaining energy in current cycle */
|
|
109
|
+
energyRemaining: number;
|
|
110
|
+
/** Total cycles completed */
|
|
111
|
+
cyclesCompleted: number;
|
|
112
|
+
/** Active modulation (if any) */
|
|
113
|
+
activeModulation: CircadianModulation | null;
|
|
114
|
+
/** Time until next phase transition (ms) */
|
|
115
|
+
timeToNextPhase: number;
|
|
116
|
+
/** Whether WASM is being used for phase selection */
|
|
117
|
+
wasmEnabled: boolean;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Metrics collected by the controller
|
|
121
|
+
*/
|
|
122
|
+
export interface CircadianMetrics {
|
|
123
|
+
/** Total time in each phase (ms) */
|
|
124
|
+
phaseTime: Record<CircadianPhase, number>;
|
|
125
|
+
/** Number of events reacted to per phase */
|
|
126
|
+
reactionsPerPhase: Record<CircadianPhase, number>;
|
|
127
|
+
/** Number of events rejected per phase */
|
|
128
|
+
rejectionsPerPhase: Record<CircadianPhase, number>;
|
|
129
|
+
/** Average duty factor achieved */
|
|
130
|
+
averageDutyFactor: number;
|
|
131
|
+
/** Total energy consumed */
|
|
132
|
+
totalEnergyConsumed: number;
|
|
133
|
+
/** Number of phase transitions */
|
|
134
|
+
phaseTransitions: number;
|
|
135
|
+
/** Hysteresis activations (prevented transitions) */
|
|
136
|
+
hysteresisActivations: number;
|
|
137
|
+
/** Number of WTA competitions run */
|
|
138
|
+
wtaCompetitions: number;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Interface for the CircadianController
|
|
142
|
+
*/
|
|
143
|
+
export interface ICircadianController {
|
|
144
|
+
/**
|
|
145
|
+
* Advance time by dt milliseconds
|
|
146
|
+
* @param dt - Time to advance in milliseconds
|
|
147
|
+
*/
|
|
148
|
+
advance(dt: number): void;
|
|
149
|
+
/**
|
|
150
|
+
* Should run inference/tests?
|
|
151
|
+
* @returns true if in a phase that allows compute
|
|
152
|
+
*/
|
|
153
|
+
shouldCompute(): boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Should update learning models?
|
|
156
|
+
* @returns true if in a phase that allows learning
|
|
157
|
+
*/
|
|
158
|
+
shouldLearn(): boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Should run memory consolidation?
|
|
161
|
+
* @returns true if in a phase that allows consolidation
|
|
162
|
+
*/
|
|
163
|
+
shouldConsolidate(): boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Should react to event given importance?
|
|
166
|
+
* @param importance - Event importance (0-1, where 1 = critical)
|
|
167
|
+
* @returns true if the event should be processed
|
|
168
|
+
*/
|
|
169
|
+
shouldReact(importance: number): boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Get current circadian phase
|
|
172
|
+
* @returns Current phase
|
|
173
|
+
*/
|
|
174
|
+
getPhase(): CircadianPhase;
|
|
175
|
+
/**
|
|
176
|
+
* Get current duty factor (0-1)
|
|
177
|
+
* @returns Duty factor where 1 = full compute
|
|
178
|
+
*/
|
|
179
|
+
getDutyFactor(): number;
|
|
180
|
+
/**
|
|
181
|
+
* Get compute cost reduction factor
|
|
182
|
+
* @returns Factor representing savings (e.g., 2.0 = 50% savings)
|
|
183
|
+
*/
|
|
184
|
+
getCostReductionFactor(): number;
|
|
185
|
+
/**
|
|
186
|
+
* Apply external modulation
|
|
187
|
+
* @param mod - Modulation parameters
|
|
188
|
+
*/
|
|
189
|
+
modulate(mod: CircadianModulation): void;
|
|
190
|
+
/**
|
|
191
|
+
* Clear any active modulation
|
|
192
|
+
*/
|
|
193
|
+
clearModulation(): void;
|
|
194
|
+
/**
|
|
195
|
+
* Get current state
|
|
196
|
+
*/
|
|
197
|
+
getState(): CircadianState;
|
|
198
|
+
/**
|
|
199
|
+
* Get collected metrics
|
|
200
|
+
*/
|
|
201
|
+
getMetrics(): CircadianMetrics;
|
|
202
|
+
/**
|
|
203
|
+
* Reset the controller to initial state
|
|
204
|
+
*/
|
|
205
|
+
reset(): void;
|
|
206
|
+
/**
|
|
207
|
+
* Consume energy for a compute operation
|
|
208
|
+
* @param amount - Energy to consume
|
|
209
|
+
* @returns true if energy was available
|
|
210
|
+
*/
|
|
211
|
+
consumeEnergy(amount: number): boolean;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Default phase configurations based on biological circadian rhythms
|
|
215
|
+
* Total durations: Active (40%) + Dawn (15%) + Dusk (15%) + Rest (30%) = 100%
|
|
216
|
+
*/
|
|
217
|
+
export declare const DEFAULT_PHASE_CONFIGS: Record<CircadianPhase, PhaseConfig>;
|
|
218
|
+
/**
|
|
219
|
+
* Default configuration for CircadianController
|
|
220
|
+
*/
|
|
221
|
+
export declare const DEFAULT_CIRCADIAN_CONFIG: CircadianConfig;
|
|
222
|
+
/**
|
|
223
|
+
* CircadianController implements bio-inspired duty cycling with WASM K-WTA phase selection
|
|
224
|
+
*
|
|
225
|
+
* The K-WTA (K-Winner-Take-All) mechanism from the nervous system WASM module provides
|
|
226
|
+
* biologically-plausible phase selection through lateral inhibition. Each phase is
|
|
227
|
+
* represented as a "neuron" in the K-WTA layer, and phases compete based on their
|
|
228
|
+
* activation strength (derived from cycle position and phase duration).
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* ```typescript
|
|
232
|
+
* // Create controller (WASM initializes automatically)
|
|
233
|
+
* const controller = await CircadianController.create({
|
|
234
|
+
* cyclePeriodMs: 60000, // 1 minute cycles for testing
|
|
235
|
+
* });
|
|
236
|
+
*
|
|
237
|
+
* // Advance simulation time
|
|
238
|
+
* controller.advance(1000);
|
|
239
|
+
*
|
|
240
|
+
* // Check if we should run expensive operations
|
|
241
|
+
* if (controller.shouldCompute()) {
|
|
242
|
+
* await runInference();
|
|
243
|
+
* }
|
|
244
|
+
*
|
|
245
|
+
* // Check if we should react to an event
|
|
246
|
+
* const importance = 0.5;
|
|
247
|
+
* if (controller.shouldReact(importance)) {
|
|
248
|
+
* handleEvent();
|
|
249
|
+
* }
|
|
250
|
+
*
|
|
251
|
+
* // Get compute savings
|
|
252
|
+
* const savings = controller.getCostReductionFactor();
|
|
253
|
+
* console.log(`Current savings: ${((1 - 1/savings) * 100).toFixed(1)}%`);
|
|
254
|
+
* ```
|
|
255
|
+
*/
|
|
256
|
+
export declare class CircadianController implements ICircadianController {
|
|
257
|
+
private readonly config;
|
|
258
|
+
private currentPhase;
|
|
259
|
+
private cycleTime;
|
|
260
|
+
private phaseTime;
|
|
261
|
+
private lastPhaseChange;
|
|
262
|
+
private cyclesCompleted;
|
|
263
|
+
private energyRemaining;
|
|
264
|
+
private activeModulation;
|
|
265
|
+
private modulationStartTime;
|
|
266
|
+
private wtaLayer;
|
|
267
|
+
private wasmEnabled;
|
|
268
|
+
private readonly phaseTimeMetrics;
|
|
269
|
+
private readonly reactionsPerPhase;
|
|
270
|
+
private readonly rejectionsPerPhase;
|
|
271
|
+
private totalDutyFactorSum;
|
|
272
|
+
private totalDutyFactorSamples;
|
|
273
|
+
private totalEnergyConsumed;
|
|
274
|
+
private phaseTransitions;
|
|
275
|
+
private hysteresisActivations;
|
|
276
|
+
private wtaCompetitions;
|
|
277
|
+
/**
|
|
278
|
+
* Create a new CircadianController
|
|
279
|
+
*
|
|
280
|
+
* Note: For WASM initialization, use the static `create()` factory method instead.
|
|
281
|
+
*
|
|
282
|
+
* @param config - Partial configuration (merged with defaults)
|
|
283
|
+
*/
|
|
284
|
+
constructor(config?: Partial<CircadianConfig>);
|
|
285
|
+
/**
|
|
286
|
+
* Factory method to create a CircadianController with WASM initialization
|
|
287
|
+
*
|
|
288
|
+
* This is the preferred way to create a CircadianController as it ensures
|
|
289
|
+
* WASM is properly initialized before use.
|
|
290
|
+
*
|
|
291
|
+
* @param config - Partial configuration (merged with defaults)
|
|
292
|
+
* @returns Initialized CircadianController
|
|
293
|
+
*
|
|
294
|
+
* @example
|
|
295
|
+
* ```typescript
|
|
296
|
+
* const controller = await CircadianController.create({
|
|
297
|
+
* cyclePeriodMs: 60000,
|
|
298
|
+
* useWasmPhaseSelection: true,
|
|
299
|
+
* });
|
|
300
|
+
* ```
|
|
301
|
+
*/
|
|
302
|
+
static create(config?: Partial<CircadianConfig>): Promise<CircadianController>;
|
|
303
|
+
/**
|
|
304
|
+
* Initialize WASM components for bio-inspired phase selection
|
|
305
|
+
*
|
|
306
|
+
* Creates a WTA (Winner-Take-All) layer with 4 neurons (one per phase).
|
|
307
|
+
* The WTA mechanism implements lateral inhibition where phases compete
|
|
308
|
+
* for activation - only one phase can be "active" (winning) at any time,
|
|
309
|
+
* similar to how neural populations compete in biological circadian nuclei.
|
|
310
|
+
*
|
|
311
|
+
* WTA Parameters:
|
|
312
|
+
* - size: 4 (one neuron per phase: Dawn, Active, Dusk, Rest)
|
|
313
|
+
* - threshold: 0.1 (low threshold to ensure a winner is always selected)
|
|
314
|
+
* - inhibition: 0.8 (strong lateral inhibition for clean phase separation)
|
|
315
|
+
*/
|
|
316
|
+
private initializeWasm;
|
|
317
|
+
/**
|
|
318
|
+
* Advance time by dt milliseconds
|
|
319
|
+
*
|
|
320
|
+
* This method updates the internal state, transitioning between phases
|
|
321
|
+
* as needed and tracking metrics.
|
|
322
|
+
*
|
|
323
|
+
* @param dt - Time to advance in milliseconds (must be positive)
|
|
324
|
+
*/
|
|
325
|
+
advance(dt: number): void;
|
|
326
|
+
/**
|
|
327
|
+
* Update the current phase based on cycle time
|
|
328
|
+
*
|
|
329
|
+
* If WASM is enabled, uses K-WTA competition for phase selection.
|
|
330
|
+
* Otherwise, falls back to time-based phase calculation.
|
|
331
|
+
*/
|
|
332
|
+
private updatePhase;
|
|
333
|
+
/**
|
|
334
|
+
* Calculate phase using WTA (Winner-Take-All) competition
|
|
335
|
+
*
|
|
336
|
+
* Each phase's activation strength is based on how close the current
|
|
337
|
+
* cycle position is to the phase's peak time. The WTA layer then
|
|
338
|
+
* selects the winning phase through lateral inhibition.
|
|
339
|
+
*
|
|
340
|
+
* The activation function uses a Gaussian profile centered on each phase's
|
|
341
|
+
* midpoint, with sigma proportional to phase duration for smooth transitions.
|
|
342
|
+
*
|
|
343
|
+
* @param cyclePosition - Position in cycle (0-1)
|
|
344
|
+
* @returns The winning phase from WTA competition
|
|
345
|
+
*/
|
|
346
|
+
private calculatePhaseWithWTA;
|
|
347
|
+
/**
|
|
348
|
+
* Calculate which phase corresponds to a cycle position (pure time-based)
|
|
349
|
+
*
|
|
350
|
+
* @param position - Position in cycle (0-1)
|
|
351
|
+
* @returns The phase for that position
|
|
352
|
+
*/
|
|
353
|
+
private calculatePhaseForPosition;
|
|
354
|
+
/**
|
|
355
|
+
* Transition to a new phase
|
|
356
|
+
*
|
|
357
|
+
* @param newPhase - The phase to transition to
|
|
358
|
+
*/
|
|
359
|
+
private transitionToPhase;
|
|
360
|
+
/**
|
|
361
|
+
* Should run inference/tests?
|
|
362
|
+
*
|
|
363
|
+
* @returns true if in a phase that allows compute
|
|
364
|
+
*/
|
|
365
|
+
shouldCompute(): boolean;
|
|
366
|
+
/**
|
|
367
|
+
* Should update learning models?
|
|
368
|
+
*
|
|
369
|
+
* @returns true if in a phase that allows learning
|
|
370
|
+
*/
|
|
371
|
+
shouldLearn(): boolean;
|
|
372
|
+
/**
|
|
373
|
+
* Should run memory consolidation?
|
|
374
|
+
*
|
|
375
|
+
* @returns true if in a phase that allows consolidation
|
|
376
|
+
*/
|
|
377
|
+
shouldConsolidate(): boolean;
|
|
378
|
+
/**
|
|
379
|
+
* Should react to event given importance?
|
|
380
|
+
*
|
|
381
|
+
* Events with importance >= threshold will be processed.
|
|
382
|
+
* Modulation can adjust the threshold.
|
|
383
|
+
*
|
|
384
|
+
* @param importance - Event importance (0-1, where 1 = critical)
|
|
385
|
+
* @returns true if the event should be processed
|
|
386
|
+
*/
|
|
387
|
+
shouldReact(importance: number): boolean;
|
|
388
|
+
/**
|
|
389
|
+
* Get current circadian phase
|
|
390
|
+
*
|
|
391
|
+
* @returns Current phase
|
|
392
|
+
*/
|
|
393
|
+
getPhase(): CircadianPhase;
|
|
394
|
+
/**
|
|
395
|
+
* Get current duty factor (0-1)
|
|
396
|
+
*
|
|
397
|
+
* The duty factor represents the fraction of full compute being used.
|
|
398
|
+
* Modified by active modulation if present.
|
|
399
|
+
*
|
|
400
|
+
* @returns Duty factor where 1 = full compute
|
|
401
|
+
*/
|
|
402
|
+
getDutyFactor(): number;
|
|
403
|
+
/**
|
|
404
|
+
* Get compute cost reduction factor
|
|
405
|
+
*
|
|
406
|
+
* This returns a multiplier representing savings.
|
|
407
|
+
* For example, 2.0 means 50% savings (using half the compute).
|
|
408
|
+
*
|
|
409
|
+
* @returns Factor where higher = more savings (1/dutyFactor)
|
|
410
|
+
*/
|
|
411
|
+
getCostReductionFactor(): number;
|
|
412
|
+
/**
|
|
413
|
+
* Apply external modulation
|
|
414
|
+
*
|
|
415
|
+
* Modulation allows external systems to adjust circadian behavior.
|
|
416
|
+
* For example, during high-priority periods, modulation can force
|
|
417
|
+
* the Active phase or lower importance thresholds.
|
|
418
|
+
*
|
|
419
|
+
* @param mod - Modulation parameters
|
|
420
|
+
*/
|
|
421
|
+
modulate(mod: CircadianModulation): void;
|
|
422
|
+
/**
|
|
423
|
+
* Clear any active modulation
|
|
424
|
+
*/
|
|
425
|
+
clearModulation(): void;
|
|
426
|
+
/**
|
|
427
|
+
* Get current state
|
|
428
|
+
*
|
|
429
|
+
* @returns Complete state snapshot
|
|
430
|
+
*/
|
|
431
|
+
getState(): CircadianState;
|
|
432
|
+
/**
|
|
433
|
+
* Get collected metrics
|
|
434
|
+
*
|
|
435
|
+
* @returns Metrics snapshot
|
|
436
|
+
*/
|
|
437
|
+
getMetrics(): CircadianMetrics;
|
|
438
|
+
/**
|
|
439
|
+
* Reset the controller to initial state
|
|
440
|
+
*/
|
|
441
|
+
reset(): void;
|
|
442
|
+
/**
|
|
443
|
+
* Consume energy for a compute operation
|
|
444
|
+
*
|
|
445
|
+
* When energy budget is enabled, this tracks energy consumption.
|
|
446
|
+
* Operations can check if energy is available before proceeding.
|
|
447
|
+
*
|
|
448
|
+
* @param amount - Energy to consume (defaults to computeEnergyCost)
|
|
449
|
+
* @returns true if energy was available and consumed
|
|
450
|
+
*/
|
|
451
|
+
consumeEnergy(amount?: number): boolean;
|
|
452
|
+
/**
|
|
453
|
+
* Get the configuration
|
|
454
|
+
*
|
|
455
|
+
* @returns Current configuration (read-only)
|
|
456
|
+
*/
|
|
457
|
+
getConfig(): Readonly<CircadianConfig>;
|
|
458
|
+
/**
|
|
459
|
+
* Calculate theoretical average duty factor based on phase durations
|
|
460
|
+
*
|
|
461
|
+
* @returns Weighted average of duty factors
|
|
462
|
+
*/
|
|
463
|
+
getTheoreticalAverageDutyFactor(): number;
|
|
464
|
+
/**
|
|
465
|
+
* Calculate theoretical cost reduction factor
|
|
466
|
+
*
|
|
467
|
+
* @returns Expected savings factor (e.g., 2.0 = 50% savings)
|
|
468
|
+
*/
|
|
469
|
+
getTheoreticalCostReduction(): number;
|
|
470
|
+
/**
|
|
471
|
+
* Check if WASM phase selection is active
|
|
472
|
+
*
|
|
473
|
+
* @returns true if K-WTA competition is being used
|
|
474
|
+
*/
|
|
475
|
+
isWasmEnabled(): boolean;
|
|
476
|
+
/**
|
|
477
|
+
* Cleanup WASM resources
|
|
478
|
+
*
|
|
479
|
+
* Call this when the controller is no longer needed to free WASM memory.
|
|
480
|
+
*/
|
|
481
|
+
dispose(): void;
|
|
482
|
+
/**
|
|
483
|
+
* Get the last phase change timestamp
|
|
484
|
+
* @returns Timestamp in milliseconds
|
|
485
|
+
*/
|
|
486
|
+
getLastPhaseChangeTime(): number;
|
|
487
|
+
/**
|
|
488
|
+
* Get the modulation start time (if active)
|
|
489
|
+
* @returns Timestamp or undefined
|
|
490
|
+
*/
|
|
491
|
+
getModulationStartTime(): number | undefined;
|
|
492
|
+
/**
|
|
493
|
+
* Restore state from serialized values
|
|
494
|
+
* @param phase Current phase
|
|
495
|
+
* @param cycleTime Time in current cycle
|
|
496
|
+
* @param phaseTime Time in current phase
|
|
497
|
+
* @param cyclesCompleted Number of completed cycles
|
|
498
|
+
* @param energyRemaining Remaining energy
|
|
499
|
+
* @param modulation Active modulation or null
|
|
500
|
+
*/
|
|
501
|
+
restoreState(phase: CircadianPhase, cycleTime: number, phaseTime: number, cyclesCompleted: number, energyRemaining: number, modulation: CircadianModulation | null): void;
|
|
502
|
+
/**
|
|
503
|
+
* Restore metrics from serialized values
|
|
504
|
+
* @param metrics Metrics to restore
|
|
505
|
+
*/
|
|
506
|
+
restoreMetrics(metrics: CircadianMetrics): void;
|
|
507
|
+
/**
|
|
508
|
+
* Restore last phase change time
|
|
509
|
+
* @param time Timestamp in milliseconds
|
|
510
|
+
*/
|
|
511
|
+
restoreLastPhaseChangeTime(time: number): void;
|
|
512
|
+
/**
|
|
513
|
+
* Restore modulation start time
|
|
514
|
+
* @param time Timestamp or undefined
|
|
515
|
+
*/
|
|
516
|
+
restoreModulationStartTime(time: number | undefined): void;
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Create a CircadianController optimized for testing (fast cycles)
|
|
520
|
+
*
|
|
521
|
+
* @param cyclePeriodMs - Cycle period in milliseconds (default: 1 minute)
|
|
522
|
+
* @returns Promise resolving to configured CircadianController
|
|
523
|
+
*/
|
|
524
|
+
export declare function createTestingController(cyclePeriodMs?: number): Promise<CircadianController>;
|
|
525
|
+
/**
|
|
526
|
+
* Create a CircadianController optimized for maximum savings
|
|
527
|
+
*
|
|
528
|
+
* Extends rest phase and reduces active phase for up to 80% savings.
|
|
529
|
+
*
|
|
530
|
+
* @param cyclePeriodMs - Cycle period in milliseconds
|
|
531
|
+
* @returns Promise resolving to configured CircadianController
|
|
532
|
+
*/
|
|
533
|
+
export declare function createEfficientController(cyclePeriodMs?: number): Promise<CircadianController>;
|
|
534
|
+
/**
|
|
535
|
+
* Create a CircadianController optimized for responsiveness
|
|
536
|
+
*
|
|
537
|
+
* Extended active phase with lower importance thresholds.
|
|
538
|
+
*
|
|
539
|
+
* @param cyclePeriodMs - Cycle period in milliseconds
|
|
540
|
+
* @returns Promise resolving to configured CircadianController
|
|
541
|
+
*/
|
|
542
|
+
export declare function createResponsiveController(cyclePeriodMs?: number): Promise<CircadianController>;
|
|
543
|
+
/**
|
|
544
|
+
* Create a CircadianController with energy budgeting
|
|
545
|
+
*
|
|
546
|
+
* @param energyBudget - Energy budget per cycle
|
|
547
|
+
* @param cyclePeriodMs - Cycle period in milliseconds
|
|
548
|
+
* @returns Promise resolving to configured CircadianController
|
|
549
|
+
*/
|
|
550
|
+
export declare function createBudgetedController(energyBudget: number, cyclePeriodMs?: number): Promise<CircadianController>;
|
|
551
|
+
/**
|
|
552
|
+
* Create a CircadianController without WASM (pure TypeScript)
|
|
553
|
+
*
|
|
554
|
+
* Use this when WASM is not available or not desired.
|
|
555
|
+
*
|
|
556
|
+
* @param config - Partial configuration
|
|
557
|
+
* @returns Configured CircadianController (synchronous, no WASM)
|
|
558
|
+
*/
|
|
559
|
+
export declare function createPureTypeScriptController(config?: Partial<CircadianConfig>): CircadianController;
|
|
560
|
+
//# sourceMappingURL=CircadianController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CircadianController.d.ts","sourceRoot":"","sources":["../../../src/nervous-system/adapters/CircadianController.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAiBH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iDAAiD;IACjD,aAAa,EAAE,OAAO,CAAC;IACvB,8CAA8C;IAC9C,kBAAkB,EAAE,OAAO,CAAC;IAC5B,yDAAyD;IACzD,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,mFAAmF;IACnF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,kDAAkD;IAClD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,MAAM,CA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