/// import { AgentPubKey, CellId, DnaHash, DnaProperties, ActionHash, HoloHash, InstalledAppId, InstalledCell, KitsuneAgent, KitsuneSpace, RoleId, Signature } from "../../types.js"; import { DhtOp, Entry, Action } from "../../hdk/index.js"; import { Requester } from "../common.js"; export declare type AttachAppInterfaceRequest = { port: number; }; export declare type AttachAppInterfaceResponse = { port: number; }; export declare type ActivateAppRequest = EnableAppRequest; export declare type ActivateAppResponse = EnableAppResponse; export declare type DeactivateAppRequest = { installed_app_id: InstalledAppId; }; export declare type DeactivateAppResponse = null; export declare type EnableAppRequest = { installed_app_id: InstalledAppId; }; export declare type EnableAppResponse = { app: InstalledAppInfo; errors: Array<[CellId, string]>; }; export declare type DeactivationReason = { never_activated: null; } | { normal: null; } | { quarantined: { error: string; }; }; export declare type PausedAppReason = { error: string; }; export declare type DisabledAppReason = { never_started: null; } | { user: null; } | { error: string; }; export declare type InstalledAppInfoStatus = { paused: { reason: PausedAppReason; }; } | { disabled: { reason: DisabledAppReason; }; } | { running: null; }; export declare type InstalledAppInfo = { installed_app_id: InstalledAppId; cell_data: Array; status: InstalledAppInfoStatus; }; export declare type MembraneProof = Buffer; export declare type DisableAppRequest = { installed_app_id: InstalledAppId; }; export declare type DisableAppResponse = null; export declare type StartAppRequest = { installed_app_id: InstalledAppId; }; export declare type StartAppResponse = boolean; export declare type DumpStateRequest = { cell_id: CellId; }; export declare type DumpStateResponse = any; export declare type DumpFullStateRequest = { cell_id: CellId; dht_ops_cursor: number | undefined; }; export declare type DumpFullStateResponse = FullStateDump; export declare type GenerateAgentPubKeyRequest = void; export declare type GenerateAgentPubKeyResponse = AgentPubKey; export declare type RegisterDnaRequest = { uid?: string; properties?: DnaProperties; } & DnaSource; export declare type RegisterDnaResponse = HoloHash; export declare type InstallAppRequest = { installed_app_id: InstalledAppId; agent_key: AgentPubKey; dnas: Array; }; export declare type InstallAppResponse = InstalledAppInfo; export declare type UninstallAppRequest = { installed_app_id: InstalledAppId; }; export declare type UninstallAppResponse = null; export declare type CreateCloneCellRequest = { properties?: DnaProperties; dna_hash: HoloHash; agent_key: AgentPubKey; installed_app_id: InstalledAppId; role_id: RoleId; membrane_proof?: MembraneProof; }; export declare type CreateCloneCellResponse = CellId; export declare type ResourceBytes = Buffer; export declare type ResourceMap = { [key: string]: ResourceBytes; }; export declare type CellProvisioning = { create: { deferred: boolean; }; } | { create_clone: { deferred: boolean; }; } | { use_existing: { deferred: boolean; }; } | { create_if_no_exists: { deferred: boolean; }; } | { disabled: Record; }; export declare type HoloHashB64 = string; export declare type DnaVersionSpec = Array; export declare type DnaVersionFlexible = { singleton: HoloHashB64; } | { multiple: DnaVersionSpec; }; export declare type AppRoleDnaManifest = { location?: Location; properties?: DnaProperties; uid?: string; version?: DnaVersionFlexible; }; export declare type AppRoleManifest = { id: RoleId; provisioning?: CellProvisioning; dna: AppRoleDnaManifest; }; export declare type AppManifest = { manifest_version: string; name: string; description?: string; roles: Array; }; export declare type AppBundle = { manifest: AppManifest; resources: ResourceMap; }; export declare type AppBundleSource = { bundle: AppBundle; } | { path: string; }; export declare type Uid = string; export declare type InstallAppBundleRequest = { agent_key: AgentPubKey; installed_app_id?: InstalledAppId; membrane_proofs: { [key: string]: MembraneProof; }; uid?: Uid; } & AppBundleSource; export declare type InstallAppBundleResponse = InstalledAppInfo; export declare type ListDnasRequest = void; export declare type ListDnasResponse = Array; export declare type ListCellIdsRequest = void; export declare type ListCellIdsResponse = Array; export declare type ListActiveAppsRequest = void; export declare type ListActiveAppsResponse = Array; export declare enum AppStatusFilter { Enabled = "enabled", Disabled = "disabled", Running = "running", Stopped = "stopped", Paused = "paused" } export declare type ListAppsRequest = { status_filter?: AppStatusFilter; }; export declare type ListAppsResponse = Array; export declare type ListAppInterfacesRequest = void; export declare type ListAppInterfacesResponse = Array; export declare type AgentInfoSigned = any; export declare type RequestAgentInfoRequest = { cell_id: CellId | null; }; export declare type RequestAgentInfoResponse = Array; export declare type AddAgentInfoRequest = { agent_infos: Array; }; export declare type AddAgentInfoResponse = any; export interface AdminApi { attachAppInterface: Requester; activateApp: Requester; deactivateApp: Requester; enableApp: Requester; disableApp: Requester; startApp: Requester; dumpState: Requester; dumpFullState: Requester; generateAgentPubKey: Requester; registerDna: Requester; installApp: Requester; uninstallApp: Requester; createCloneCell: Requester; installAppBundle: Requester; listDnas: Requester; listCellIds: Requester; listActiveApps: Requester; listApps: Requester; listAppInterfaces: Requester; requestAgentInfo: Requester; addAgentInfo: Requester; } export declare type InstallAppDnaPayload = { hash: HoloHash; role_id: RoleId; membrane_proof?: MembraneProof; }; export declare type ZomeLocation = { bundled: string; } | { path: string; } | { url: string; }; export declare type ZomeManifest = { name: string; hash?: string; } & ZomeLocation; export declare type DnaManifest = { manifest_version: string; name: string; uid?: string; properties?: DnaProperties; zomes: Array; }; export declare type DnaBundle = { manifest: DnaManifest; resources: ResourceMap; }; export declare type DnaSource = { hash: HoloHash; } | { path: string; } | { bundle: DnaBundle; }; export declare type Zomes = Array<[string, { wasm_hash: Array; }]>; export declare type WasmCode = [HoloHash, { code: Array; }]; export interface AgentInfoDump { kitsune_agent: KitsuneAgent; kitsune_space: KitsuneSpace; dump: string; } export interface P2pAgentsDump { this_agent_info: AgentInfoDump | undefined; this_dna: [DnaHash, KitsuneSpace] | undefined; this_agent: [AgentPubKey, KitsuneAgent] | undefined; peers: Array; } export interface FullIntegrationStateDump { validation_limbo: Array; integration_limbo: Array; integrated: Array; dht_ops_cursor: number; } export interface SourceChainJsonRecord { signature: Signature; action_address: ActionHash; action: Action; entry: Entry | undefined; } export interface SourceChainJsonDump { records: Array; published_ops_count: number; } export interface FullStateDump { peer_dump: P2pAgentsDump; source_chain_dump: SourceChainJsonDump; integration_dump: FullIntegrationStateDump; }