refactor: standardized outbound User-Agent headers on shared utility constant
- Define a centralized `USER_AGENT` constant in `@oh-my-pi/pi-utils` formatted as `omp/<version>`. - Replace hardcoded and platform-specific user agent strings across AI providers, catalog scrapers, tools, and search providers with the unified `USER_AGENT`. - Add unit tests for update-cli binary release distribution gating.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
### Changed
|
||||
|
||||
- Changed stale process-log retention from the newest five files globally to one newest file per completed process and day within the current and previous four local calendar days. This preserves bounded daily diagnostic coverage while continuing to remove one-use audit files.
|
||||
- Changed outbound User-Agent consumers to share the versioned `USER_AGENT` constant (`omp/<version>`).
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
@@ -28,6 +28,9 @@ export const MAIN_CONFIG_FILENAMES = ["config.yml", "config.yaml"] as const;
|
||||
/** Version (e.g. "1.0.0") */
|
||||
export const VERSION: string = version;
|
||||
|
||||
/** Default User-Agent header string (e.g. "omp/17.2.12") */
|
||||
export const USER_AGENT = `omp/${VERSION}`;
|
||||
|
||||
/** Minimum Bun version */
|
||||
export const MIN_BUN_VERSION: string = engines.bun.replace(/[^0-9.]/g, "");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user