diff --git a/.agents/skills/freehire-search/cli/src/helpers.ts b/.agents/skills/freehire-search/cli/src/helpers.ts index a27a6434..a9520a61 100644 --- a/.agents/skills/freehire-search/cli/src/helpers.ts +++ b/.agents/skills/freehire-search/cli/src/helpers.ts @@ -16,7 +16,11 @@ export function writeError(error: string, code: string): void { process.stderr.write(JSON.stringify({ error, code }) + "\n") } -const UA = "freehire-search-skill/1.0 (+https://freehire.me)" +// Names this project, the shape freehire's API docs ask for (owner/project/version +// plus a contact URL), so the API's operators can reach the maintainer before a +// limit or a field changes. The old value linked to freehire.me itself, which +// identified the API, not the caller. +const UA = "MadsLorentzen/ai-job-search/1.0 (+https://github.com/MadsLorentzen/ai-job-search; freehire-search)" /** The shared API response envelope: {data, meta, error}. */ export interface Envelope { diff --git a/.agents/skills/freehire-search/url-reference.md b/.agents/skills/freehire-search/url-reference.md index e5c1d6a8..8676cceb 100644 --- a/.agents/skills/freehire-search/url-reference.md +++ b/.agents/skills/freehire-search/url-reference.md @@ -138,8 +138,8 @@ points users to (`?q=` scopes the counts). Example: serves HTML, which `cleanHtml` (`cli/src/helpers.ts`) strips into readable text. Search descriptions arrive already rendered by the API and are passed through verbatim — stripping them again would undo the Markdown structure. -- Fetch uses a browser-ish User-Agent, `Accept: application/json`, and exponential - backoff with jitter on 429/5xx (max 6 retries). A connection error (API +- Fetch sends `User-Agent: MadsLorentzen/ai-job-search/1.0 (+https://github.com/MadsLorentzen/ai-job-search; freehire-search)` + and `Accept: application/json`, and uses exponential backoff with jitter on 429/5xx (max 6 retries). A connection error (API unreachable) fails fast with a clear message — no retry, since it is not transient server load — which is the graceful-degradation contract: an outage degrades this source quickly instead of hanging the caller.