terminalhire 0.35.1 → 0.35.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.
Files changed (40) hide show
  1. package/dist/bin/claim-push-bg.js +10 -58
  2. package/dist/bin/jpi-bounties.js +77 -63
  3. package/dist/bin/jpi-chat-read.js +13 -59
  4. package/dist/bin/jpi-chat.js +15 -61
  5. package/dist/bin/jpi-claim.js +78 -64
  6. package/dist/bin/jpi-config.js +51 -1
  7. package/dist/bin/jpi-contribute.js +14 -60
  8. package/dist/bin/jpi-devs.js +77 -63
  9. package/dist/bin/jpi-dispatch.js +538 -6146
  10. package/dist/bin/jpi-hub.js +80 -65
  11. package/dist/bin/jpi-inbox.js +15 -61
  12. package/dist/bin/jpi-init.js +66 -4
  13. package/dist/bin/jpi-intro.js +12 -59
  14. package/dist/bin/jpi-jobs.js +79 -64
  15. package/dist/bin/jpi-learn.js +12 -59
  16. package/dist/bin/jpi-link.js +2 -1
  17. package/dist/bin/jpi-login.js +80 -65
  18. package/dist/bin/jpi-mcp.js +148 -5827
  19. package/dist/bin/jpi-profile.js +12 -59
  20. package/dist/bin/jpi-project.js +66 -4
  21. package/dist/bin/jpi-refresh.js +111 -69
  22. package/dist/bin/jpi-repo.js +11 -58
  23. package/dist/bin/jpi-save.js +12 -59
  24. package/dist/bin/jpi-sync.js +12 -59
  25. package/dist/bin/jpi-trajectory.js +12 -59
  26. package/dist/bin/peer-connect-prompt.js +2 -1
  27. package/dist/bin/pulse-prompt.js +2 -1
  28. package/dist/bin/spinner.js +4 -1
  29. package/dist/src/chat-client.js +10 -61
  30. package/dist/src/chat-keystore.js +10 -61
  31. package/dist/src/config.js +17 -1
  32. package/dist/src/crypto-store.js +11 -62
  33. package/dist/src/github-auth.js +10 -61
  34. package/dist/src/intro.js +12 -59
  35. package/dist/src/link.js +2 -1
  36. package/dist/src/profile.js +11 -62
  37. package/dist/src/repo-experience.js +10 -61
  38. package/dist/src/trajectory.js +12 -59
  39. package/package.json +1 -1
  40. package/dist/keytar-KOAAH267.node +0 -0
@@ -4,16 +4,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
- }) : x)(function(x) {
10
- if (typeof require !== "undefined") return require.apply(this, arguments);
11
- throw Error('Dynamic require of "' + x + '" is not supported');
12
- });
13
7
  var __esm = (fn, res) => function __init() {
14
8
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
15
9
  };
16
- var __commonJS = (cb, mod) => function __require2() {
10
+ var __commonJS = (cb, mod) => function __require() {
17
11
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
18
12
  };
19
13
  var __export = (target, all) => {
@@ -37,61 +31,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
37
31
  mod
38
32
  ));
39
33
 
40
- // ../../node_modules/keytar/build/Release/keytar.node
41
- var keytar_default;
42
- var init_keytar = __esm({
43
- "../../node_modules/keytar/build/Release/keytar.node"() {
44
- keytar_default = "../keytar-KOAAH267.node";
45
- }
46
- });
47
-
48
- // node-file:/private/tmp/claude-501/-Users-ericgang-job-placement-inline/9716ff9c-0531-4844-adf4-286763cf8ab8/scratchpad/deeplink-wt/node_modules/keytar/build/Release/keytar.node
49
- var require_keytar = __commonJS({
50
- "node-file:/private/tmp/claude-501/-Users-ericgang-job-placement-inline/9716ff9c-0531-4844-adf4-286763cf8ab8/scratchpad/deeplink-wt/node_modules/keytar/build/Release/keytar.node"(exports, module) {
51
- "use strict";
52
- init_keytar();
53
- try {
54
- module.exports = __require(keytar_default);
55
- } catch {
56
- }
57
- }
58
- });
59
-
60
34
  // ../../node_modules/keytar/lib/keytar.js
61
- var require_keytar2 = __commonJS({
35
+ var require_keytar = __commonJS({
62
36
  "../../node_modules/keytar/lib/keytar.js"(exports, module) {
63
37
  "use strict";
64
- var keytar = require_keytar();
65
- function checkRequired(val, name) {
66
- if (!val || val.length <= 0) {
67
- throw new Error(name + " is required.");
68
- }
38
+ function disabled() {
39
+ throw new Error("keytar disabled in this dev checkout (keychain popup guard) \u2014 key-file fallback expected");
69
40
  }
70
41
  module.exports = {
71
- getPassword: function(service, account) {
72
- checkRequired(service, "Service");
73
- checkRequired(account, "Account");
74
- return keytar.getPassword(service, account);
75
- },
76
- setPassword: function(service, account, password) {
77
- checkRequired(service, "Service");
78
- checkRequired(account, "Account");
79
- checkRequired(password, "Password");
80
- return keytar.setPassword(service, account, password);
81
- },
82
- deletePassword: function(service, account) {
83
- checkRequired(service, "Service");
84
- checkRequired(account, "Account");
85
- return keytar.deletePassword(service, account);
86
- },
87
- findPassword: function(service) {
88
- checkRequired(service, "Service");
89
- return keytar.findPassword(service);
90
- },
91
- findCredentials: function(service) {
92
- checkRequired(service, "Service");
93
- return keytar.findCredentials(service);
94
- }
42
+ getPassword: disabled,
43
+ setPassword: disabled,
44
+ deletePassword: disabled,
45
+ findPassword: disabled,
46
+ findCredentials: disabled
95
47
  };
96
48
  }
97
49
  });
@@ -313,7 +265,7 @@ function skipKeychain() {
313
265
  async function loadKey() {
314
266
  if (!skipKeychain()) {
315
267
  try {
316
- const kt = await Promise.resolve().then(() => __toESM(require_keytar2(), 1));
268
+ const kt = await Promise.resolve().then(() => __toESM(require_keytar(), 1));
317
269
  const stored = await kt.getPassword("terminalhire", "profile-key");
318
270
  if (stored) return Buffer.from(stored, "hex");
319
271
  const key2 = randomBytes(KEY_BYTES);
@@ -5,16 +5,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
- }) : x)(function(x) {
11
- if (typeof require !== "undefined") return require.apply(this, arguments);
12
- throw Error('Dynamic require of "' + x + '" is not supported');
13
- });
14
8
  var __esm = (fn, res) => function __init() {
15
9
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
16
10
  };
17
- var __commonJS = (cb, mod2) => function __require2() {
11
+ var __commonJS = (cb, mod2) => function __require() {
18
12
  return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;
19
13
  };
20
14
  var __export = (target, all) => {
@@ -1735,6 +1729,25 @@ async function resolveClosingIssues(owner, name, number, body, token, signal, go
1735
1729
  while ((m = re.exec(body)) !== null) nums.add(parseInt(m[1], 10));
1736
1730
  return { closesIssues: [...nums], linkageSource: nums.size ? "body-keyword" : "none" };
1737
1731
  }
1732
+ async function openPRClosingRefs(owner, name, token, signal, governor) {
1733
+ const q = `query($o:String!,$n:String!){repository(owner:$o,name:$n){pullRequests(states:OPEN,first:100){totalCount nodes{number closingIssuesReferences(first:20){nodes{number}}}}}rateLimit{cost remaining}}`;
1734
+ try {
1735
+ const r = await ghGraphQL(q, { o: owner, n: name }, token, signal, governor);
1736
+ if (r === null) return null;
1737
+ if (!r.data?.repository) return null;
1738
+ const prs = r.data.repository.pullRequests;
1739
+ if (prs && prs.nodes !== void 0 && !Array.isArray(prs.nodes)) return null;
1740
+ const nodes = prs?.nodes ?? [];
1741
+ const refs = /* @__PURE__ */ new Set();
1742
+ for (const node of nodes) {
1743
+ for (const ref of node.closingIssuesReferences?.nodes ?? []) refs.add(ref.number);
1744
+ }
1745
+ const totalCount = prs?.totalCount ?? nodes.length;
1746
+ return { refs, capHit: totalCount > nodes.length, totalCount };
1747
+ } catch {
1748
+ return null;
1749
+ }
1750
+ }
1738
1751
  function makeScoringGovernor(governor) {
1739
1752
  return governor ?? makeGitHubGovernor(
1740
1753
  ((url, init) => fetch(url, init)),
@@ -3951,7 +3964,7 @@ function makeClient(fetchImpl, cfg) {
3951
3964
  async function probe(path) {
3952
3965
  return gov.probe(`${GITHUB_API2}${path}`, { headers: authHeaders2() });
3953
3966
  }
3954
- return { raw, json, probe, setSecondaryHint: gov.setSecondaryHint, getStats: gov.getStats };
3967
+ return { raw, json, probe, governor: gov, setSecondaryHint: gov.setSecondaryHint, getStats: gov.getStats };
3955
3968
  }
3956
3969
  async function contributorCount(client, fullName) {
3957
3970
  const res = await client.raw(`/repos/${fullName}/contributors?per_page=1&anon=false`);
@@ -3967,14 +3980,27 @@ async function contributorCount(client, fullName) {
3967
3980
  }
3968
3981
  }
3969
3982
  async function openPRIssueRefs(client, fullName) {
3983
+ const token = process.env["GITHUB_TOKEN"] ?? process.env["GH_TOKEN"];
3984
+ const [owner, name] = fullName.split("/");
3985
+ if (token && owner && name) {
3986
+ const res = await openPRClosingRefs(owner, name, token, void 0, client.governor);
3987
+ if (res === null) return null;
3988
+ if (res.capHit) {
3989
+ console.warn(
3990
+ `[contribute] open-PR closing-ref scan capped at 100/${res.totalCount} open PRs for ${fullName} (closing refs beyond the first 100 open PRs not scanned)`
3991
+ );
3992
+ }
3993
+ return res.refs;
3994
+ }
3970
3995
  const prs = await client.json(
3971
3996
  `/repos/${fullName}/pulls?state=open&per_page=100`
3972
3997
  );
3973
3998
  if (!Array.isArray(prs)) return null;
3974
3999
  const refs = /* @__PURE__ */ new Set();
3975
4000
  for (const pr of prs) {
3976
- for (const m of `${pr.title ?? ""}
3977
- ${pr.body ?? ""}`.matchAll(/#(\d+)\b/g)) {
4001
+ const text = `${pr.title ?? ""}
4002
+ ${pr.body ?? ""}`;
4003
+ for (const m of text.matchAll(/\b(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\s+#(\d+)/gi)) {
3978
4004
  refs.add(Number(m[1]));
3979
4005
  }
3980
4006
  }
@@ -4352,6 +4378,7 @@ var init_contributions = __esm({
4352
4378
  init_contribution_gate();
4353
4379
  init_contribution_classify();
4354
4380
  init_github_bounties();
4381
+ init_github();
4355
4382
  init_http();
4356
4383
  init_gh_governor();
4357
4384
  GITHUB_API2 = "https://api.github.com";
@@ -8200,11 +8227,35 @@ import { createHash as createHash2 } from "crypto";
8200
8227
  function opportunityShortToken(id) {
8201
8228
  return createHash2("sha256").update(id, "utf8").digest("base64url").slice(0, 8);
8202
8229
  }
8203
- var contributeShortToken;
8230
+ function jobShortToken(id) {
8231
+ return createHash2("sha256").update(`job:${id}`, "utf8").digest("base64url").slice(0, 8);
8232
+ }
8233
+ function jobTokenMap(index) {
8234
+ const cached = jobTokenMaps.get(index);
8235
+ if (cached) return cached;
8236
+ const map = /* @__PURE__ */ new Map();
8237
+ for (const job of index.jobs) {
8238
+ const token = jobShortToken(job.id);
8239
+ map.set(token, map.has(token) ? AMBIGUOUS_JOB_TOKEN : job);
8240
+ }
8241
+ jobTokenMaps.set(index, map);
8242
+ return map;
8243
+ }
8244
+ function resolveJobToken(index, token) {
8245
+ const hit = jobTokenMap(index).get(token);
8246
+ return hit && hit !== AMBIGUOUS_JOB_TOKEN ? hit : null;
8247
+ }
8248
+ function _jobTokenMapForTests(index) {
8249
+ return jobTokenMap(index);
8250
+ }
8251
+ var contributeShortToken, AMBIGUOUS_JOB_TOKEN, jobTokenMaps, _AMBIGUOUS_JOB_TOKEN_FOR_TESTS;
8204
8252
  var init_short_token = __esm({
8205
8253
  "../../packages/core/src/short-token.ts"() {
8206
8254
  "use strict";
8207
8255
  contributeShortToken = opportunityShortToken;
8256
+ AMBIGUOUS_JOB_TOKEN = /* @__PURE__ */ Symbol("ambiguous-job-token");
8257
+ jobTokenMaps = /* @__PURE__ */ new WeakMap();
8258
+ _AMBIGUOUS_JOB_TOKEN_FOR_TESTS = AMBIGUOUS_JOB_TOKEN;
8208
8259
  }
8209
8260
  });
8210
8261
 
@@ -8252,6 +8303,8 @@ __export(src_exports, {
8252
8303
  VOCABULARY: () => VOCABULARY,
8253
8304
  VOCAB_NODES: () => VOCAB_NODES,
8254
8305
  WINNABILITY_NORM: () => WINNABILITY_NORM,
8306
+ _AMBIGUOUS_JOB_TOKEN_FOR_TESTS: () => _AMBIGUOUS_JOB_TOKEN_FOR_TESTS,
8307
+ _jobTokenMapForTests: () => _jobTokenMapForTests,
8255
8308
  acceptanceCountForDomains: () => acceptanceCountForDomains,
8256
8309
  aggregate: () => aggregate,
8257
8310
  aggregateBounties: () => aggregateBounties,
@@ -8318,6 +8371,7 @@ __export(src_exports, {
8318
8371
  isOverIntroLimit: () => isOverIntroLimit,
8319
8372
  isTrivialPRTitle: () => isTrivialPRTitle,
8320
8373
  isWinnableIssue: () => isWinnableIssue,
8374
+ jobShortToken: () => jobShortToken,
8321
8375
  joinLabels: () => joinLabels,
8322
8376
  labelFor: () => labelFor,
8323
8377
  lever: () => lever,
@@ -8331,6 +8385,7 @@ __export(src_exports, {
8331
8385
  mergeProbability: () => mergeProbability,
8332
8386
  mmrRerank: () => mmrRerank,
8333
8387
  normalize: () => normalize,
8388
+ openPRClosingRefs: () => openPRClosingRefs,
8334
8389
  opire: () => opire,
8335
8390
  opportunityShortToken: () => opportunityShortToken,
8336
8391
  pageMatches: () => pageMatches,
@@ -8345,6 +8400,7 @@ __export(src_exports, {
8345
8400
  recordClick: () => recordClick,
8346
8401
  rejectExtraIntroFields: () => rejectExtraIntroFields,
8347
8402
  relevanceScore: () => relevanceScore,
8403
+ resolveJobToken: () => resolveJobToken,
8348
8404
  revealIntroContacts: () => revealIntroContacts,
8349
8405
  rosterActiveFromContribution: () => rosterActiveFromContribution,
8350
8406
  safetyNumber: () => safetyNumber,
@@ -8386,61 +8442,19 @@ var init_src = __esm({
8386
8442
  }
8387
8443
  });
8388
8444
 
8389
- // ../../node_modules/keytar/build/Release/keytar.node
8390
- var keytar_default;
8391
- var init_keytar = __esm({
8392
- "../../node_modules/keytar/build/Release/keytar.node"() {
8393
- keytar_default = "../keytar-KOAAH267.node";
8394
- }
8395
- });
8396
-
8397
- // node-file:/private/tmp/claude-501/-Users-ericgang-job-placement-inline/9716ff9c-0531-4844-adf4-286763cf8ab8/scratchpad/deeplink-wt/node_modules/keytar/build/Release/keytar.node
8398
- var require_keytar = __commonJS({
8399
- "node-file:/private/tmp/claude-501/-Users-ericgang-job-placement-inline/9716ff9c-0531-4844-adf4-286763cf8ab8/scratchpad/deeplink-wt/node_modules/keytar/build/Release/keytar.node"(exports, module) {
8400
- "use strict";
8401
- init_keytar();
8402
- try {
8403
- module.exports = __require(keytar_default);
8404
- } catch {
8405
- }
8406
- }
8407
- });
8408
-
8409
8445
  // ../../node_modules/keytar/lib/keytar.js
8410
- var require_keytar2 = __commonJS({
8446
+ var require_keytar = __commonJS({
8411
8447
  "../../node_modules/keytar/lib/keytar.js"(exports, module) {
8412
8448
  "use strict";
8413
- var keytar = require_keytar();
8414
- function checkRequired(val, name) {
8415
- if (!val || val.length <= 0) {
8416
- throw new Error(name + " is required.");
8417
- }
8449
+ function disabled() {
8450
+ throw new Error("keytar disabled in this dev checkout (keychain popup guard) \u2014 key-file fallback expected");
8418
8451
  }
8419
8452
  module.exports = {
8420
- getPassword: function(service, account) {
8421
- checkRequired(service, "Service");
8422
- checkRequired(account, "Account");
8423
- return keytar.getPassword(service, account);
8424
- },
8425
- setPassword: function(service, account, password) {
8426
- checkRequired(service, "Service");
8427
- checkRequired(account, "Account");
8428
- checkRequired(password, "Password");
8429
- return keytar.setPassword(service, account, password);
8430
- },
8431
- deletePassword: function(service, account) {
8432
- checkRequired(service, "Service");
8433
- checkRequired(account, "Account");
8434
- return keytar.deletePassword(service, account);
8435
- },
8436
- findPassword: function(service) {
8437
- checkRequired(service, "Service");
8438
- return keytar.findPassword(service);
8439
- },
8440
- findCredentials: function(service) {
8441
- checkRequired(service, "Service");
8442
- return keytar.findCredentials(service);
8443
- }
8453
+ getPassword: disabled,
8454
+ setPassword: disabled,
8455
+ deletePassword: disabled,
8456
+ findPassword: disabled,
8457
+ findCredentials: disabled
8444
8458
  };
8445
8459
  }
8446
8460
  });
@@ -8492,7 +8506,7 @@ function skipKeychain() {
8492
8506
  async function tryLoadFromKeytar(policy) {
8493
8507
  if (forceKeytarUnavailableForTests || skipKeychain()) return null;
8494
8508
  try {
8495
- const kt = policy === "keychain-required" ? createRequire(import.meta.url)("keytar") : await Promise.resolve().then(() => __toESM(require_keytar2(), 1));
8509
+ const kt = policy === "keychain-required" ? createRequire(import.meta.url)("keytar") : await Promise.resolve().then(() => __toESM(require_keytar(), 1));
8496
8510
  const stored = await kt.getPassword(KEYTAR_SERVICE, KEYTAR_ACCOUNT);
8497
8511
  if (stored) {
8498
8512
  return Buffer.from(stored, "hex");
@@ -8533,7 +8547,7 @@ async function deleteKey() {
8533
8547
  }
8534
8548
  if (!forceKeytarUnavailableForTests && !skipKeychain()) {
8535
8549
  try {
8536
- const kt = await Promise.resolve().then(() => __toESM(require_keytar2(), 1));
8550
+ const kt = await Promise.resolve().then(() => __toESM(require_keytar(), 1));
8537
8551
  await kt.deletePassword(KEYTAR_SERVICE, KEYTAR_ACCOUNT);
8538
8552
  } catch {
8539
8553
  }
@@ -5,16 +5,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
- }) : x)(function(x) {
11
- if (typeof require !== "undefined") return require.apply(this, arguments);
12
- throw Error('Dynamic require of "' + x + '" is not supported');
13
- });
14
8
  var __esm = (fn, res) => function __init() {
15
9
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
16
10
  };
17
- var __commonJS = (cb, mod2) => function __require2() {
11
+ var __commonJS = (cb, mod2) => function __require() {
18
12
  return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;
19
13
  };
20
14
  var __copyProps = (to, from, except, desc) => {
@@ -890,6 +884,7 @@ var init_contributions = __esm({
890
884
  init_contribution_gate();
891
885
  init_contribution_classify();
892
886
  init_github_bounties();
887
+ init_github();
893
888
  init_http();
894
889
  init_gh_governor();
895
890
  CONTRIB_LABEL_QUERIES = [
@@ -4112,61 +4107,19 @@ var init_src = __esm({
4112
4107
  }
4113
4108
  });
4114
4109
 
4115
- // ../../node_modules/keytar/build/Release/keytar.node
4116
- var keytar_default;
4117
- var init_keytar = __esm({
4118
- "../../node_modules/keytar/build/Release/keytar.node"() {
4119
- keytar_default = "../keytar-KOAAH267.node";
4120
- }
4121
- });
4122
-
4123
- // node-file:/private/tmp/claude-501/-Users-ericgang-job-placement-inline/9716ff9c-0531-4844-adf4-286763cf8ab8/scratchpad/deeplink-wt/node_modules/keytar/build/Release/keytar.node
4124
- var require_keytar = __commonJS({
4125
- "node-file:/private/tmp/claude-501/-Users-ericgang-job-placement-inline/9716ff9c-0531-4844-adf4-286763cf8ab8/scratchpad/deeplink-wt/node_modules/keytar/build/Release/keytar.node"(exports, module) {
4126
- "use strict";
4127
- init_keytar();
4128
- try {
4129
- module.exports = __require(keytar_default);
4130
- } catch {
4131
- }
4132
- }
4133
- });
4134
-
4135
4110
  // ../../node_modules/keytar/lib/keytar.js
4136
- var require_keytar2 = __commonJS({
4111
+ var require_keytar = __commonJS({
4137
4112
  "../../node_modules/keytar/lib/keytar.js"(exports, module) {
4138
4113
  "use strict";
4139
- var keytar = require_keytar();
4140
- function checkRequired(val, name) {
4141
- if (!val || val.length <= 0) {
4142
- throw new Error(name + " is required.");
4143
- }
4114
+ function disabled() {
4115
+ throw new Error("keytar disabled in this dev checkout (keychain popup guard) \u2014 key-file fallback expected");
4144
4116
  }
4145
4117
  module.exports = {
4146
- getPassword: function(service, account) {
4147
- checkRequired(service, "Service");
4148
- checkRequired(account, "Account");
4149
- return keytar.getPassword(service, account);
4150
- },
4151
- setPassword: function(service, account, password) {
4152
- checkRequired(service, "Service");
4153
- checkRequired(account, "Account");
4154
- checkRequired(password, "Password");
4155
- return keytar.setPassword(service, account, password);
4156
- },
4157
- deletePassword: function(service, account) {
4158
- checkRequired(service, "Service");
4159
- checkRequired(account, "Account");
4160
- return keytar.deletePassword(service, account);
4161
- },
4162
- findPassword: function(service) {
4163
- checkRequired(service, "Service");
4164
- return keytar.findPassword(service);
4165
- },
4166
- findCredentials: function(service) {
4167
- checkRequired(service, "Service");
4168
- return keytar.findCredentials(service);
4169
- }
4118
+ getPassword: disabled,
4119
+ setPassword: disabled,
4120
+ deletePassword: disabled,
4121
+ findPassword: disabled,
4122
+ findCredentials: disabled
4170
4123
  };
4171
4124
  }
4172
4125
  });
@@ -4193,7 +4146,7 @@ function skipKeychain() {
4193
4146
  async function loadKey() {
4194
4147
  if (!skipKeychain()) {
4195
4148
  try {
4196
- const kt = await Promise.resolve().then(() => __toESM(require_keytar2(), 1));
4149
+ const kt = await Promise.resolve().then(() => __toESM(require_keytar(), 1));
4197
4150
  const stored = await kt.getPassword("terminalhire", "profile-key");
4198
4151
  if (stored) return Buffer.from(stored, "hex");
4199
4152
  const key2 = randomBytes3(KEY_BYTES);
@@ -4585,7 +4538,8 @@ var init_config = __esm({
4585
4538
  betaOptIn: false,
4586
4539
  lastFullFeedbackAt: null,
4587
4540
  lastPulseAskAt: null,
4588
- pulseDisclosed: false
4541
+ pulseDisclosed: false,
4542
+ mix: "balanced"
4589
4543
  };
4590
4544
  }
4591
4545
  });
@@ -5,16 +5,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
- }) : x)(function(x) {
11
- if (typeof require !== "undefined") return require.apply(this, arguments);
12
- throw Error('Dynamic require of "' + x + '" is not supported');
13
- });
14
8
  var __esm = (fn, res) => function __init() {
15
9
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
16
10
  };
17
- var __commonJS = (cb, mod2) => function __require2() {
11
+ var __commonJS = (cb, mod2) => function __require() {
18
12
  return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;
19
13
  };
20
14
  var __export = (target, all) => {
@@ -907,6 +901,7 @@ var init_contributions = __esm({
907
901
  init_contribution_gate();
908
902
  init_contribution_classify();
909
903
  init_github_bounties();
904
+ init_github();
910
905
  init_http();
911
906
  init_gh_governor();
912
907
  CONTRIB_LABEL_QUERIES = [
@@ -4140,61 +4135,19 @@ var init_src = __esm({
4140
4135
  }
4141
4136
  });
4142
4137
 
4143
- // ../../node_modules/keytar/build/Release/keytar.node
4144
- var keytar_default;
4145
- var init_keytar = __esm({
4146
- "../../node_modules/keytar/build/Release/keytar.node"() {
4147
- keytar_default = "../keytar-KOAAH267.node";
4148
- }
4149
- });
4150
-
4151
- // node-file:/private/tmp/claude-501/-Users-ericgang-job-placement-inline/9716ff9c-0531-4844-adf4-286763cf8ab8/scratchpad/deeplink-wt/node_modules/keytar/build/Release/keytar.node
4152
- var require_keytar = __commonJS({
4153
- "node-file:/private/tmp/claude-501/-Users-ericgang-job-placement-inline/9716ff9c-0531-4844-adf4-286763cf8ab8/scratchpad/deeplink-wt/node_modules/keytar/build/Release/keytar.node"(exports, module) {
4154
- "use strict";
4155
- init_keytar();
4156
- try {
4157
- module.exports = __require(keytar_default);
4158
- } catch {
4159
- }
4160
- }
4161
- });
4162
-
4163
4138
  // ../../node_modules/keytar/lib/keytar.js
4164
- var require_keytar2 = __commonJS({
4139
+ var require_keytar = __commonJS({
4165
4140
  "../../node_modules/keytar/lib/keytar.js"(exports, module) {
4166
4141
  "use strict";
4167
- var keytar = require_keytar();
4168
- function checkRequired(val, name) {
4169
- if (!val || val.length <= 0) {
4170
- throw new Error(name + " is required.");
4171
- }
4142
+ function disabled() {
4143
+ throw new Error("keytar disabled in this dev checkout (keychain popup guard) \u2014 key-file fallback expected");
4172
4144
  }
4173
4145
  module.exports = {
4174
- getPassword: function(service, account) {
4175
- checkRequired(service, "Service");
4176
- checkRequired(account, "Account");
4177
- return keytar.getPassword(service, account);
4178
- },
4179
- setPassword: function(service, account, password) {
4180
- checkRequired(service, "Service");
4181
- checkRequired(account, "Account");
4182
- checkRequired(password, "Password");
4183
- return keytar.setPassword(service, account, password);
4184
- },
4185
- deletePassword: function(service, account) {
4186
- checkRequired(service, "Service");
4187
- checkRequired(account, "Account");
4188
- return keytar.deletePassword(service, account);
4189
- },
4190
- findPassword: function(service) {
4191
- checkRequired(service, "Service");
4192
- return keytar.findPassword(service);
4193
- },
4194
- findCredentials: function(service) {
4195
- checkRequired(service, "Service");
4196
- return keytar.findCredentials(service);
4197
- }
4146
+ getPassword: disabled,
4147
+ setPassword: disabled,
4148
+ deletePassword: disabled,
4149
+ findPassword: disabled,
4150
+ findCredentials: disabled
4198
4151
  };
4199
4152
  }
4200
4153
  });
@@ -4221,7 +4174,7 @@ function skipKeychain() {
4221
4174
  async function loadKey() {
4222
4175
  if (!skipKeychain()) {
4223
4176
  try {
4224
- const kt = await Promise.resolve().then(() => __toESM(require_keytar2(), 1));
4177
+ const kt = await Promise.resolve().then(() => __toESM(require_keytar(), 1));
4225
4178
  const stored = await kt.getPassword("terminalhire", "profile-key");
4226
4179
  if (stored) return Buffer.from(stored, "hex");
4227
4180
  const key2 = randomBytes3(KEY_BYTES);
@@ -4613,7 +4566,8 @@ var init_config = __esm({
4613
4566
  betaOptIn: false,
4614
4567
  lastFullFeedbackAt: null,
4615
4568
  lastPulseAskAt: null,
4616
- pulseDisclosed: false
4569
+ pulseDisclosed: false,
4570
+ mix: "balanced"
4617
4571
  };
4618
4572
  }
4619
4573
  });
@@ -5119,7 +5073,7 @@ function skipKeychain2() {
5119
5073
  async function tryLoadFromKeytar(policy) {
5120
5074
  if (forceKeytarUnavailableForTests || skipKeychain2()) return null;
5121
5075
  try {
5122
- const kt = policy === "keychain-required" ? createRequire(import.meta.url)("keytar") : await Promise.resolve().then(() => __toESM(require_keytar2(), 1));
5076
+ const kt = policy === "keychain-required" ? createRequire(import.meta.url)("keytar") : await Promise.resolve().then(() => __toESM(require_keytar(), 1));
5123
5077
  const stored = await kt.getPassword(KEYTAR_SERVICE, KEYTAR_ACCOUNT);
5124
5078
  if (stored) {
5125
5079
  return Buffer.from(stored, "hex");
@@ -5160,7 +5114,7 @@ async function deleteKey() {
5160
5114
  }
5161
5115
  if (!forceKeytarUnavailableForTests && !skipKeychain2()) {
5162
5116
  try {
5163
- const kt = await Promise.resolve().then(() => __toESM(require_keytar2(), 1));
5117
+ const kt = await Promise.resolve().then(() => __toESM(require_keytar(), 1));
5164
5118
  await kt.deletePassword(KEYTAR_SERVICE, KEYTAR_ACCOUNT);
5165
5119
  } catch {
5166
5120
  }