import type { BoneAxisReference } from './axisReference'; export declare const SYSTEM_SLUG = "humanoid-character"; /** Mirror of the system's HeldItemPreset — shipped by the installed bundle, so structural like everything here. */ export interface HeldItemPresetLike { socket: string; position?: [number, number, number]; rotationEulerDeg?: [number, number, number]; } /** The subset of @helix/humanoid-character's public API the gesture tools use. */ export interface GestureRuntime { three: any; compileGesture: (json: unknown) => { gesture: any; warnings: string[]; }; GesturePlayer: new (root: any) => { pose: (gesture: any, t: number, weight?: number) => void; }; /** Absent on systems pinned before the table was exported — callers degrade instead of failing. */ axisTable: readonly BoneAxisReference[] | null; /** Socket runtime for --attach measurement; absent only on very old pins — callers degrade. */ SocketService: (new (model: any, defs: readonly any[]) => any) | null; defaultSockets: readonly any[] | null; /** Absent on systems pinned before attachments (added in 0.2.14) — callers degrade instead of failing. */ heldItemPresets: Readonly> | null; /** * The system's canonical-skeleton landmark inverse for compile-time `ik` keys. Absent on systems pinned * before IK (added in 0.2.15) — and on those systems `compileGesture` silently IGNORES an `ik` field when * the key also has `bones` (or fails with a message that never mentions ik), so callers must gate a clip * containing `keys[].ik` BEFORE compiling, not degrade after. */ describePose: ((gesture: any, t: number) => PoseDescriptionLike) | null; /** True iff the installed system compiles `ik.*.item` intents (IK_ITEM_INTENTS export, ≥ 0.2.18). */ ikItemIntents: boolean; systemPath: string; } /** Structural mirror of the system's PoseDescription/HandDescription (shipped by the installed bundle). */ export interface PoseDescriptionLike { rightHand: HandDescriptionLike | null; leftHand: HandDescriptionLike | null; } export interface HandDescriptionLike { text: string; position: [number, number, number]; palm: [number, number, number]; } /** Exported for the world tools (readWorldMetrics) — same installed-system entry, same error. */ export declare function systemEntry(worldDir: string): string; /** Walk node_modules the way Node does. require.resolve is not usable here: three's `exports` map has no * "./package.json" entry, so resolving into the package to find its root is blocked. Exported so capture * resolves three the same way (hoisted/workspace layouts) and fails with this same npm-install message. */ export declare function threeRoot(worldDir: string): string; /** * The exact file Node gives the system's own bare `import … from 'three'`, so the CLI and the system share * ONE module instance — two instances would break every instanceof inside the player. Exported for tests: * it is the only part of this module they can reach, since Jest cannot load real ESM through importEsm. */ export declare function threeEsmPath(worldDir: string): string; export declare function loadGestureRuntime(worldDir: string): Promise; /** Does this clip JSON use compile-time ik keys? (The gate must run BEFORE compiling — see GestureRuntime.describePose.) */ export declare function clipUsesIk(source: unknown): boolean; export declare const IK_UNSUPPORTED_MESSAGE: string; /** Does any ik goal carry an `item` intent? (Same pre-compile gate rationale as clipUsesIk.) */ export declare function clipUsesItem(source: unknown): boolean; export declare const ITEM_UNSUPPORTED_MESSAGE: string;