openings 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openings",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Find evidence-grounded jobs, including relevant roles you may not have searched for, without accounts or API keys.",
5
5
  "author": { "name": "Openings contributors" },
6
6
  "license": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openings",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "A free, candidate-safe job-search substrate for AI agents",
5
5
  "license": "MIT",
6
6
  "repository": { "type": "git", "url": "git+https://github.com/abhay-avagama/hiring-agent.git" },
package/src/locations.ts CHANGED
@@ -118,6 +118,9 @@ function detectEligibleCountries(description: string): string[] {
118
118
  return matches;
119
119
  }
120
120
 
121
+ /** Codes the CLDR region table resolves to a name but that are not current ISO 3166-1 countries: deprecated aliases (DD = Germany, UK = United Kingdom) and non-country groupings. */
122
+ const NON_COUNTRY_CODES = new Set(["AC", "AN", "BU", "CP", "CS", "CT", "DD", "DG", "DY", "EA", "EU", "EZ", "FQ", "FX", "HV", "IC", "JT", "MI", "NH", "NQ", "NT", "PC", "PU", "PZ", "QO", "RH", "SU", "TA", "TP", "UK", "UN", "VD", "WK", "XA", "XB", "XK", "YD", "YU", "ZR", "ZZ"]);
123
+
121
124
  let cachedCountryNames: Array<[string, string]> | undefined;
122
125
  function countryNames(): Array<[string, string]> {
123
126
  if (cachedCountryNames) return cachedCountryNames;
@@ -126,6 +129,7 @@ function countryNames(): Array<[string, string]> {
126
129
  for (let first = 65; first <= 90; first += 1) {
127
130
  for (let second = 65; second <= 90; second += 1) {
128
131
  const code = String.fromCharCode(first, second);
132
+ if (NON_COUNTRY_CODES.has(code)) continue;
129
133
  const name = display.of(code);
130
134
  if (name && name !== code && !name.startsWith("Unknown Region")) names.push([code, name]);
131
135
  }
@@ -153,7 +157,7 @@ function countryRules(): CountryRule[] {
153
157
  cachedCountryRules = countryMatchers().map(([code, country]) => ({
154
158
  code,
155
159
  location: new RegExp(country, "i"),
156
- codeLocation: new RegExp(`(?:^|[,(/-]\\s*)${code}(?=\\s*(?:$|[,)/-]))`, "i"),
160
+ codeLocation: new RegExp(`(?:^|[,(/-]\\s*)${code === "GB" ? "(?:GB|UK)" : code}(?=\\s*(?:$|[,)/-]))`, "i"),
157
161
  exclusion: new RegExp(`\\b(not available|unavailable|excluding|except|cannot hire|can't hire|unable to hire|do not hire|does not hire)\\b.{0,80}(?:${country})|(?:${country}).{0,40}\\b(excluded|not eligible|not supported)\\b`, "i"),
158
162
  eligibility: new RegExp(`\\b(open to|hiring|candidates?|applicants?|eligible|remote (?:in|from)|work (?:in|from)|based in|available (?:in|to))\\b.{0,80}(?:${country})`, "i"),
159
163
  }));
package/src/mcp.ts CHANGED
@@ -22,7 +22,7 @@ export function createMcpHandler(tools: ToolHandler) {
22
22
  const base = { jsonrpc: "2.0" as const, id: request.id ?? null };
23
23
  try {
24
24
  if (request.method === "initialize") {
25
- return { ...base, result: { protocolVersion: "2025-06-18", capabilities: { tools: {} }, serverInfo: { name: "openings", version: "0.1.1" } } };
25
+ return { ...base, result: { protocolVersion: "2025-06-18", capabilities: { tools: {} }, serverInfo: { name: "openings", version: "0.1.2" } } };
26
26
  }
27
27
  if (request.method === "ping") return { ...base, result: {} };
28
28
  if (request.method === "tools/list") return { ...base, result: { tools: tools.list() } };