trellis
Version:
Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications
33 lines • 1.47 kB
TypeScript
/**
* First-run onboarding (Slice A, docs/planning/device-registry-and-sprite-pairing.md).
*
* Identity is created once, at first device/workstation setup — the "Apple ID"
* model. `trellis init` first-run detection (no person identity, no profile)
* enters an onboarding branch:
*
* - **new** — create the person identity (`~/.trellis/identity.json`) + profile;
* ops minted from op #1 are signed with the person root.
* - **existing** — the identity lives on another device; the machine adopts it
* via the QR pairing flow (`trellis pair`). Person identity is NOT created
* here; the device key signs as the identity (getSigningMaterial device-first).
* - **skip** — stay anonymous (legacy behavior), dev-only warning.
*
* Non-interactive default is `new` (deterministic for CI / sprite
* provisioning), overridable with `--identity new|existing|skip`.
*/
export type IdentityMode = 'new' | 'existing' | 'skip';
export interface OnboardOptions {
interactive: boolean;
/** `--identity` CLI override — deterministic mode for non-interactive runs. */
identityFlag?: IdentityMode;
}
export interface OnboardResult {
mode: IdentityMode;
displayName?: string;
}
/**
* First-run onboarding gate. No-op (mode `skip`) when the machine is already
* onboarded (person identity or profile exists).
*/
export declare function onboardFirstRun(opts: OnboardOptions): Promise<OnboardResult>;
//# sourceMappingURL=onboarding.d.ts.map