mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-07-09 16:00:59 +00:00
Tighten v5-to-v6 upgrade safety, release installability, provider MSP mode handling, AI cost accounting, metrics flushing, and frontend guardrails for the v6.0.0 GA candidate.
21 lines
660 B
TypeScript
21 lines
660 B
TypeScript
export const RESOURCE_METADATA_CHANGED_EVENT = 'pulse:resource-metadata-changed';
|
|
|
|
export type ResourceMetadataChangedDetail = {
|
|
metadataKind: 'agent' | 'guest' | 'docker';
|
|
metadataId: string;
|
|
customUrl?: string;
|
|
};
|
|
|
|
export const dispatchResourceMetadataChanged = (detail: ResourceMetadataChangedDetail): void => {
|
|
if (typeof window === 'undefined' || !detail.metadataId) return;
|
|
|
|
try {
|
|
window.dispatchEvent(
|
|
new CustomEvent<ResourceMetadataChangedDetail>(RESOURCE_METADATA_CHANGED_EVENT, {
|
|
detail,
|
|
}),
|
|
);
|
|
} catch {
|
|
// Metadata writes remain authoritative; event dispatch is only same-tab UI synchronization.
|
|
}
|
|
};
|