A sovereign system cannot depend on a single clock. time.oracle correlates four independent time sources into a consensus time object.
time.oracle (master coordinator)
|
+-- cpu.oracle time.time() + time.monotonic()
| Always available. The heartbeat baseline.
|
+-- solar.oracle Sunrise, sunset, solar noon
| Astronomical calculation for server location.
| 1h cache. Pure math, no external deps.
|
+-- lunar.oracle Moon phase (day 0-29.5)
| Astronomical calculation + timeanddate.com verification.
| 6h cache. Drives the 28-day Book publishing cycle.
| Reference: https://www.timeanddate.com/moon/phases/
|
+-- blocktime.oracle Blockchain block timestamp
eth_getBlockByNumber via JSON-RPC.
2min cache. Immutable, decentralized reference.
Drift detection: |cpu_time - block_time|
{
"utc": "2026-04-03T20:39:00+00:00",
"unix": 1775245140.0,
"sources": {
"cpu": {"unix": 1775245140.0, "monotonic": 12345.6, "stale": false},
"solar": {"sunrise": "05:42 UTC", "sunset": "18:15 UTC", "is_day": true, "stale": false},
"lunar": {"phase": "waning gibbous", "day": 16.2, "is_full": false, "source": "timeanddate.com", "stale": false},
"blocktime": {"block_number": 12345678, "block_timestamp": 1775245128, "drift_ms": 12000, "stale": false}
},
"drift_max_ms": 12000,
"stale_sources": [],
"consensus": "correlated"
}
from utils.time_oracle import TimeOracle
oracle = await TimeOracle.get_instance()
Full consensus
consensus = await oracle.get_time()
Just lunar (for AuthorAgent)
lunar = await oracle.get_lunar()
Just solar
solar = await oracle.get_solar()
MINDX_LATITUDEMINDX_LONGITUDEMINDX_TIME_ORACLE_RPC_URLMINDX_ACCESS_GATE_RPC_URLdata/governance/moon_cache.jsondata/governance/time_oracle_cache.json + pgvectorscaleAuthorAgent uses time.oracle for the lunar publishing cycle:
write_daily_chapter() calls oracle.get_lunar() for moon phaseis_full == Truemoon_phase() if time.oracle is unavailabletime.oracle is the first step toward a broader oracle framework:
The on-chain OracleRegistry.sol (at daio/contracts/oracles/core/) already implements multi-source aggregation with heartbeat validation and staleness detection for price feeds. time.oracle extends this pattern to temporal data.
utils/time_oracle.pyagents/author_agent.pydata/governance/moon_cache.jsondata/governance/time_oracle_cache.jsondaio/contracts/oracles/core/OracleRegistry.sol