import { type InteractableBudget } from '@hypersoniclabs/helix-manifest'; import { HelixApi } from './api'; import { type CliCredentials } from './config'; type JsonObject = Record; export type InteractablePlacementTransform = { position: [number, number, number]; yawDeg: number; scale: number; }; export type InteractableCapsReport = InteractableBudget & { phases: number; zones: number; events: number; actions: number; limits: Record; percentages: Record; }; export type InteractableCapName = 'rules' | 'roomVars' | 'playerVars' | 'timers' | 'phases' | 'zones' | 'events' | 'actions'; export type AddInteractableResult = { itemId: string; id: string; version: string; checksumSha256: string; destination: string; manifestPath: string; clientGluePath: string; moduleId?: string; bank?: string; namespace: string; grammarPrefix: string; caps: InteractableCapsReport; warnings: string[]; noOp: boolean; }; export type AddInteractableApi = Pick; export type AddInteractableDeps = { api?: AddInteractableApi; fetchBytes?: (url: string) => Promise; }; /** Stable public module id for one placement; long package ids retain a readable prefix plus a collision hash. */ export declare function interactableModuleId(id: string, instance: number): string; export declare function namespaceInteractableFragment(wrapperValue: unknown, slug: string, instance: number, placement: InteractablePlacementTransform): { multiplayer: JsonObject; namespace: string; grammarPrefix: string; actionNames: Record; ruleIds: string[]; warnings: string[]; }; export type InteractableModuleContribution = { moduleId: string; bank: string; module: JsonObject; minPlayers: number; namespace: string; grammarPrefix: string; actionNames: Record; ruleIds: string[]; caps: InteractableCapsReport; warnings: string[]; }; /** * Turn one verified package fragment into a module-v1 manifest entry. Rules stay in the immutable bank; * declarations remain bare/local and placement remains in installed.json for the trusted packer envelope. */ export declare function moduleInteractableFragment(wrapperValue: unknown, id: string, version: string, checksumSha256: string, instance: number): InteractableModuleContribution; /** Add/replace no flat declarations: one module entry is the entire server-side composition unit. */ export declare function composeInteractableModuleManifest(worldValue: unknown, contribution: InteractableModuleContribution, options?: { replace?: { moduleId: string; expected: JsonObject; }; }): { manifest: JsonObject; caps: InteractableCapsReport; warnings: string[]; }; export declare function composeInteractableManifest(worldValue: unknown, contribution: JsonObject, alreadyInstalled: number): { manifest: JsonObject; caps: InteractableCapsReport; warnings: string[]; }; export declare function addInteractable(worldDir: string, ref: string, options?: { apiUrl?: string; credentials?: CliCredentials; placement?: Partial; onProgress?: (message: string) => void; deps?: AddInteractableDeps; }): Promise; export declare function parseInteractablePosition(value: string): [number, number, number]; /** The instance ordinal survives ONLY inside the conceptual namespace (`itx...`). */ export declare function instanceOrdinalOf(namespace: string): number; export declare function subtractInteractableContribution(worldValue: unknown, contribution: JsonObject): { world: JsonObject; missingRules: string[]; }; export type UpdateInteractableResult = { itemId: string; id: string; fromVersions: string[]; version: string; checksumSha256: string; destination: string; manifestPath: string; clientGluePath: string; /** How many placed instances moved (0 on a no-op). */ instances: number; moduleBudgets: Array<{ moduleId: string; bank: string; caps: InteractableCapsReport; }>; caps: InteractableCapsReport; warnings: string[]; noOp: boolean; }; export declare function updateInteractable(worldDir: string, ref: string, options?: { apiUrl?: string; credentials?: CliCredentials; onProgress?: (message: string) => void; deps?: AddInteractableDeps; }): Promise; export {};