terminalhire 0.10.9 → 0.10.10
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/jpi-chat-read.js +25 -3
- package/dist/bin/jpi-chat.js +26 -3
- package/dist/bin/jpi-dispatch.js +26 -3
- package/package.json +1 -1
|
@@ -4245,6 +4245,12 @@ async function defaultListConnections(deps = {}) {
|
|
|
4245
4245
|
const connections = listed.intros.filter((it) => it && it.status === "accepted" && it.counterpartyLogin).map((it) => ({ introId: it.id, peerLogin: it.counterpartyLogin }));
|
|
4246
4246
|
return { status: "ok", connections };
|
|
4247
4247
|
}
|
|
4248
|
+
async function defaultListPendingInvites(deps = {}) {
|
|
4249
|
+
const listed = await fetchIntroList(deps);
|
|
4250
|
+
if (listed.status !== "ok") return listed;
|
|
4251
|
+
const invites = listed.intros.filter((it) => it && it.role === "incoming" && it.status === "pending" && it.counterpartyLogin).map((it) => ({ login: it.counterpartyLogin }));
|
|
4252
|
+
return { status: "ok", invites };
|
|
4253
|
+
}
|
|
4248
4254
|
var CHAT_BASE2, GH_SESSION_COOKIE2, ANSI_CSI, ANSI_OSC, ANSI_OTHER, C0_C1_DEL, CHAT_DISCLOSURE, CHAT_AT_REST, CHAT_CODE_OF_CONDUCT, CHAT_MIN_AGE;
|
|
4249
4255
|
var init_jpi_chat = __esm({
|
|
4250
4256
|
"bin/jpi-chat.js"() {
|
|
@@ -4353,10 +4359,19 @@ function truncate(s, n) {
|
|
|
4353
4359
|
const t = String(s);
|
|
4354
4360
|
return t.length <= n ? t : `${t.slice(0, n - 1)}\u2026`;
|
|
4355
4361
|
}
|
|
4356
|
-
function renderInbox(items) {
|
|
4362
|
+
function renderInbox(items, invites = []) {
|
|
4357
4363
|
const lines = [];
|
|
4358
4364
|
lines.push(" connections \xB7 terminalhire chat");
|
|
4359
4365
|
lines.push(" " + "\u2500".repeat(64));
|
|
4366
|
+
if (invites && invites.length > 0) {
|
|
4367
|
+
lines.push(` PENDING INVITATIONS (${invites.length})`);
|
|
4368
|
+
for (const iv of invites) {
|
|
4369
|
+
const login = sanitizeLine(iv.login);
|
|
4370
|
+
const handle = `@${login}`;
|
|
4371
|
+
lines.push(` \u2198 ${handle.padEnd(18)} wants to connect \xB7 terminalhire intro --accept ${handle}`);
|
|
4372
|
+
}
|
|
4373
|
+
lines.push(" " + "\u2500".repeat(64));
|
|
4374
|
+
}
|
|
4360
4375
|
if (!items || items.length === 0) {
|
|
4361
4376
|
lines.push(" (no accepted connections yet \u2014 request one: terminalhire intro <login>)");
|
|
4362
4377
|
} else {
|
|
@@ -4463,6 +4478,7 @@ async function runInbox(opts = {}) {
|
|
|
4463
4478
|
input = process.stdin,
|
|
4464
4479
|
client = createChatClient(),
|
|
4465
4480
|
listConnections = defaultListConnections,
|
|
4481
|
+
listInvites = defaultListPendingInvites,
|
|
4466
4482
|
readCursors = readReadCursors,
|
|
4467
4483
|
ensureDisclosure = ensureChatDisclosure
|
|
4468
4484
|
} = opts;
|
|
@@ -4473,6 +4489,12 @@ async function runInbox(opts = {}) {
|
|
|
4473
4489
|
if (listed.status !== "ok") {
|
|
4474
4490
|
return { ok: false, reason: writeProblem(output, listed, "") };
|
|
4475
4491
|
}
|
|
4492
|
+
let invites = [];
|
|
4493
|
+
try {
|
|
4494
|
+
const inv = await listInvites();
|
|
4495
|
+
if (inv && inv.status === "ok") invites = inv.invites;
|
|
4496
|
+
} catch {
|
|
4497
|
+
}
|
|
4476
4498
|
const cursors = readCursors();
|
|
4477
4499
|
const items = [];
|
|
4478
4500
|
for (const conn of listed.connections) {
|
|
@@ -4497,8 +4519,8 @@ async function runInbox(opts = {}) {
|
|
|
4497
4519
|
});
|
|
4498
4520
|
}
|
|
4499
4521
|
await clearPresence(client);
|
|
4500
|
-
output.write(renderInbox(items));
|
|
4501
|
-
return { ok: true, count: items.length };
|
|
4522
|
+
output.write(renderInbox(items, invites));
|
|
4523
|
+
return { ok: true, count: items.length, invites: invites.length };
|
|
4502
4524
|
}
|
|
4503
4525
|
async function runReadThread(opts = {}) {
|
|
4504
4526
|
const {
|
package/dist/bin/jpi-chat.js
CHANGED
|
@@ -4264,10 +4264,19 @@ function truncate(s, n) {
|
|
|
4264
4264
|
const t = String(s);
|
|
4265
4265
|
return t.length <= n ? t : `${t.slice(0, n - 1)}\u2026`;
|
|
4266
4266
|
}
|
|
4267
|
-
function renderInbox(items) {
|
|
4267
|
+
function renderInbox(items, invites = []) {
|
|
4268
4268
|
const lines = [];
|
|
4269
4269
|
lines.push(" connections \xB7 terminalhire chat");
|
|
4270
4270
|
lines.push(" " + "\u2500".repeat(64));
|
|
4271
|
+
if (invites && invites.length > 0) {
|
|
4272
|
+
lines.push(` PENDING INVITATIONS (${invites.length})`);
|
|
4273
|
+
for (const iv of invites) {
|
|
4274
|
+
const login = sanitizeLine(iv.login);
|
|
4275
|
+
const handle = `@${login}`;
|
|
4276
|
+
lines.push(` \u2198 ${handle.padEnd(18)} wants to connect \xB7 terminalhire intro --accept ${handle}`);
|
|
4277
|
+
}
|
|
4278
|
+
lines.push(" " + "\u2500".repeat(64));
|
|
4279
|
+
}
|
|
4271
4280
|
if (!items || items.length === 0) {
|
|
4272
4281
|
lines.push(" (no accepted connections yet \u2014 request one: terminalhire intro <login>)");
|
|
4273
4282
|
} else {
|
|
@@ -4374,6 +4383,7 @@ async function runInbox(opts = {}) {
|
|
|
4374
4383
|
input = process.stdin,
|
|
4375
4384
|
client = createChatClient(),
|
|
4376
4385
|
listConnections = defaultListConnections,
|
|
4386
|
+
listInvites = defaultListPendingInvites,
|
|
4377
4387
|
readCursors = readReadCursors,
|
|
4378
4388
|
ensureDisclosure = ensureChatDisclosure
|
|
4379
4389
|
} = opts;
|
|
@@ -4384,6 +4394,12 @@ async function runInbox(opts = {}) {
|
|
|
4384
4394
|
if (listed.status !== "ok") {
|
|
4385
4395
|
return { ok: false, reason: writeProblem(output, listed, "") };
|
|
4386
4396
|
}
|
|
4397
|
+
let invites = [];
|
|
4398
|
+
try {
|
|
4399
|
+
const inv = await listInvites();
|
|
4400
|
+
if (inv && inv.status === "ok") invites = inv.invites;
|
|
4401
|
+
} catch {
|
|
4402
|
+
}
|
|
4387
4403
|
const cursors = readCursors();
|
|
4388
4404
|
const items = [];
|
|
4389
4405
|
for (const conn of listed.connections) {
|
|
@@ -4408,8 +4424,8 @@ async function runInbox(opts = {}) {
|
|
|
4408
4424
|
});
|
|
4409
4425
|
}
|
|
4410
4426
|
await clearPresence(client);
|
|
4411
|
-
output.write(renderInbox(items));
|
|
4412
|
-
return { ok: true, count: items.length };
|
|
4427
|
+
output.write(renderInbox(items, invites));
|
|
4428
|
+
return { ok: true, count: items.length, invites: invites.length };
|
|
4413
4429
|
}
|
|
4414
4430
|
async function runReadThread(opts = {}) {
|
|
4415
4431
|
const {
|
|
@@ -4620,6 +4636,12 @@ async function defaultListConnections(deps = {}) {
|
|
|
4620
4636
|
const connections = listed.intros.filter((it) => it && it.status === "accepted" && it.counterpartyLogin).map((it) => ({ introId: it.id, peerLogin: it.counterpartyLogin }));
|
|
4621
4637
|
return { status: "ok", connections };
|
|
4622
4638
|
}
|
|
4639
|
+
async function defaultListPendingInvites(deps = {}) {
|
|
4640
|
+
const listed = await fetchIntroList(deps);
|
|
4641
|
+
if (listed.status !== "ok") return listed;
|
|
4642
|
+
const invites = listed.intros.filter((it) => it && it.role === "incoming" && it.status === "pending" && it.counterpartyLogin).map((it) => ({ login: it.counterpartyLogin }));
|
|
4643
|
+
return { status: "ok", invites };
|
|
4644
|
+
}
|
|
4623
4645
|
function formatThread(state) {
|
|
4624
4646
|
const { peerLogin, online, messages, inputBuffer, banner } = state;
|
|
4625
4647
|
const safePeer = sanitizeLine(peerLogin);
|
|
@@ -5168,6 +5190,7 @@ export {
|
|
|
5168
5190
|
CHAT_DISCLOSURE,
|
|
5169
5191
|
CHAT_MIN_AGE,
|
|
5170
5192
|
defaultListConnections,
|
|
5193
|
+
defaultListPendingInvites,
|
|
5171
5194
|
defaultResolveConnection,
|
|
5172
5195
|
ensureChatDisclosure,
|
|
5173
5196
|
formatThread,
|
package/dist/bin/jpi-dispatch.js
CHANGED
|
@@ -10386,10 +10386,19 @@ function truncate(s, n) {
|
|
|
10386
10386
|
const t = String(s);
|
|
10387
10387
|
return t.length <= n ? t : `${t.slice(0, n - 1)}\u2026`;
|
|
10388
10388
|
}
|
|
10389
|
-
function renderInbox(items) {
|
|
10389
|
+
function renderInbox(items, invites = []) {
|
|
10390
10390
|
const lines = [];
|
|
10391
10391
|
lines.push(" connections \xB7 terminalhire chat");
|
|
10392
10392
|
lines.push(" " + "\u2500".repeat(64));
|
|
10393
|
+
if (invites && invites.length > 0) {
|
|
10394
|
+
lines.push(` PENDING INVITATIONS (${invites.length})`);
|
|
10395
|
+
for (const iv of invites) {
|
|
10396
|
+
const login = sanitizeLine(iv.login);
|
|
10397
|
+
const handle = `@${login}`;
|
|
10398
|
+
lines.push(` \u2198 ${handle.padEnd(18)} wants to connect \xB7 terminalhire intro --accept ${handle}`);
|
|
10399
|
+
}
|
|
10400
|
+
lines.push(" " + "\u2500".repeat(64));
|
|
10401
|
+
}
|
|
10393
10402
|
if (!items || items.length === 0) {
|
|
10394
10403
|
lines.push(" (no accepted connections yet \u2014 request one: terminalhire intro <login>)");
|
|
10395
10404
|
} else {
|
|
@@ -10496,6 +10505,7 @@ async function runInbox(opts = {}) {
|
|
|
10496
10505
|
input = process.stdin,
|
|
10497
10506
|
client = createChatClient(),
|
|
10498
10507
|
listConnections = defaultListConnections,
|
|
10508
|
+
listInvites = defaultListPendingInvites,
|
|
10499
10509
|
readCursors = readReadCursors,
|
|
10500
10510
|
ensureDisclosure = ensureChatDisclosure
|
|
10501
10511
|
} = opts;
|
|
@@ -10506,6 +10516,12 @@ async function runInbox(opts = {}) {
|
|
|
10506
10516
|
if (listed.status !== "ok") {
|
|
10507
10517
|
return { ok: false, reason: writeProblem(output, listed, "") };
|
|
10508
10518
|
}
|
|
10519
|
+
let invites = [];
|
|
10520
|
+
try {
|
|
10521
|
+
const inv = await listInvites();
|
|
10522
|
+
if (inv && inv.status === "ok") invites = inv.invites;
|
|
10523
|
+
} catch {
|
|
10524
|
+
}
|
|
10509
10525
|
const cursors = readCursors();
|
|
10510
10526
|
const items = [];
|
|
10511
10527
|
for (const conn of listed.connections) {
|
|
@@ -10530,8 +10546,8 @@ async function runInbox(opts = {}) {
|
|
|
10530
10546
|
});
|
|
10531
10547
|
}
|
|
10532
10548
|
await clearPresence(client);
|
|
10533
|
-
output.write(renderInbox(items));
|
|
10534
|
-
return { ok: true, count: items.length };
|
|
10549
|
+
output.write(renderInbox(items, invites));
|
|
10550
|
+
return { ok: true, count: items.length, invites: invites.length };
|
|
10535
10551
|
}
|
|
10536
10552
|
async function runReadThread(opts = {}) {
|
|
10537
10553
|
const {
|
|
@@ -10662,6 +10678,7 @@ __export(jpi_chat_exports, {
|
|
|
10662
10678
|
CHAT_DISCLOSURE: () => CHAT_DISCLOSURE,
|
|
10663
10679
|
CHAT_MIN_AGE: () => CHAT_MIN_AGE,
|
|
10664
10680
|
defaultListConnections: () => defaultListConnections,
|
|
10681
|
+
defaultListPendingInvites: () => defaultListPendingInvites,
|
|
10665
10682
|
defaultResolveConnection: () => defaultResolveConnection,
|
|
10666
10683
|
ensureChatDisclosure: () => ensureChatDisclosure,
|
|
10667
10684
|
formatThread: () => formatThread,
|
|
@@ -10757,6 +10774,12 @@ async function defaultListConnections(deps = {}) {
|
|
|
10757
10774
|
const connections = listed.intros.filter((it) => it && it.status === "accepted" && it.counterpartyLogin).map((it) => ({ introId: it.id, peerLogin: it.counterpartyLogin }));
|
|
10758
10775
|
return { status: "ok", connections };
|
|
10759
10776
|
}
|
|
10777
|
+
async function defaultListPendingInvites(deps = {}) {
|
|
10778
|
+
const listed = await fetchIntroList(deps);
|
|
10779
|
+
if (listed.status !== "ok") return listed;
|
|
10780
|
+
const invites = listed.intros.filter((it) => it && it.role === "incoming" && it.status === "pending" && it.counterpartyLogin).map((it) => ({ login: it.counterpartyLogin }));
|
|
10781
|
+
return { status: "ok", invites };
|
|
10782
|
+
}
|
|
10760
10783
|
function formatThread(state) {
|
|
10761
10784
|
const { peerLogin, online, messages, inputBuffer, banner } = state;
|
|
10762
10785
|
const safePeer = sanitizeLine(peerLogin);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "terminalhire",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.10",
|
|
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",
|