/** * Resolve this process's replica identity. * * Precedence: * 1. `AI_SUPPORT_AGENT_INSTANCE_ID` — explicit override (generated manifests * set this from the Kubernetes Pod name via the downward API). * 2. `HOSTNAME` — Kubernetes sets it to the Pod name by default. * 3. The ECS task id derived from `ECS_CONTAINER_METADATA_URI_V4`. * 4. A random UUID. * * The value must be stable for the life of the process (it identifies which * replica holds a slot) but need not survive a restart: a restarted replica * re-registers and takes a slot again. */ export declare function resolveInstanceId(env?: NodeJS.ProcessEnv): string; /** @internal テスト用: キャッシュを破棄する */ export declare function resetInstanceIdCacheForTest(): void; /** * Resolve this process's replica *nonce*. * * Distinct from {@link resolveInstanceId}: the instance id is a * human-recognizable label (Pod name / ECS task id) chosen for display, and * two different processes can legitimately report the *same* instanceId — * e.g. the same token deployed as a Kubernetes StatefulSet in two separate * clusters both produce Pod name `agent-0`. The nonce exists purely to tell * such processes apart: it is a random value generated once per process * start and sent on every register/heartbeat request, so the server can * detect "two live processes claiming the same instanceId" (an * `instance_id_conflict`) instead of silently treating the second process's * requests as a reconnect of the first. * * Generated with `crypto.randomUUID()` and cached for the process lifetime * (same rationale as `resolveInstanceId`'s cache): a fresh value on every * call would make every reconnect/heartbeat look like a new process. */ export declare function resolveInstanceNonce(): string; /** @internal テスト用: キャッシュを破棄する */ export declare function resetInstanceNonceCacheForTest(): void; //# sourceMappingURL=replica-identity.d.ts.map