terminalhire 0.3.1 → 0.3.3

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.
@@ -3192,9 +3192,7 @@ function buildContextVerbs(topMatches, sessionTags) {
3192
3192
  const bounty = list.find((m) => m && m.source === "bounty" && m.amountUSD != null) || list.find((m) => m && m.source === "bounty");
3193
3193
  if (bounty) {
3194
3194
  const money = bounty.amountUSD != null ? `$${bounty.amountUSD.toLocaleString()} ` : "";
3195
- const bountyHeader = `\u2726 \u{1F48E} A ${money}bounty in your stack \u2014 link below`;
3196
- if (list[0] && list[0].source === "bounty") headers.unshift(bountyHeader);
3197
- else headers.push(bountyHeader);
3195
+ headers.unshift(`\u2726 \u{1F48E} A ${money}bounty in your stack \u2014 link below`);
3198
3196
  }
3199
3197
  return headers;
3200
3198
  }
@@ -3280,7 +3278,10 @@ function buildTips(topMatches, baseUrl, max = 8) {
3280
3278
  const seenRole = /* @__PURE__ */ new Set();
3281
3279
  const perCompany = /* @__PURE__ */ new Map();
3282
3280
  const COMPANY_CAP = 2;
3283
- for (const m of interleaveBySource(Array.isArray(topMatches) ? topMatches : [])) {
3281
+ const all = Array.isArray(topMatches) ? topMatches : [];
3282
+ const leadBounty = all.find((m) => m && m.source === "bounty");
3283
+ const ordered = leadBounty ? [leadBounty, ...interleaveBySource(all.filter((m) => m !== leadBounty))] : interleaveBySource(all);
3284
+ for (const m of ordered) {
3284
3285
  if (!m || !m.title || !m.company || !m.id) continue;
3285
3286
  const idx = String(m.id).indexOf(":");
3286
3287
  if (idx <= 0) continue;
@@ -4106,7 +4107,10 @@ async function run10() {
4106
4107
  const fp = profileToFingerprint2(profile);
4107
4108
  const results = match2(fp, jobs, jobs.length);
4108
4109
  matchCount = results.length;
4109
- topMatches = results.slice(0, 25).map((r) => ({
4110
+ const BOUNTY_SLOTS = 5;
4111
+ const bountyTop = results.filter((r) => r.job.source === "bounty").slice(0, BOUNTY_SLOTS);
4112
+ const roleTop = results.filter((r) => r.job.source !== "bounty").slice(0, 25 - bountyTop.length);
4113
+ topMatches = [...roleTop, ...bountyTop].map((r) => ({
4110
4114
  id: r.job.id,
4111
4115
  title: r.job.title,
4112
4116
  company: r.job.company,
@@ -2021,9 +2021,7 @@ function buildContextVerbs(topMatches, sessionTags) {
2021
2021
  const bounty = list.find((m) => m && m.source === "bounty" && m.amountUSD != null) || list.find((m) => m && m.source === "bounty");
2022
2022
  if (bounty) {
2023
2023
  const money = bounty.amountUSD != null ? `$${bounty.amountUSD.toLocaleString()} ` : "";
2024
- const bountyHeader = `\u2726 \u{1F48E} A ${money}bounty in your stack \u2014 link below`;
2025
- if (list[0] && list[0].source === "bounty") headers.unshift(bountyHeader);
2026
- else headers.push(bountyHeader);
2024
+ headers.unshift(`\u2726 \u{1F48E} A ${money}bounty in your stack \u2014 link below`);
2027
2025
  }
2028
2026
  return headers;
2029
2027
  }
@@ -2109,7 +2107,10 @@ function buildTips(topMatches, baseUrl, max = 8) {
2109
2107
  const seenRole = /* @__PURE__ */ new Set();
2110
2108
  const perCompany = /* @__PURE__ */ new Map();
2111
2109
  const COMPANY_CAP = 2;
2112
- for (const m of interleaveBySource(Array.isArray(topMatches) ? topMatches : [])) {
2110
+ const all = Array.isArray(topMatches) ? topMatches : [];
2111
+ const leadBounty = all.find((m) => m && m.source === "bounty");
2112
+ const ordered = leadBounty ? [leadBounty, ...interleaveBySource(all.filter((m) => m !== leadBounty))] : interleaveBySource(all);
2113
+ for (const m of ordered) {
2113
2114
  if (!m || !m.title || !m.company || !m.id) continue;
2114
2115
  const idx = String(m.id).indexOf(":");
2115
2116
  if (idx <= 0) continue;
@@ -2493,7 +2494,10 @@ async function run() {
2493
2494
  const fp = profileToFingerprint2(profile);
2494
2495
  const results = match2(fp, jobs, jobs.length);
2495
2496
  matchCount = results.length;
2496
- topMatches = results.slice(0, 25).map((r) => ({
2497
+ const BOUNTY_SLOTS = 5;
2498
+ const bountyTop = results.filter((r) => r.job.source === "bounty").slice(0, BOUNTY_SLOTS);
2499
+ const roleTop = results.filter((r) => r.job.source !== "bounty").slice(0, 25 - bountyTop.length);
2500
+ topMatches = [...roleTop, ...bountyTop].map((r) => ({
2497
2501
  id: r.job.id,
2498
2502
  title: r.job.title,
2499
2503
  company: r.job.company,
@@ -105,9 +105,7 @@ function buildContextVerbs(topMatches, sessionTags) {
105
105
  const bounty = list.find((m) => m && m.source === "bounty" && m.amountUSD != null) || list.find((m) => m && m.source === "bounty");
106
106
  if (bounty) {
107
107
  const money = bounty.amountUSD != null ? `$${bounty.amountUSD.toLocaleString()} ` : "";
108
- const bountyHeader = `\u2726 \u{1F48E} A ${money}bounty in your stack \u2014 link below`;
109
- if (list[0] && list[0].source === "bounty") headers.unshift(bountyHeader);
110
- else headers.push(bountyHeader);
108
+ headers.unshift(`\u2726 \u{1F48E} A ${money}bounty in your stack \u2014 link below`);
111
109
  }
112
110
  return headers;
113
111
  }
@@ -112,9 +112,7 @@ function buildContextVerbs(topMatches, sessionTags) {
112
112
  const bounty = list.find((m) => m && m.source === "bounty" && m.amountUSD != null) || list.find((m) => m && m.source === "bounty");
113
113
  if (bounty) {
114
114
  const money = bounty.amountUSD != null ? `$${bounty.amountUSD.toLocaleString()} ` : "";
115
- const bountyHeader = `\u2726 \u{1F48E} A ${money}bounty in your stack \u2014 link below`;
116
- if (list[0] && list[0].source === "bounty") headers.unshift(bountyHeader);
117
- else headers.push(bountyHeader);
115
+ headers.unshift(`\u2726 \u{1F48E} A ${money}bounty in your stack \u2014 link below`);
118
116
  }
119
117
  return headers;
120
118
  }
@@ -200,7 +198,10 @@ function buildTips(topMatches, baseUrl, max = 8) {
200
198
  const seenRole = /* @__PURE__ */ new Set();
201
199
  const perCompany = /* @__PURE__ */ new Map();
202
200
  const COMPANY_CAP = 2;
203
- for (const m of interleaveBySource(Array.isArray(topMatches) ? topMatches : [])) {
201
+ const all = Array.isArray(topMatches) ? topMatches : [];
202
+ const leadBounty = all.find((m) => m && m.source === "bounty");
203
+ const ordered = leadBounty ? [leadBounty, ...interleaveBySource(all.filter((m) => m !== leadBounty))] : interleaveBySource(all);
204
+ for (const m of ordered) {
204
205
  if (!m || !m.title || !m.company || !m.id) continue;
205
206
  const idx = String(m.id).indexOf(":");
206
207
  if (idx <= 0) continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terminalhire",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Local-first job matching for developers — ambient job matches in the Claude Code spinner. Matching runs on your machine; your profile never leaves it.",
5
5
  "repository": {
6
6
  "type": "git",