import type { Icon, Link, Mood, Row, Token } from "./dsl.ts"; import type { ActionInfo, Spec, World } from "./spec.ts"; export interface Appearance { icon: Icon | null; status: string | null; mood: Mood | null; rows: Row[]; tokens: Token[]; /** Whose this is, if the actor says; undefined when it does not. */ owner: string | null | undefined; } export interface LiveLink extends Link { from: string; /** The resolved instance id. */ target: string; } /** * Instance ids in presentation text read as their labels: a row keyed "axod-studio" shows * "Studio daemon". Specs can use ids, as their state does, without carrying labels around. */ export declare function labelled(world: World, text: string): string; export declare function appearance(spec: Spec, world: World, id: string): Appearance; /** What dropping `token` on instance `id` would do: each enabled action with an input accepting it. */ export interface Drop { action: ActionInfo; inputs: Record; /** Whether other inputs still need a person to fill them in. */ complete: boolean; } /** Whether any actor says what can be carried; if none does, it is inferred. */ export declare function declaresTokens(spec: Spec): boolean; /** * Without declared tokens: what a person would carry. When an action someone can take now * gets its input examples from other instances' state, each value can be dragged from the * instance it came from, like a pairing code on a phone typed into a Mac. Only instances * the examples actually read count, so a value that merely also appears elsewhere stays * put. Values that name instances are left out; those are references, not things to carry. */ export declare function inferredTokens(spec: Spec, world: World): Map; export declare function dropsFor(spec: Spec, world: World, id: string, token: Token): Drop[]; /** Whether any actor declares links; views fall back to the static topology when none does. */ export declare function declaresLinks(spec: Spec): boolean; export declare function liveLinks(spec: Spec, world: World): LiveLink[];