get_temporal_context
Analyze Bitcoin halving cycles to determine current positioning, historical analogs from cycles 1-3, and provide cycle-based guidance for financial decision-making.
Instructions
Get Bitcoin halving cycle positioning: days since last halving, estimated cycle phase, historical analogs from cycles 1-3, and cycle-based guidance.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/get-temporal-context.ts:9-48 (handler)Main handler function for get_temporal_context. Retrieves or computes the Bitcoin cycle temporal context, including halving dates, phase identification, and guidance.
export async function getTemporalContext(cache: CacheService): Promise<TemporalContextOutput | ErrorOutput> { const cached = cache.get<TemporalContextOutput>(CACHE_KEY); if (cached) return cached.data; try { const cycleInfo = getTemporalCycleInfo(); const analogs = getCycleAnalogs(cycleInfo.daysSinceLastHalving); const guidance = generateTemporalGuidance(cycleInfo.estimatedCyclePhase, cycleInfo.daysSinceLastHalving, cycleInfo.cycleProgressPercentage); const durationRemaining = estimateTypicalDuration(cycleInfo.estimatedCyclePhase, cycleInfo.daysSinceLastHalving); const result: TemporalContextOutput = { current_date: new Date().toISOString().split('T')[0], last_halving_date: cycleInfo.lastHalvingDate, next_halving_estimated: cycleInfo.nextHalvingEstimated, days_since_last_halving: cycleInfo.daysSinceLastHalving, days_until_next_halving: cycleInfo.daysUntilNextHalving, cycle_progress_percentage: cycleInfo.cycleProgressPercentage, estimated_cycle_phase: cycleInfo.estimatedCyclePhase, phase_confidence: cycleInfo.phaseConfidence, historical_pattern: analogs.historicalPattern, cycle_1_analog: analogs.cycle1, cycle_2_analog: analogs.cycle2, cycle_3_analog: analogs.cycle3, typical_duration_remaining: durationRemaining, agent_guidance: guidance, }; cache.set(CACHE_KEY, result, getCacheTtl(BASE_TTL)); return result; } catch (err) { return { error: true, error_source: 'get_temporal_context', agent_guidance: 'Temporal cycle data unavailable. Bitcoin cycle positioning is a critical context layer — delay strategic positioning decisions until this data is restored.', last_known_data: cache.get<TemporalContextOutput>(CACHE_KEY)?.data ?? null, data_warnings: ['Temporal context temporarily unavailable. Retry shortly.'], }; } }