terminalhire 0.16.1 → 0.17.1
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.
- package/dist/bin/cache-store.js +33 -0
- package/dist/bin/jpi-bounties.js +161 -29
- package/dist/bin/jpi-chat-read.js +102 -4
- package/dist/bin/jpi-chat.js +104 -7
- package/dist/bin/jpi-contribute.js +157 -31
- package/dist/bin/jpi-devs.js +102 -1
- package/dist/bin/jpi-dispatch.js +23141 -463
- package/dist/bin/jpi-inbox.js +104 -7
- package/dist/bin/jpi-init.js +292 -20
- package/dist/bin/jpi-intro.js +99 -2
- package/dist/bin/jpi-jobs.js +155 -28
- package/dist/bin/jpi-learn.js +98 -1
- package/dist/bin/jpi-link.js +1 -1
- package/dist/bin/jpi-login.js +105 -4
- package/dist/bin/jpi-mcp.js +22364 -0
- package/dist/bin/jpi-profile.js +98 -1
- package/dist/bin/jpi-project.js +13 -0
- package/dist/bin/jpi-refresh.js +223 -94
- package/dist/bin/jpi-save.js +98 -1
- package/dist/bin/jpi-spinner.js +494 -10
- package/dist/bin/jpi-sync.js +99 -2
- package/dist/bin/jpi-trajectory.js +100 -3
- package/dist/bin/mcp-config.js +239 -0
- package/dist/bin/peer-connect-prompt.js +1 -1
- package/dist/bin/spinner.js +494 -4
- package/dist/keytar-KOAAH267.node +0 -0
- package/dist/src/chat-client.js +99 -2
- package/dist/src/chat-keystore.js +98 -1
- package/dist/src/github-auth.js +95 -1
- package/dist/src/intro.js +99 -2
- package/dist/src/link.js +1 -1
- package/dist/src/profile.js +98 -1
- package/dist/src/signal.js +3 -0
- package/dist/src/trajectory.js +100 -3
- package/package.json +3 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// bin/cache-store.js
|
|
2
|
+
import { readFileSync, writeFileSync, mkdirSync, renameSync } from "fs";
|
|
3
|
+
import { join } from "path";
|
|
4
|
+
import { homedir } from "os";
|
|
5
|
+
var TERMINALHIRE_DIR = process.env.TERMINALHIRE_DIR || join(homedir(), ".terminalhire");
|
|
6
|
+
var INDEX_CACHE_FILE = join(TERMINALHIRE_DIR, "index-cache.json");
|
|
7
|
+
var SCHEMA_VERSION = 1;
|
|
8
|
+
var tmpCounter = 0;
|
|
9
|
+
function readCacheEntry() {
|
|
10
|
+
try {
|
|
11
|
+
return JSON.parse(readFileSync(INDEX_CACHE_FILE, "utf8"));
|
|
12
|
+
} catch {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function updateIndexCache(patch) {
|
|
17
|
+
mkdirSync(TERMINALHIRE_DIR, { recursive: true });
|
|
18
|
+
const existing = readCacheEntry() ?? {};
|
|
19
|
+
const entry = {
|
|
20
|
+
...existing,
|
|
21
|
+
...patch,
|
|
22
|
+
schemaVersion: SCHEMA_VERSION,
|
|
23
|
+
ts: Date.now()
|
|
24
|
+
};
|
|
25
|
+
const tmp = `${INDEX_CACHE_FILE}.${process.pid}.${tmpCounter++}.tmp`;
|
|
26
|
+
writeFileSync(tmp, JSON.stringify(entry), "utf8");
|
|
27
|
+
renameSync(tmp, INDEX_CACHE_FILE);
|
|
28
|
+
return entry;
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
readCacheEntry,
|
|
32
|
+
updateIndexCache
|
|
33
|
+
};
|
package/dist/bin/jpi-bounties.js
CHANGED
|
@@ -1,13 +1,42 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
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
|
+
});
|
|
4
14
|
var __esm = (fn, res) => function __init() {
|
|
5
15
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
6
16
|
};
|
|
17
|
+
var __commonJS = (cb, mod2) => function __require2() {
|
|
18
|
+
return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;
|
|
19
|
+
};
|
|
7
20
|
var __export = (target, all) => {
|
|
8
21
|
for (var name in all)
|
|
9
22
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
23
|
};
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
|
+
for (let key of __getOwnPropNames(from))
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
29
|
+
}
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(
|
|
33
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
34
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
35
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
36
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
37
|
+
isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", { value: mod2, enumerable: true }) : target,
|
|
38
|
+
mod2
|
|
39
|
+
));
|
|
11
40
|
|
|
12
41
|
// ../../packages/core/src/types.ts
|
|
13
42
|
function isBounty(job) {
|
|
@@ -2790,21 +2819,21 @@ var init_contributions = __esm({
|
|
|
2790
2819
|
});
|
|
2791
2820
|
|
|
2792
2821
|
// ../../packages/core/src/partners.ts
|
|
2793
|
-
import { readFileSync } from "fs";
|
|
2794
|
-
import { join } from "path";
|
|
2822
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
2823
|
+
import { join as join2 } from "path";
|
|
2795
2824
|
import { fileURLToPath } from "url";
|
|
2796
2825
|
function resolveDataPath() {
|
|
2797
2826
|
try {
|
|
2798
2827
|
const dir = fileURLToPath(new URL("../../../data", import.meta.url));
|
|
2799
|
-
return
|
|
2828
|
+
return join2(dir, "partner-roles.json");
|
|
2800
2829
|
} catch {
|
|
2801
|
-
return
|
|
2830
|
+
return join2(process.cwd(), "data", "partner-roles.json");
|
|
2802
2831
|
}
|
|
2803
2832
|
}
|
|
2804
2833
|
function loadPartnerRoles() {
|
|
2805
2834
|
const filePath = resolveDataPath();
|
|
2806
2835
|
try {
|
|
2807
|
-
const raw =
|
|
2836
|
+
const raw = readFileSync2(filePath, "utf-8");
|
|
2808
2837
|
const parsed = JSON.parse(raw);
|
|
2809
2838
|
if (!Array.isArray(parsed)) {
|
|
2810
2839
|
console.warn("[partners] partner-roles.json is not an array \u2014 skipping");
|
|
@@ -6316,6 +6345,17 @@ var init_legible = __esm({
|
|
|
6316
6345
|
}
|
|
6317
6346
|
});
|
|
6318
6347
|
|
|
6348
|
+
// ../../packages/core/src/short-token.ts
|
|
6349
|
+
import { createHash as createHash2 } from "crypto";
|
|
6350
|
+
function contributeShortToken(id) {
|
|
6351
|
+
return createHash2("sha256").update(id, "utf8").digest("base64url").slice(0, 8);
|
|
6352
|
+
}
|
|
6353
|
+
var init_short_token = __esm({
|
|
6354
|
+
"../../packages/core/src/short-token.ts"() {
|
|
6355
|
+
"use strict";
|
|
6356
|
+
}
|
|
6357
|
+
});
|
|
6358
|
+
|
|
6319
6359
|
// ../../packages/core/src/index.ts
|
|
6320
6360
|
var src_exports = {};
|
|
6321
6361
|
__export(src_exports, {
|
|
@@ -6359,6 +6399,7 @@ __export(src_exports, {
|
|
|
6359
6399
|
composeIntroEmail: () => composeIntroEmail,
|
|
6360
6400
|
computeAcceptanceCredential: () => computeAcceptanceCredential,
|
|
6361
6401
|
computeAcceptanceCredentialPublic: () => computeAcceptanceCredentialPublic,
|
|
6402
|
+
contributeShortToken: () => contributeShortToken,
|
|
6362
6403
|
coreTagsFromTitle: () => coreTagsFromTitle,
|
|
6363
6404
|
decorate: () => decorate,
|
|
6364
6405
|
decryptMessage: () => decryptMessage,
|
|
@@ -6426,6 +6467,66 @@ var init_src = __esm({
|
|
|
6426
6467
|
init_chatCrypto();
|
|
6427
6468
|
init_job_status();
|
|
6428
6469
|
init_legible();
|
|
6470
|
+
init_short_token();
|
|
6471
|
+
}
|
|
6472
|
+
});
|
|
6473
|
+
|
|
6474
|
+
// ../../node_modules/keytar/build/Release/keytar.node
|
|
6475
|
+
var keytar_default;
|
|
6476
|
+
var init_keytar = __esm({
|
|
6477
|
+
"../../node_modules/keytar/build/Release/keytar.node"() {
|
|
6478
|
+
keytar_default = "../keytar-KOAAH267.node";
|
|
6479
|
+
}
|
|
6480
|
+
});
|
|
6481
|
+
|
|
6482
|
+
// node-file:/private/tmp/claude-501/-Users-ericgang-job-placement-inline/3ffac25b-ca95-4a86-9e17-a4cf326551de/scratchpad/rel/node_modules/keytar/build/Release/keytar.node
|
|
6483
|
+
var require_keytar = __commonJS({
|
|
6484
|
+
"node-file:/private/tmp/claude-501/-Users-ericgang-job-placement-inline/3ffac25b-ca95-4a86-9e17-a4cf326551de/scratchpad/rel/node_modules/keytar/build/Release/keytar.node"(exports, module) {
|
|
6485
|
+
"use strict";
|
|
6486
|
+
init_keytar();
|
|
6487
|
+
try {
|
|
6488
|
+
module.exports = __require(keytar_default);
|
|
6489
|
+
} catch {
|
|
6490
|
+
}
|
|
6491
|
+
}
|
|
6492
|
+
});
|
|
6493
|
+
|
|
6494
|
+
// ../../node_modules/keytar/lib/keytar.js
|
|
6495
|
+
var require_keytar2 = __commonJS({
|
|
6496
|
+
"../../node_modules/keytar/lib/keytar.js"(exports, module) {
|
|
6497
|
+
"use strict";
|
|
6498
|
+
var keytar = require_keytar();
|
|
6499
|
+
function checkRequired(val, name) {
|
|
6500
|
+
if (!val || val.length <= 0) {
|
|
6501
|
+
throw new Error(name + " is required.");
|
|
6502
|
+
}
|
|
6503
|
+
}
|
|
6504
|
+
module.exports = {
|
|
6505
|
+
getPassword: function(service, account) {
|
|
6506
|
+
checkRequired(service, "Service");
|
|
6507
|
+
checkRequired(account, "Account");
|
|
6508
|
+
return keytar.getPassword(service, account);
|
|
6509
|
+
},
|
|
6510
|
+
setPassword: function(service, account, password) {
|
|
6511
|
+
checkRequired(service, "Service");
|
|
6512
|
+
checkRequired(account, "Account");
|
|
6513
|
+
checkRequired(password, "Password");
|
|
6514
|
+
return keytar.setPassword(service, account, password);
|
|
6515
|
+
},
|
|
6516
|
+
deletePassword: function(service, account) {
|
|
6517
|
+
checkRequired(service, "Service");
|
|
6518
|
+
checkRequired(account, "Account");
|
|
6519
|
+
return keytar.deletePassword(service, account);
|
|
6520
|
+
},
|
|
6521
|
+
findPassword: function(service) {
|
|
6522
|
+
checkRequired(service, "Service");
|
|
6523
|
+
return keytar.findPassword(service);
|
|
6524
|
+
},
|
|
6525
|
+
findCredentials: function(service) {
|
|
6526
|
+
checkRequired(service, "Service");
|
|
6527
|
+
return keytar.findCredentials(service);
|
|
6528
|
+
}
|
|
6529
|
+
};
|
|
6429
6530
|
}
|
|
6430
6531
|
});
|
|
6431
6532
|
|
|
@@ -6449,16 +6550,16 @@ import {
|
|
|
6449
6550
|
randomBytes as randomBytes3
|
|
6450
6551
|
} from "crypto";
|
|
6451
6552
|
import {
|
|
6452
|
-
readFileSync as
|
|
6453
|
-
writeFileSync,
|
|
6454
|
-
mkdirSync,
|
|
6553
|
+
readFileSync as readFileSync3,
|
|
6554
|
+
writeFileSync as writeFileSync2,
|
|
6555
|
+
mkdirSync as mkdirSync2,
|
|
6455
6556
|
existsSync
|
|
6456
6557
|
} from "fs";
|
|
6457
|
-
import { join as
|
|
6458
|
-
import { homedir } from "os";
|
|
6558
|
+
import { join as join3 } from "path";
|
|
6559
|
+
import { homedir as homedir2 } from "os";
|
|
6459
6560
|
async function loadKey() {
|
|
6460
6561
|
try {
|
|
6461
|
-
const kt = await
|
|
6562
|
+
const kt = await Promise.resolve().then(() => __toESM(require_keytar2(), 1));
|
|
6462
6563
|
const stored = await kt.getPassword("terminalhire", "profile-key");
|
|
6463
6564
|
if (stored) {
|
|
6464
6565
|
return Buffer.from(stored, "hex");
|
|
@@ -6468,12 +6569,12 @@ async function loadKey() {
|
|
|
6468
6569
|
return key2;
|
|
6469
6570
|
} catch {
|
|
6470
6571
|
}
|
|
6471
|
-
|
|
6572
|
+
mkdirSync2(TERMINALHIRE_DIR2, { recursive: true });
|
|
6472
6573
|
if (existsSync(KEY_FILE)) {
|
|
6473
|
-
return Buffer.from(
|
|
6574
|
+
return Buffer.from(readFileSync3(KEY_FILE, "utf8").trim(), "hex");
|
|
6474
6575
|
}
|
|
6475
6576
|
const key = randomBytes3(KEY_BYTES);
|
|
6476
|
-
|
|
6577
|
+
writeFileSync2(KEY_FILE, key.toString("hex"), { mode: 384, encoding: "utf8" });
|
|
6477
6578
|
return key;
|
|
6478
6579
|
}
|
|
6479
6580
|
function encrypt(plaintext, key) {
|
|
@@ -6534,7 +6635,7 @@ async function readProfile() {
|
|
|
6534
6635
|
if (!existsSync(PROFILE_FILE)) return blankProfile();
|
|
6535
6636
|
try {
|
|
6536
6637
|
const key = await loadKey();
|
|
6537
|
-
const raw =
|
|
6638
|
+
const raw = readFileSync3(PROFILE_FILE, "utf8");
|
|
6538
6639
|
const blob = JSON.parse(raw);
|
|
6539
6640
|
const plaintext = decrypt(blob, key);
|
|
6540
6641
|
const parsed = JSON.parse(plaintext);
|
|
@@ -6545,12 +6646,12 @@ async function readProfile() {
|
|
|
6545
6646
|
}
|
|
6546
6647
|
}
|
|
6547
6648
|
async function writeProfile(profile) {
|
|
6548
|
-
|
|
6649
|
+
mkdirSync2(TERMINALHIRE_DIR2, { recursive: true });
|
|
6549
6650
|
const key = await loadKey();
|
|
6550
6651
|
profile.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
6551
6652
|
profile.skillTags = deriveSkillTags(profile.tagWeights);
|
|
6552
6653
|
const blob = encrypt(JSON.stringify(profile), key);
|
|
6553
|
-
|
|
6654
|
+
writeFileSync2(PROFILE_FILE, JSON.stringify(blob, null, 2), { encoding: "utf8" });
|
|
6554
6655
|
}
|
|
6555
6656
|
function accumulateSession(profile, tags, isEmployerContext, inferredSeniority, seniorityIsAuthoritative = false) {
|
|
6556
6657
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -6634,14 +6735,14 @@ function profileToFingerprint(profile) {
|
|
|
6634
6735
|
}
|
|
6635
6736
|
};
|
|
6636
6737
|
}
|
|
6637
|
-
var
|
|
6738
|
+
var TERMINALHIRE_DIR2, PROFILE_FILE, KEY_FILE, ALGO, KEY_BYTES, IV_BYTES, DECAY_HALF_LIFE_MS, LANGUAGE_TAGS, MIN_FINGERPRINT_SCORE;
|
|
6638
6739
|
var init_profile = __esm({
|
|
6639
6740
|
"src/profile.ts"() {
|
|
6640
6741
|
"use strict";
|
|
6641
6742
|
init_src();
|
|
6642
|
-
|
|
6643
|
-
PROFILE_FILE =
|
|
6644
|
-
KEY_FILE =
|
|
6743
|
+
TERMINALHIRE_DIR2 = join3(homedir2(), ".terminalhire");
|
|
6744
|
+
PROFILE_FILE = join3(TERMINALHIRE_DIR2, "profile.enc");
|
|
6745
|
+
KEY_FILE = join3(TERMINALHIRE_DIR2, "key");
|
|
6645
6746
|
ALGO = "aes-256-gcm";
|
|
6646
6747
|
KEY_BYTES = 32;
|
|
6647
6748
|
IV_BYTES = 12;
|
|
@@ -6670,12 +6771,44 @@ var init_profile = __esm({
|
|
|
6670
6771
|
});
|
|
6671
6772
|
|
|
6672
6773
|
// bin/jpi-bounties.js
|
|
6673
|
-
import { readFileSync as
|
|
6674
|
-
import { join as
|
|
6675
|
-
import { homedir as
|
|
6774
|
+
import { readFileSync as readFileSync4 } from "fs";
|
|
6775
|
+
import { join as join4 } from "path";
|
|
6776
|
+
import { homedir as homedir3 } from "os";
|
|
6676
6777
|
import { createInterface } from "readline";
|
|
6677
|
-
|
|
6678
|
-
|
|
6778
|
+
|
|
6779
|
+
// bin/cache-store.js
|
|
6780
|
+
import { readFileSync, writeFileSync, mkdirSync, renameSync } from "fs";
|
|
6781
|
+
import { join } from "path";
|
|
6782
|
+
import { homedir } from "os";
|
|
6783
|
+
var TERMINALHIRE_DIR = process.env.TERMINALHIRE_DIR || join(homedir(), ".terminalhire");
|
|
6784
|
+
var INDEX_CACHE_FILE = join(TERMINALHIRE_DIR, "index-cache.json");
|
|
6785
|
+
var SCHEMA_VERSION = 1;
|
|
6786
|
+
var tmpCounter = 0;
|
|
6787
|
+
function readCacheEntry() {
|
|
6788
|
+
try {
|
|
6789
|
+
return JSON.parse(readFileSync(INDEX_CACHE_FILE, "utf8"));
|
|
6790
|
+
} catch {
|
|
6791
|
+
return null;
|
|
6792
|
+
}
|
|
6793
|
+
}
|
|
6794
|
+
function updateIndexCache(patch) {
|
|
6795
|
+
mkdirSync(TERMINALHIRE_DIR, { recursive: true });
|
|
6796
|
+
const existing = readCacheEntry() ?? {};
|
|
6797
|
+
const entry = {
|
|
6798
|
+
...existing,
|
|
6799
|
+
...patch,
|
|
6800
|
+
schemaVersion: SCHEMA_VERSION,
|
|
6801
|
+
ts: Date.now()
|
|
6802
|
+
};
|
|
6803
|
+
const tmp = `${INDEX_CACHE_FILE}.${process.pid}.${tmpCounter++}.tmp`;
|
|
6804
|
+
writeFileSync(tmp, JSON.stringify(entry), "utf8");
|
|
6805
|
+
renameSync(tmp, INDEX_CACHE_FILE);
|
|
6806
|
+
return entry;
|
|
6807
|
+
}
|
|
6808
|
+
|
|
6809
|
+
// bin/jpi-bounties.js
|
|
6810
|
+
var TERMINALHIRE_DIR3 = process.env.TERMINALHIRE_DIR || join4(homedir3(), ".terminalhire");
|
|
6811
|
+
var INDEX_CACHE_FILE2 = join4(TERMINALHIRE_DIR3, "index-cache.json");
|
|
6679
6812
|
var INDEX_TTL_MS = 15 * 60 * 1e3;
|
|
6680
6813
|
var API_URL = process.env["TERMINALHIRE_API_URL"] ?? process.env["JPI_API_URL"] ?? "https://terminalhire.com";
|
|
6681
6814
|
var DEFAULT_LIMIT = 15;
|
|
@@ -6687,7 +6820,7 @@ var SHOW_ALL = args.includes("--all");
|
|
|
6687
6820
|
var WINNABLE_ONLY = args.includes("--winnable");
|
|
6688
6821
|
function readIndexCache() {
|
|
6689
6822
|
try {
|
|
6690
|
-
const entry = JSON.parse(
|
|
6823
|
+
const entry = JSON.parse(readFileSync4(INDEX_CACHE_FILE2, "utf8"));
|
|
6691
6824
|
if (Date.now() - entry.ts < INDEX_TTL_MS) return entry.index;
|
|
6692
6825
|
return null;
|
|
6693
6826
|
} catch {
|
|
@@ -6695,8 +6828,7 @@ function readIndexCache() {
|
|
|
6695
6828
|
}
|
|
6696
6829
|
}
|
|
6697
6830
|
function writeIndexCache(index) {
|
|
6698
|
-
|
|
6699
|
-
writeFileSync2(INDEX_CACHE_FILE, JSON.stringify({ ts: Date.now(), index }), "utf8");
|
|
6831
|
+
updateIndexCache({ index });
|
|
6700
6832
|
}
|
|
6701
6833
|
async function fetchIndex() {
|
|
6702
6834
|
const cached = readIndexCache();
|
|
@@ -1,8 +1,38 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
2
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
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
|
+
});
|
|
3
14
|
var __esm = (fn, res) => function __init() {
|
|
4
15
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
5
16
|
};
|
|
17
|
+
var __commonJS = (cb, mod2) => function __require2() {
|
|
18
|
+
return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", { value: mod2, enumerable: true }) : target,
|
|
34
|
+
mod2
|
|
35
|
+
));
|
|
6
36
|
|
|
7
37
|
// ../../packages/core/src/types.ts
|
|
8
38
|
var init_types = __esm({
|
|
@@ -3835,6 +3865,14 @@ var init_legible = __esm({
|
|
|
3835
3865
|
}
|
|
3836
3866
|
});
|
|
3837
3867
|
|
|
3868
|
+
// ../../packages/core/src/short-token.ts
|
|
3869
|
+
import { createHash as createHash2 } from "crypto";
|
|
3870
|
+
var init_short_token = __esm({
|
|
3871
|
+
"../../packages/core/src/short-token.ts"() {
|
|
3872
|
+
"use strict";
|
|
3873
|
+
}
|
|
3874
|
+
});
|
|
3875
|
+
|
|
3838
3876
|
// ../../packages/core/src/index.ts
|
|
3839
3877
|
var init_src = __esm({
|
|
3840
3878
|
"../../packages/core/src/index.ts"() {
|
|
@@ -3851,6 +3889,66 @@ var init_src = __esm({
|
|
|
3851
3889
|
init_chatCrypto();
|
|
3852
3890
|
init_job_status();
|
|
3853
3891
|
init_legible();
|
|
3892
|
+
init_short_token();
|
|
3893
|
+
}
|
|
3894
|
+
});
|
|
3895
|
+
|
|
3896
|
+
// ../../node_modules/keytar/build/Release/keytar.node
|
|
3897
|
+
var keytar_default;
|
|
3898
|
+
var init_keytar = __esm({
|
|
3899
|
+
"../../node_modules/keytar/build/Release/keytar.node"() {
|
|
3900
|
+
keytar_default = "../keytar-KOAAH267.node";
|
|
3901
|
+
}
|
|
3902
|
+
});
|
|
3903
|
+
|
|
3904
|
+
// node-file:/private/tmp/claude-501/-Users-ericgang-job-placement-inline/3ffac25b-ca95-4a86-9e17-a4cf326551de/scratchpad/rel/node_modules/keytar/build/Release/keytar.node
|
|
3905
|
+
var require_keytar = __commonJS({
|
|
3906
|
+
"node-file:/private/tmp/claude-501/-Users-ericgang-job-placement-inline/3ffac25b-ca95-4a86-9e17-a4cf326551de/scratchpad/rel/node_modules/keytar/build/Release/keytar.node"(exports, module) {
|
|
3907
|
+
"use strict";
|
|
3908
|
+
init_keytar();
|
|
3909
|
+
try {
|
|
3910
|
+
module.exports = __require(keytar_default);
|
|
3911
|
+
} catch {
|
|
3912
|
+
}
|
|
3913
|
+
}
|
|
3914
|
+
});
|
|
3915
|
+
|
|
3916
|
+
// ../../node_modules/keytar/lib/keytar.js
|
|
3917
|
+
var require_keytar2 = __commonJS({
|
|
3918
|
+
"../../node_modules/keytar/lib/keytar.js"(exports, module) {
|
|
3919
|
+
"use strict";
|
|
3920
|
+
var keytar = require_keytar();
|
|
3921
|
+
function checkRequired(val, name) {
|
|
3922
|
+
if (!val || val.length <= 0) {
|
|
3923
|
+
throw new Error(name + " is required.");
|
|
3924
|
+
}
|
|
3925
|
+
}
|
|
3926
|
+
module.exports = {
|
|
3927
|
+
getPassword: function(service, account) {
|
|
3928
|
+
checkRequired(service, "Service");
|
|
3929
|
+
checkRequired(account, "Account");
|
|
3930
|
+
return keytar.getPassword(service, account);
|
|
3931
|
+
},
|
|
3932
|
+
setPassword: function(service, account, password) {
|
|
3933
|
+
checkRequired(service, "Service");
|
|
3934
|
+
checkRequired(account, "Account");
|
|
3935
|
+
checkRequired(password, "Password");
|
|
3936
|
+
return keytar.setPassword(service, account, password);
|
|
3937
|
+
},
|
|
3938
|
+
deletePassword: function(service, account) {
|
|
3939
|
+
checkRequired(service, "Service");
|
|
3940
|
+
checkRequired(account, "Account");
|
|
3941
|
+
return keytar.deletePassword(service, account);
|
|
3942
|
+
},
|
|
3943
|
+
findPassword: function(service) {
|
|
3944
|
+
checkRequired(service, "Service");
|
|
3945
|
+
return keytar.findPassword(service);
|
|
3946
|
+
},
|
|
3947
|
+
findCredentials: function(service) {
|
|
3948
|
+
checkRequired(service, "Service");
|
|
3949
|
+
return keytar.findCredentials(service);
|
|
3950
|
+
}
|
|
3951
|
+
};
|
|
3854
3952
|
}
|
|
3855
3953
|
});
|
|
3856
3954
|
|
|
@@ -3871,7 +3969,7 @@ import { join as join2 } from "path";
|
|
|
3871
3969
|
import { homedir } from "os";
|
|
3872
3970
|
async function loadKey() {
|
|
3873
3971
|
try {
|
|
3874
|
-
const kt = await
|
|
3972
|
+
const kt = await Promise.resolve().then(() => __toESM(require_keytar2(), 1));
|
|
3875
3973
|
const stored = await kt.getPassword("terminalhire", "profile-key");
|
|
3876
3974
|
if (stored) return Buffer.from(stored, "hex");
|
|
3877
3975
|
const key2 = randomBytes3(KEY_BYTES);
|
|
@@ -4178,7 +4276,7 @@ var init_chat_client = __esm({
|
|
|
4178
4276
|
init_src();
|
|
4179
4277
|
init_chat_keystore();
|
|
4180
4278
|
init_web_session();
|
|
4181
|
-
CHAT_BASE = process.env["TERMINALHIRE_API_URL"] || "https://
|
|
4279
|
+
CHAT_BASE = process.env["TERMINALHIRE_API_URL"] || "https://terminalhire.com";
|
|
4182
4280
|
GH_SESSION_COOKIE = "__jpi_gh_session";
|
|
4183
4281
|
TERMINALHIRE_DIR3 = join5(homedir4(), ".terminalhire");
|
|
4184
4282
|
PEERS_FILE = join5(TERMINALHIRE_DIR3, "chat-peers.json");
|
|
@@ -4396,7 +4494,7 @@ var init_jpi_chat = __esm({
|
|
|
4396
4494
|
init_chat_client();
|
|
4397
4495
|
init_config();
|
|
4398
4496
|
init_web_session();
|
|
4399
|
-
CHAT_BASE2 = process.env["TERMINALHIRE_API_URL"] || "https://
|
|
4497
|
+
CHAT_BASE2 = process.env["TERMINALHIRE_API_URL"] || "https://terminalhire.com";
|
|
4400
4498
|
GH_SESSION_COOKIE2 = "__jpi_gh_session";
|
|
4401
4499
|
ANSI_CSI = /\x1b\[[0-?]*[ -/]*[@-~]/g;
|
|
4402
4500
|
ANSI_OSC = /\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)/g;
|
|
@@ -4784,7 +4882,7 @@ var init_jpi_chat_read = __esm({
|
|
|
4784
4882
|
init_chat_client();
|
|
4785
4883
|
init_web_session();
|
|
4786
4884
|
init_jpi_chat();
|
|
4787
|
-
CHAT_BASE3 = process.env["TERMINALHIRE_API_URL"] || "https://
|
|
4885
|
+
CHAT_BASE3 = process.env["TERMINALHIRE_API_URL"] || "https://terminalhire.com";
|
|
4788
4886
|
GH_SESSION_COOKIE3 = "__jpi_gh_session";
|
|
4789
4887
|
TERMINALHIRE_DIR5 = process.env.TERMINALHIRE_DIR || join8(homedir7(), ".terminalhire");
|
|
4790
4888
|
READS_FILE = join8(TERMINALHIRE_DIR5, "chat-reads.json");
|
package/dist/bin/jpi-chat.js
CHANGED
|
@@ -1,13 +1,42 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
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
|
+
});
|
|
4
14
|
var __esm = (fn, res) => function __init() {
|
|
5
15
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
6
16
|
};
|
|
17
|
+
var __commonJS = (cb, mod2) => function __require2() {
|
|
18
|
+
return mod2 || (0, cb[__getOwnPropNames(cb)[0]])((mod2 = { exports: {} }).exports, mod2), mod2.exports;
|
|
19
|
+
};
|
|
7
20
|
var __export = (target, all) => {
|
|
8
21
|
for (var name in all)
|
|
9
22
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
23
|
};
|
|
24
|
+
var __copyProps = (to, from, except, desc) => {
|
|
25
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
26
|
+
for (let key of __getOwnPropNames(from))
|
|
27
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
28
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
29
|
+
}
|
|
30
|
+
return to;
|
|
31
|
+
};
|
|
32
|
+
var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(
|
|
33
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
34
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
35
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
36
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
37
|
+
isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", { value: mod2, enumerable: true }) : target,
|
|
38
|
+
mod2
|
|
39
|
+
));
|
|
11
40
|
|
|
12
41
|
// ../../packages/core/src/types.ts
|
|
13
42
|
var init_types = __esm({
|
|
@@ -3864,6 +3893,14 @@ var init_legible = __esm({
|
|
|
3864
3893
|
}
|
|
3865
3894
|
});
|
|
3866
3895
|
|
|
3896
|
+
// ../../packages/core/src/short-token.ts
|
|
3897
|
+
import { createHash as createHash2 } from "crypto";
|
|
3898
|
+
var init_short_token = __esm({
|
|
3899
|
+
"../../packages/core/src/short-token.ts"() {
|
|
3900
|
+
"use strict";
|
|
3901
|
+
}
|
|
3902
|
+
});
|
|
3903
|
+
|
|
3867
3904
|
// ../../packages/core/src/index.ts
|
|
3868
3905
|
var init_src = __esm({
|
|
3869
3906
|
"../../packages/core/src/index.ts"() {
|
|
@@ -3880,6 +3917,66 @@ var init_src = __esm({
|
|
|
3880
3917
|
init_chatCrypto();
|
|
3881
3918
|
init_job_status();
|
|
3882
3919
|
init_legible();
|
|
3920
|
+
init_short_token();
|
|
3921
|
+
}
|
|
3922
|
+
});
|
|
3923
|
+
|
|
3924
|
+
// ../../node_modules/keytar/build/Release/keytar.node
|
|
3925
|
+
var keytar_default;
|
|
3926
|
+
var init_keytar = __esm({
|
|
3927
|
+
"../../node_modules/keytar/build/Release/keytar.node"() {
|
|
3928
|
+
keytar_default = "../keytar-KOAAH267.node";
|
|
3929
|
+
}
|
|
3930
|
+
});
|
|
3931
|
+
|
|
3932
|
+
// node-file:/private/tmp/claude-501/-Users-ericgang-job-placement-inline/3ffac25b-ca95-4a86-9e17-a4cf326551de/scratchpad/rel/node_modules/keytar/build/Release/keytar.node
|
|
3933
|
+
var require_keytar = __commonJS({
|
|
3934
|
+
"node-file:/private/tmp/claude-501/-Users-ericgang-job-placement-inline/3ffac25b-ca95-4a86-9e17-a4cf326551de/scratchpad/rel/node_modules/keytar/build/Release/keytar.node"(exports, module) {
|
|
3935
|
+
"use strict";
|
|
3936
|
+
init_keytar();
|
|
3937
|
+
try {
|
|
3938
|
+
module.exports = __require(keytar_default);
|
|
3939
|
+
} catch {
|
|
3940
|
+
}
|
|
3941
|
+
}
|
|
3942
|
+
});
|
|
3943
|
+
|
|
3944
|
+
// ../../node_modules/keytar/lib/keytar.js
|
|
3945
|
+
var require_keytar2 = __commonJS({
|
|
3946
|
+
"../../node_modules/keytar/lib/keytar.js"(exports, module) {
|
|
3947
|
+
"use strict";
|
|
3948
|
+
var keytar = require_keytar();
|
|
3949
|
+
function checkRequired(val, name) {
|
|
3950
|
+
if (!val || val.length <= 0) {
|
|
3951
|
+
throw new Error(name + " is required.");
|
|
3952
|
+
}
|
|
3953
|
+
}
|
|
3954
|
+
module.exports = {
|
|
3955
|
+
getPassword: function(service, account) {
|
|
3956
|
+
checkRequired(service, "Service");
|
|
3957
|
+
checkRequired(account, "Account");
|
|
3958
|
+
return keytar.getPassword(service, account);
|
|
3959
|
+
},
|
|
3960
|
+
setPassword: function(service, account, password) {
|
|
3961
|
+
checkRequired(service, "Service");
|
|
3962
|
+
checkRequired(account, "Account");
|
|
3963
|
+
checkRequired(password, "Password");
|
|
3964
|
+
return keytar.setPassword(service, account, password);
|
|
3965
|
+
},
|
|
3966
|
+
deletePassword: function(service, account) {
|
|
3967
|
+
checkRequired(service, "Service");
|
|
3968
|
+
checkRequired(account, "Account");
|
|
3969
|
+
return keytar.deletePassword(service, account);
|
|
3970
|
+
},
|
|
3971
|
+
findPassword: function(service) {
|
|
3972
|
+
checkRequired(service, "Service");
|
|
3973
|
+
return keytar.findPassword(service);
|
|
3974
|
+
},
|
|
3975
|
+
findCredentials: function(service) {
|
|
3976
|
+
checkRequired(service, "Service");
|
|
3977
|
+
return keytar.findCredentials(service);
|
|
3978
|
+
}
|
|
3979
|
+
};
|
|
3883
3980
|
}
|
|
3884
3981
|
});
|
|
3885
3982
|
|
|
@@ -3900,7 +3997,7 @@ import { join as join2 } from "path";
|
|
|
3900
3997
|
import { homedir } from "os";
|
|
3901
3998
|
async function loadKey() {
|
|
3902
3999
|
try {
|
|
3903
|
-
const kt = await
|
|
4000
|
+
const kt = await Promise.resolve().then(() => __toESM(require_keytar2(), 1));
|
|
3904
4001
|
const stored = await kt.getPassword("terminalhire", "profile-key");
|
|
3905
4002
|
if (stored) return Buffer.from(stored, "hex");
|
|
3906
4003
|
const key2 = randomBytes3(KEY_BYTES);
|
|
@@ -4207,7 +4304,7 @@ var init_chat_client = __esm({
|
|
|
4207
4304
|
init_src();
|
|
4208
4305
|
init_chat_keystore();
|
|
4209
4306
|
init_web_session();
|
|
4210
|
-
CHAT_BASE = process.env["TERMINALHIRE_API_URL"] || "https://
|
|
4307
|
+
CHAT_BASE = process.env["TERMINALHIRE_API_URL"] || "https://terminalhire.com";
|
|
4211
4308
|
GH_SESSION_COOKIE = "__jpi_gh_session";
|
|
4212
4309
|
TERMINALHIRE_DIR3 = join5(homedir4(), ".terminalhire");
|
|
4213
4310
|
PEERS_FILE = join5(TERMINALHIRE_DIR3, "chat-peers.json");
|
|
@@ -4682,7 +4779,7 @@ var init_jpi_chat_read = __esm({
|
|
|
4682
4779
|
init_chat_client();
|
|
4683
4780
|
init_web_session();
|
|
4684
4781
|
init_jpi_chat();
|
|
4685
|
-
CHAT_BASE2 = process.env["TERMINALHIRE_API_URL"] || "https://
|
|
4782
|
+
CHAT_BASE2 = process.env["TERMINALHIRE_API_URL"] || "https://terminalhire.com";
|
|
4686
4783
|
GH_SESSION_COOKIE2 = "__jpi_gh_session";
|
|
4687
4784
|
TERMINALHIRE_DIR5 = process.env.TERMINALHIRE_DIR || join7(homedir6(), ".terminalhire");
|
|
4688
4785
|
READS_FILE = join7(TERMINALHIRE_DIR5, "chat-reads.json");
|
|
@@ -4720,7 +4817,7 @@ import { join as join8 } from "path";
|
|
|
4720
4817
|
import { homedir as homedir7 } from "os";
|
|
4721
4818
|
async function loadKey2() {
|
|
4722
4819
|
try {
|
|
4723
|
-
const kt = await
|
|
4820
|
+
const kt = await Promise.resolve().then(() => __toESM(require_keytar2(), 1));
|
|
4724
4821
|
const stored = await kt.getPassword("terminalhire", "profile-key");
|
|
4725
4822
|
if (stored) {
|
|
4726
4823
|
return Buffer.from(stored, "hex");
|
|
@@ -5347,7 +5444,7 @@ var init_intro2 = __esm({
|
|
|
5347
5444
|
"use strict";
|
|
5348
5445
|
init_src();
|
|
5349
5446
|
init_web_session();
|
|
5350
|
-
LINK_BASE = process.env["TERMINALHIRE_API_URL"] || "https://
|
|
5447
|
+
LINK_BASE = process.env["TERMINALHIRE_API_URL"] || "https://terminalhire.com";
|
|
5351
5448
|
GH_SESSION_COOKIE3 = "__jpi_gh_session";
|
|
5352
5449
|
UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
5353
5450
|
}
|
|
@@ -6646,7 +6743,7 @@ var init_jpi_chat = __esm({
|
|
|
6646
6743
|
init_chat_client();
|
|
6647
6744
|
init_config();
|
|
6648
6745
|
init_web_session();
|
|
6649
|
-
CHAT_BASE3 = process.env["TERMINALHIRE_API_URL"] || "https://
|
|
6746
|
+
CHAT_BASE3 = process.env["TERMINALHIRE_API_URL"] || "https://terminalhire.com";
|
|
6650
6747
|
GH_SESSION_COOKIE4 = "__jpi_gh_session";
|
|
6651
6748
|
HIDE_CURSOR2 = "\x1B[?25l";
|
|
6652
6749
|
SHOW_CURSOR2 = "\x1B[?25h";
|
|
@@ -6669,7 +6766,7 @@ var init_jpi_chat = __esm({
|
|
|
6669
6766
|
CHAT_AT_REST = "Your private key is encrypted against casual access, not full machine compromise.";
|
|
6670
6767
|
CHAT_CODE_OF_CONDUCT = "Code of conduct: keep it professional \u2014 harassment, spam, or abuse gets you blocked and removed.";
|
|
6671
6768
|
CHAT_MIN_AGE = "You must be at least 13 years old to use connections chat.";
|
|
6672
|
-
DEPOSIT_CTA = "\n Keep building together \u2014 publish your r\xE9sum\xE9 so more builders find you:\n https://
|
|
6769
|
+
DEPOSIT_CTA = "\n Keep building together \u2014 publish your r\xE9sum\xE9 so more builders find you:\n https://terminalhire.com/dashboard\n\n";
|
|
6673
6770
|
ACTIVE_WINDOW_MS = 2 * 60 * 1e3;
|
|
6674
6771
|
}
|
|
6675
6772
|
});
|