terminalhire 0.42.23 → 0.42.25

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 (48) hide show
  1. package/dist/bin/approved-claims-sync.js +1 -1
  2. package/dist/bin/claim-push-bg.js +6 -4
  3. package/dist/bin/directory.js +1 -1
  4. package/dist/bin/founder-note-sync.js +1 -1
  5. package/dist/bin/founder-verdict-sync.js +1 -1
  6. package/dist/bin/jpi-bounties.js +9 -6
  7. package/dist/bin/jpi-chat-read.js +1 -1
  8. package/dist/bin/jpi-chat.js +3 -3
  9. package/dist/bin/jpi-claim.js +599 -153
  10. package/dist/bin/jpi-contribute.js +3 -3
  11. package/dist/bin/jpi-decline.js +7 -4
  12. package/dist/bin/jpi-devs.js +17 -17
  13. package/dist/bin/jpi-dispatch-dev.js +1 -1
  14. package/dist/bin/jpi-dispatch.js +744 -284
  15. package/dist/bin/jpi-hub.js +1 -1
  16. package/dist/bin/jpi-inbox.js +3 -3
  17. package/dist/bin/jpi-init.js +16 -16
  18. package/dist/bin/jpi-intro.js +3 -3
  19. package/dist/bin/jpi-jobs.js +16 -6
  20. package/dist/bin/jpi-link.js +1 -1
  21. package/dist/bin/jpi-login.js +17 -17
  22. package/dist/bin/jpi-mcp-chat.js +7 -7
  23. package/dist/bin/jpi-mcp.js +635 -189
  24. package/dist/bin/jpi-post.js +3 -3
  25. package/dist/bin/jpi-project.js +16 -16
  26. package/dist/bin/jpi-refresh.js +31 -24
  27. package/dist/bin/jpi-run.js +549 -104
  28. package/dist/bin/jpi-spinner.js +48 -19
  29. package/dist/bin/jpi-statusline.js +1 -1
  30. package/dist/bin/jpi-sync.js +10 -8
  31. package/dist/bin/jpi-trajectory.js +3 -3
  32. package/dist/bin/jpi.js +1 -1
  33. package/dist/bin/peer-connect-prompt.js +1 -1
  34. package/dist/bin/proxy/egressProxy.js +77 -6
  35. package/dist/bin/proxy/proxyEntry.js +10 -2
  36. package/dist/bin/pulse-prompt.js +1 -1
  37. package/dist/bin/recall-check.js +3 -3
  38. package/dist/bin/spinner-io.js +29 -7
  39. package/dist/bin/spinner-render.js +31 -7
  40. package/dist/bin/spinner.js +36 -14
  41. package/dist/src/api-base.js +7 -4
  42. package/dist/src/chat-client.js +1 -1
  43. package/dist/src/intro.js +3 -3
  44. package/dist/src/link.js +1 -1
  45. package/dist/src/state-dir-pin.js +1 -1
  46. package/dist/src/trajectory.js +3 -3
  47. package/dist/src/web-session.js +1 -1
  48. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  // src/api-base.ts
2
2
  import { homedir } from "os";
3
- import { join } from "path";
3
+ import { basename, join, normalize } from "path";
4
4
  var PROD_API_BASE = "https://terminalhire.com";
5
5
  var DEV_API_BASE = "https://dev.terminalhire.com";
6
6
  var ApiBaseError = class extends Error {
@@ -550,7 +550,7 @@ init_state_dir();
550
550
 
551
551
  // src/api-base.ts
552
552
  import { homedir as homedir3 } from "os";
553
- import { join as join4 } from "path";
553
+ import { basename, join as join4, normalize } from "path";
554
554
  var PROD_API_BASE = "https://terminalhire.com";
555
555
  var DEV_API_BASE = "https://dev.terminalhire.com";
556
556
  var DEV_STATE_DIR_NAME = ".terminalhire-dev";
@@ -662,10 +662,12 @@ function warnSharedCredentialsIfNonProd(base, stream = process.stderr) {
662
662
  } catch {
663
663
  }
664
664
  }
665
- function usingSeparateStateDir(env = process.env) {
666
- const dir = env["TERMINALHIRE_DIR"];
665
+ function isDevStateDir(dir) {
667
666
  if (dir === void 0 || dir === "") return false;
668
- return dir.endsWith(DEV_STATE_DIR_NAME);
667
+ return basename(normalize(dir)) === DEV_STATE_DIR_NAME;
668
+ }
669
+ function usingSeparateStateDir(env = process.env) {
670
+ return isDevStateDir(env["TERMINALHIRE_DIR"]);
669
671
  }
670
672
 
671
673
  // bin/claim-push-bg.js
@@ -55,7 +55,7 @@ function ensureStateDir(dir) {
55
55
 
56
56
  // src/api-base.ts
57
57
  import { homedir } from "os";
58
- import { join } from "path";
58
+ import { basename, join, normalize } from "path";
59
59
  var PROD_API_BASE = "https://terminalhire.com";
60
60
  var DEV_API_BASE = "https://dev.terminalhire.com";
61
61
  var ApiBaseError = class extends Error {
@@ -1,6 +1,6 @@
1
1
  // src/api-base.ts
2
2
  import { homedir } from "os";
3
- import { join } from "path";
3
+ import { basename, join, normalize } from "path";
4
4
  var PROD_API_BASE = "https://terminalhire.com";
5
5
  var DEV_API_BASE = "https://dev.terminalhire.com";
6
6
  var ApiBaseError = class extends Error {
@@ -1,6 +1,6 @@
1
1
  // src/api-base.ts
2
2
  import { homedir } from "os";
3
- import { join } from "path";
3
+ import { basename, join, normalize } from "path";
4
4
  var PROD_API_BASE = "https://terminalhire.com";
5
5
  var DEV_API_BASE = "https://dev.terminalhire.com";
6
6
  var ApiBaseError = class extends Error {
@@ -10559,6 +10559,7 @@ __export(api_base_exports, {
10559
10559
  PROD_API_BASE: () => PROD_API_BASE,
10560
10560
  __resetDevMarkerLatchForTests: () => __resetDevMarkerLatchForTests,
10561
10561
  formatDevMarker: () => formatDevMarker,
10562
+ isDevStateDir: () => isDevStateDir,
10562
10563
  isLoopbackOrigin: () => isLoopbackOrigin,
10563
10564
  isNonProdApiBase: () => isNonProdApiBase,
10564
10565
  pinToDevApiBase: () => pinToDevApiBase,
@@ -10568,7 +10569,7 @@ __export(api_base_exports, {
10568
10569
  warnSharedCredentialsIfNonProd: () => warnSharedCredentialsIfNonProd
10569
10570
  });
10570
10571
  import { homedir as homedir2 } from "os";
10571
- import { join as join3 } from "path";
10572
+ import { basename, join as join3, normalize as normalize2 } from "path";
10572
10573
  function sanitizeOverrideForError(raw) {
10573
10574
  try {
10574
10575
  const url = new URL(raw);
@@ -10689,10 +10690,12 @@ function warnSharedCredentialsIfNonProd(base, stream = process.stderr) {
10689
10690
  } catch {
10690
10691
  }
10691
10692
  }
10692
- function usingSeparateStateDir(env = process.env) {
10693
- const dir = env["TERMINALHIRE_DIR"];
10693
+ function isDevStateDir(dir) {
10694
10694
  if (dir === void 0 || dir === "") return false;
10695
- return dir.endsWith(DEV_STATE_DIR_NAME);
10695
+ return basename(normalize2(dir)) === DEV_STATE_DIR_NAME;
10696
+ }
10697
+ function usingSeparateStateDir(env = process.env) {
10698
+ return isDevStateDir(env["TERMINALHIRE_DIR"]);
10696
10699
  }
10697
10700
  var PROD_API_BASE, DEV_API_BASE, DEV_STATE_DIR_NAME, ApiBaseError, ALLOWED_HOSTS, OAUTH_ALLOWED_ORIGINS, ALLOW_LOCAL_OAUTH_KEY, ALLOW_LOCAL_API_KEY, ALLOWED_DESCRIPTION, CANONICAL_REWRITES, ENV_KEYS, markerPrinted;
10698
10701
  var init_api_base = __esm({
@@ -10858,7 +10861,7 @@ var init_shared_key = __esm({
10858
10861
  // src/crypto-store.ts
10859
10862
  import { createCipheriv, createDecipheriv, randomBytes as randomBytes4 } from "crypto";
10860
10863
  import { readFileSync as readFileSync4, writeFileSync as writeFileSync3, existsSync as existsSync3, renameSync as renameSync2, rmSync, readdirSync } from "fs";
10861
- import { join as join6, dirname, basename } from "path";
10864
+ import { join as join6, dirname, basename as basename2 } from "path";
10862
10865
  import { createRequire } from "module";
10863
10866
  function encrypt(plaintext, key) {
10864
10867
  const iv = randomBytes4(IV_BYTES);
@@ -10915,7 +10918,7 @@ function atomicWriteFileSync(filePath, content) {
10915
10918
  ensureStateDirForSecret(dir);
10916
10919
  const tmp = join6(
10917
10920
  dir,
10918
- `.${basename(filePath)}.tmp-${process.pid}-${randomBytes4(6).toString("hex")}`
10921
+ `.${basename2(filePath)}.tmp-${process.pid}-${randomBytes4(6).toString("hex")}`
10919
10922
  );
10920
10923
  writeFileSync3(tmp, content, { encoding: "utf8", mode: 384, flag: "wx" });
10921
10924
  renameSync2(tmp, filePath);
@@ -4582,7 +4582,7 @@ var init_chat_keystore = __esm({
4582
4582
 
4583
4583
  // src/api-base.ts
4584
4584
  import { homedir as homedir4 } from "os";
4585
- import { join as join6 } from "path";
4585
+ import { basename, join as join6, normalize as normalize2 } from "path";
4586
4586
  function sanitizeOverrideForError(raw) {
4587
4587
  try {
4588
4588
  const url = new URL(raw);
@@ -4611,7 +4611,7 @@ var init_chat_keystore = __esm({
4611
4611
 
4612
4612
  // src/api-base.ts
4613
4613
  import { homedir as homedir4 } from "os";
4614
- import { join as join6 } from "path";
4614
+ import { basename, join as join6, normalize as normalize2 } from "path";
4615
4615
  function sanitizeOverrideForError(raw) {
4616
4616
  try {
4617
4617
  const url = new URL(raw);
@@ -5641,7 +5641,7 @@ var init_jpi_chat_read = __esm({
5641
5641
  // src/crypto-store.ts
5642
5642
  import { createCipheriv as createCipheriv2, createDecipheriv as createDecipheriv2, randomBytes as randomBytes6 } from "crypto";
5643
5643
  import { readFileSync as readFileSync9, writeFileSync as writeFileSync8, existsSync as existsSync9, renameSync as renameSync2, rmSync as rmSync4, readdirSync } from "fs";
5644
- import { join as join11, dirname, basename } from "path";
5644
+ import { join as join11, dirname, basename as basename2 } from "path";
5645
5645
  import { createRequire } from "module";
5646
5646
  function encrypt2(plaintext, key) {
5647
5647
  const iv = randomBytes6(IV_BYTES2);
@@ -5698,7 +5698,7 @@ function atomicWriteFileSync(filePath, content) {
5698
5698
  ensureStateDirForSecret(dir);
5699
5699
  const tmp = join11(
5700
5700
  dir,
5701
- `.${basename(filePath)}.tmp-${process.pid}-${randomBytes6(6).toString("hex")}`
5701
+ `.${basename2(filePath)}.tmp-${process.pid}-${randomBytes6(6).toString("hex")}`
5702
5702
  );
5703
5703
  writeFileSync8(tmp, content, { encoding: "utf8", mode: 384, flag: "wx" });
5704
5704
  renameSync2(tmp, filePath);