refactor: rename aris to aelis

Rename all references across the codebase: package names,
imports, source IDs, directory names, docs, and configs.

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-03-05 01:28:17 +00:00
parent badc00c43b
commit 73417f79a8
201 changed files with 318 additions and 323 deletions

View File

@@ -0,0 +1,35 @@
import type { Context } from "./context"
import type { FeedItem } from "./feed"
/**
* Produces feed items from an external source.
*
* @example
* ```ts
* type WeatherItem = FeedItem<"weather", { temp: number }>
*
* class WeatherDataSource implements DataSource<WeatherItem> {
* readonly type = "weather"
*
* async query(context: Context): Promise<WeatherItem[]> {
* const location = context.get(LocationKey)
* if (!location) return []
* const data = await fetchWeather(location)
* return [{
* id: `weather-${Date.now()}`,
* type: this.type,
* timestamp: context.time,
* data: { temp: data.temperature },
* signals: { urgency: 0.5, timeRelevance: "ambient" },
* }]
* }
* }
* ```
*/
export interface DataSource<TItem extends FeedItem = FeedItem, TConfig = unknown> {
/** Unique identifier for this source type */
readonly type: TItem["type"]
/** Queries the source and returns feed items */
query(context: Context, config: TConfig): Promise<TItem[]>
}