/** * Telling two bots apart. * * One composed row of this plugin serves one Lark app. A deployment that wants * a second bot composes a second row — and then three identifiers that were * constants have to stop being constants, or the two rows write over each * other: the settings section holding their workspace and model maps, the * credential holding their app secret, and the session ids their conversations * derive. The last one bites hardest and quietest: two bots invited to the SAME * group would otherwise derive one session id and share one agent. * * A row with no name keeps the ORIGINAL identifiers, byte for byte. That is * the whole compatibility story: an existing deployment names nothing, so its * settings section, its credential, and every stored session id stay exactly * where they were, and naming instances is something only a second bot needs. * @module dsh-lark-channel/instance */ /** The settings section, credential, and session ids one row owns. */ export interface InstanceIdentity { /** The name itself, absent for the original single-row deployment. */ readonly name?: string | undefined; /** User-settings namespace holding this row's durable state. */ readonly settingsNamespace: string; /** Credential reference holding this row's app secret. */ readonly secretRef: string; /** Prefix every session id of this row's conversations carries. */ readonly sessionPrefix: string; } /** * Reject a name that cannot safely become part of the three identifiers. * @param name - the configured instance name. * @returns why it is unusable, or undefined when it is fine. */ export declare function refuseInstanceName(name: string): string | undefined; /** * Derive one row's identifiers. * @param name - the configured instance name; absent or empty is the original row. * @returns the identity to key settings, credentials, and sessions by. * @throws {Error} when a name is given that cannot be used. */ export declare function instanceIdentity(name?: string): InstanceIdentity; //# sourceMappingURL=instance.d.ts.map