pendingyou 0.44.0 → 0.44.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/CHANGELOG.md +26 -0
- package/dist/apps/codex-wake.js +34 -2
- package/dist/stopcheck.js +70 -10
- package/dist/version.js +1 -1
- package/mod/.claude-plugin/plugin.json +1 -1
- package/mod/README.md +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.44.1 (2026-11-19)
|
|
4
|
+
|
|
5
|
+
Found by the first live tests of Codex 0.170.0, OpenCode 2.3.2 and Pi 1.5.2.
|
|
6
|
+
|
|
7
|
+
- **A reply on an open card wakes Pi and OpenCode.** When you wrote back on a card (“Before I answer: how long can it
|
|
8
|
+
be?”) while a Pi or OpenCode session sat idle, nothing woke it: it heard your words only with your next message. The
|
|
9
|
+
session's listener read its cards before each wait for news, so a card posted during that wait, and written on
|
|
10
|
+
before it ended, was missed for good. The same could happen to an answer, less often, and to Codex on a second card
|
|
11
|
+
posted while the first one's listener ran. A question you hand a session was never affected.
|
|
12
|
+
- **A reply that ends on a question reaches you as a card.** An assistant that ended on “Should the next file be
|
|
13
|
+
called alpha.txt or beta.txt?” settled with the question only in chat: the check that puts what an assistant leaves
|
|
14
|
+
you in chat on a card counted a question only when it said “you”. Now a reply whose last sentence is a question
|
|
15
|
+
counts, in every app (Claude Code, Codex, OpenCode and Pi), outside code, quotes and a closing aside in parentheses,
|
|
16
|
+
and not a question it goes on to answer itself.
|
|
17
|
+
- **A question already on one of the session's open cards no longer nags.** When all a reply leaves you is questions
|
|
18
|
+
and each is one of the session's open cards (“Still waiting: which DNS host for the new domain?”), the assistant
|
|
19
|
+
isn't asked to post it again. It asks Pending You for those cards (1.5 seconds at most); when Pending You can't say
|
|
20
|
+
in time, it lets the reply stand. The words an assistant is asked with are unchanged.
|
|
21
|
+
- **An assistant shows as running as soon as it has a name.** A session said it was open before it had said its name,
|
|
22
|
+
and Pending You knows a session's agent by its name, so a new Pi, OpenCode or Codex session wasn't shown running for
|
|
23
|
+
up to 5 minutes after it introduced itself. Now it says so again, with its name, the moment it gives one.
|
|
24
|
+
- After `npx -y pendingyou@latest init`: restart Pi (or `/reload` in it) and OpenCode 1.x so their listeners run the
|
|
25
|
+
new version; OpenCode 2.x reloads the plugin by itself. A Codex thread's listener runs the new version the next
|
|
26
|
+
time one starts (when it has no card left, or after 8 hours, it stops). Nothing to restart for the rest: the check
|
|
27
|
+
on a reply's last words and the name sent with a session's presence run the new version at once.
|
|
28
|
+
|
|
3
29
|
## 0.44.0 (2026-11-18)
|
|
4
30
|
|
|
5
31
|
- **OpenCode 2.x: Pending You's plugin loads again.** OpenCode 2.0.0 and later refused the plugin that `init` wrote
|
package/dist/apps/codex-wake.js
CHANGED
|
@@ -9,6 +9,7 @@ import { APPROVED_DRAFT_NOTICE, approvesDraft, clip, delegatedOf, handledOf, isC
|
|
|
9
9
|
import { chooseThread, goesBy, HANDED_FOR_MS, handedCard, handedMessage, namesAnotherComputer, OPEN_FOR_MS, } from "../handed.js";
|
|
10
10
|
import { clearHerdr, herdrTarget, isUrgency, PANE_ID, reportCommand, writeHerdr, } from "../herdr.js";
|
|
11
11
|
import { linkSoon } from "../link.js";
|
|
12
|
+
import { presenceArgs, readSaid } from "../presence.js";
|
|
12
13
|
import { macName, tailscaleName } from "../remote.js";
|
|
13
14
|
import { claimHanded, markHanded, momentOf, releaseHanded, wasHanded } from "../state.js";
|
|
14
15
|
import { findCodex } from "./codex-app.js";
|
|
@@ -183,7 +184,9 @@ export async function posted(io, options) {
|
|
|
183
184
|
const cwd = text(input.cwd, 1000);
|
|
184
185
|
const now = io.now();
|
|
185
186
|
const pane = await herdrTarget(io);
|
|
187
|
+
let renamed = null;
|
|
186
188
|
await change(io, app, (state) => {
|
|
189
|
+
renamed = newName(state.threads[thread], nameOf(args));
|
|
187
190
|
if (turn && call !== 'cancel_request') {
|
|
188
191
|
const record = state.turns[turn] ?? { at: now, cards: [] };
|
|
189
192
|
record.cards = [...record.cards, wordsIn(args)].slice(-10);
|
|
@@ -226,6 +229,8 @@ export async function posted(io, options) {
|
|
|
226
229
|
});
|
|
227
230
|
if (pane)
|
|
228
231
|
io.background(reportCommand(app, { session: thread, at: now }));
|
|
232
|
+
if (renamed)
|
|
233
|
+
await liveByName(io, options, thread, renamed, cwd, now);
|
|
229
234
|
if (app === 'codex')
|
|
230
235
|
await keepListening(io, options.origin, thread);
|
|
231
236
|
return 0;
|
|
@@ -250,7 +255,9 @@ async function named(io, options, input, thread) {
|
|
|
250
255
|
const cwd = text(input.cwd, 1000);
|
|
251
256
|
const now = io.now();
|
|
252
257
|
const pane = await herdrTarget(io);
|
|
258
|
+
let renamed = null;
|
|
253
259
|
await change(io, app, (state) => {
|
|
260
|
+
renamed = newName(state.threads[thread], name);
|
|
254
261
|
const known = withName(state.threads[thread] ?? { origin: options.origin, cards: {}, at: now }, name);
|
|
255
262
|
if (cwd)
|
|
256
263
|
known.cwd = cwd;
|
|
@@ -262,10 +269,34 @@ async function named(io, options, input, thread) {
|
|
|
262
269
|
});
|
|
263
270
|
if (pane)
|
|
264
271
|
io.background(reportCommand(app, { session: thread, at: now }));
|
|
272
|
+
if (renamed)
|
|
273
|
+
await liveByName(io, options, thread, renamed, cwd, now);
|
|
265
274
|
if (app === 'codex')
|
|
266
275
|
await keepListening(io, options.origin, thread);
|
|
267
276
|
return 0;
|
|
268
277
|
}
|
|
278
|
+
function newName(thread, name) {
|
|
279
|
+
if (!name)
|
|
280
|
+
return null;
|
|
281
|
+
const now = thread?.names?.at(-1);
|
|
282
|
+
return now && goesBy([now], name) ? null : name;
|
|
283
|
+
}
|
|
284
|
+
async function liveByName(io, options, thread, name, cwd, at) {
|
|
285
|
+
try {
|
|
286
|
+
if (io.platform === 'win32')
|
|
287
|
+
return;
|
|
288
|
+
if ((await readSaid(io, options.app))[thread]?.state !== 'live')
|
|
289
|
+
return;
|
|
290
|
+
io.background(presenceArgs(options.origin, options.app, {
|
|
291
|
+
state: 'live',
|
|
292
|
+
session: thread,
|
|
293
|
+
name,
|
|
294
|
+
...(cwd ? { cwd } : {}),
|
|
295
|
+
at,
|
|
296
|
+
}));
|
|
297
|
+
}
|
|
298
|
+
catch { }
|
|
299
|
+
}
|
|
269
300
|
function askedIn(args) {
|
|
270
301
|
let asked = args.askedFirst;
|
|
271
302
|
if (typeof asked === 'string')
|
|
@@ -711,9 +742,9 @@ export async function listen(io, options) {
|
|
|
711
742
|
}
|
|
712
743
|
const waiting = app === 'codex' && (await hasHeard(io, thread));
|
|
713
744
|
const record = (await load(io, app)).threads[thread];
|
|
714
|
-
const cards = record?.cards ?? {};
|
|
715
745
|
if (!waiting &&
|
|
716
|
-
(!record ||
|
|
746
|
+
(!record ||
|
|
747
|
+
(Object.keys(record.cards).length === 0 && !(takes && mayBeHanded(record, io.now())))))
|
|
717
748
|
return 0;
|
|
718
749
|
if (!(await renew(io, app, thread, lease)))
|
|
719
750
|
return 0;
|
|
@@ -743,6 +774,7 @@ export async function listen(io, options) {
|
|
|
743
774
|
for (const heard of requests)
|
|
744
775
|
if (!since || heard.changedAt > since)
|
|
745
776
|
since = heard.changedAt;
|
|
777
|
+
const cards = (await load(io, app)).threads[thread]?.cards ?? {};
|
|
746
778
|
const ready = [];
|
|
747
779
|
const done = [];
|
|
748
780
|
for (const heard of requests) {
|
package/dist/stopcheck.js
CHANGED
|
@@ -6,7 +6,7 @@ import { markNudged, turnRecord } from "./apps/codex-wake.js";
|
|
|
6
6
|
import { APP_NAMES, DEFAULT_APP } from "./apps/ids.js";
|
|
7
7
|
import { DEFAULT_ORIGIN } from "./args.js";
|
|
8
8
|
import { asksQuestion, wordsOf } from "./asked.js";
|
|
9
|
-
import { asksToTypeHere, cardFits, confirmReason, sessionLink } from "./confirm.js";
|
|
9
|
+
import { asksToTypeHere, cardFits, confirmReason, sessionLink, telling } from "./confirm.js";
|
|
10
10
|
import { readCredential } from "./credentials.js";
|
|
11
11
|
import { isHandedWake } from "./format.js";
|
|
12
12
|
import { isPermissionCard, isPromptApp, sessionName, settlePrompts, subagentsRunning, } from "./permission.js";
|
|
@@ -84,11 +84,57 @@ function itemsIn(plain) {
|
|
|
84
84
|
}
|
|
85
85
|
if (STEPS_FOR_THEM.test(plain))
|
|
86
86
|
return 'steps';
|
|
87
|
-
|
|
88
|
-
if (sentence.trim().endsWith('?') && YOU.test(sentence))
|
|
89
|
-
return 'question';
|
|
90
|
-
return null;
|
|
87
|
+
return questionsIn(plain).length ? 'question' : null;
|
|
91
88
|
}
|
|
89
|
+
const sentenceEnd = (sentence) => sentence.trim().replace(/[*_\s]+$/, '');
|
|
90
|
+
function lastSentence(plain) {
|
|
91
|
+
let text = plain.trim();
|
|
92
|
+
for (let aside = /\s*\([^()]*\)[\s*_]*$/.exec(text); aside; aside = /\s*\([^()]*\)[\s*_]*$/.exec(text)) {
|
|
93
|
+
const before = text.slice(0, aside.index).trim();
|
|
94
|
+
if (!before)
|
|
95
|
+
break;
|
|
96
|
+
text = before;
|
|
97
|
+
}
|
|
98
|
+
const line = text
|
|
99
|
+
.split('\n')
|
|
100
|
+
.filter((each) => each.trim())
|
|
101
|
+
.at(-1) ?? '';
|
|
102
|
+
return sentenceEnd(line.split(SENTENCE_END).at(-1) ?? '');
|
|
103
|
+
}
|
|
104
|
+
export const endsOnQuestion = (text) => lastSentence(plainText(text)).endsWith('?');
|
|
105
|
+
function questionsIn(plain) {
|
|
106
|
+
const found = plain
|
|
107
|
+
.split(/(?<=[.!?])\s+|\n/)
|
|
108
|
+
.map(sentenceEnd)
|
|
109
|
+
.filter((sentence) => sentence.endsWith('?') && YOU.test(sentence));
|
|
110
|
+
const last = lastSentence(plain);
|
|
111
|
+
return last.endsWith('?') && !found.includes(last) ? [...found, last] : found;
|
|
112
|
+
}
|
|
113
|
+
const ASKING = new Set([
|
|
114
|
+
'you',
|
|
115
|
+
'your',
|
|
116
|
+
'want',
|
|
117
|
+
'do',
|
|
118
|
+
'does',
|
|
119
|
+
'i',
|
|
120
|
+
'me',
|
|
121
|
+
'we',
|
|
122
|
+
'us',
|
|
123
|
+
'should',
|
|
124
|
+
'shall',
|
|
125
|
+
'would',
|
|
126
|
+
'like',
|
|
127
|
+
'to',
|
|
128
|
+
'use',
|
|
129
|
+
]);
|
|
130
|
+
const tellingOf = (text) => telling(text).filter((word) => !ASKING.has(word));
|
|
131
|
+
export function onCard(question, title) {
|
|
132
|
+
const asked = tellingOf(question);
|
|
133
|
+
const titled = tellingOf(title);
|
|
134
|
+
const within = (part, whole) => part.length >= 2 && part.every((word) => whole.includes(word));
|
|
135
|
+
return within(titled, asked) || within(asked, titled);
|
|
136
|
+
}
|
|
137
|
+
export const questionsOutsideRecaps = (text) => questionsIn(withoutRecaps(plainText(text)));
|
|
92
138
|
export function itemsForPerson(text) {
|
|
93
139
|
return itemsIn(plainText(text));
|
|
94
140
|
}
|
|
@@ -334,7 +380,7 @@ function opencodeTurn(input) {
|
|
|
334
380
|
const text = final.join('\n').trim();
|
|
335
381
|
return text ? { text, posted, cards, handed, asked } : null;
|
|
336
382
|
}
|
|
337
|
-
async function openTitles(io, origin, cwd, app, session) {
|
|
383
|
+
async function openTitles(io, origin, cwd, app, session, unlisted = 'unknown') {
|
|
338
384
|
try {
|
|
339
385
|
const name = app === 'claude-code' ? await sessionName(session.transcript ?? undefined) : undefined;
|
|
340
386
|
const query = new URLSearchParams([
|
|
@@ -345,9 +391,11 @@ async function openTitles(io, origin, cwd, app, session) {
|
|
|
345
391
|
...(await askerParams(io, origin, app, { ...session, name: name ?? null })),
|
|
346
392
|
]);
|
|
347
393
|
const { status, body } = await getJson(io, origin, `/mcp/cli/answers?${query}`, OPEN_TIME_BOX_MS, io.signal, { hook: true, app });
|
|
348
|
-
|
|
349
|
-
if (!Array.isArray(requests))
|
|
394
|
+
if (status !== 200)
|
|
350
395
|
return null;
|
|
396
|
+
const requests = body.open?.requests;
|
|
397
|
+
if (!Array.isArray(requests))
|
|
398
|
+
return unlisted === 'none' ? [] : null;
|
|
351
399
|
return requests.flatMap((card) => typeof card?.title === 'string' ? [card.title] : []);
|
|
352
400
|
}
|
|
353
401
|
catch {
|
|
@@ -472,13 +520,25 @@ export async function stopcheck(io, options) {
|
|
|
472
520
|
return 0;
|
|
473
521
|
if (turn.asked && isAnswer(text) && (await seesAnswers(io, app)))
|
|
474
522
|
return block(ANSWER_REASON);
|
|
475
|
-
|
|
523
|
+
const items = itemsOutsideRecaps(text);
|
|
524
|
+
if (!items)
|
|
476
525
|
return 0;
|
|
526
|
+
let open;
|
|
477
527
|
if (mentionsCards(text)) {
|
|
478
|
-
|
|
528
|
+
open = await openTitles(io, options.origin, cwd, app, session);
|
|
479
529
|
if (open === null || open.some((title) => !isPermissionCard(title)))
|
|
480
530
|
return 0;
|
|
481
531
|
}
|
|
532
|
+
if (items === 'question') {
|
|
533
|
+
open ??= await openTitles(io, options.origin, cwd, app, session, 'none');
|
|
534
|
+
if (open === null)
|
|
535
|
+
return 0;
|
|
536
|
+
const titles = open;
|
|
537
|
+
const asked = questionsOutsideRecaps(text);
|
|
538
|
+
if (asked.length &&
|
|
539
|
+
asked.every((question) => titles.some((title) => onCard(question, title))))
|
|
540
|
+
return 0;
|
|
541
|
+
}
|
|
482
542
|
return block(STOP_REASON);
|
|
483
543
|
}
|
|
484
544
|
catch {
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.44.
|
|
1
|
+
export const VERSION = '0.44.1';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pendingyou-wake",
|
|
3
3
|
"displayName": "Pending You",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.63.0",
|
|
5
5
|
"description": "Wakes Claude Code when your person answers a Pending You card it posted, even while it sits idle. Installed by `npx pendingyou init`.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "RecordPlane",
|
package/mod/README.md
CHANGED
|
@@ -4,4 +4,4 @@ The pendingyou command line’s copy of the Pending You plugin’s wake mod, for
|
|
|
4
4
|
|
|
5
5
|
In each session it learns the cards the session posts to Pending You, checks them through the session’s own Pending You connection, and starts a turn when your person answers, writes back or a fallback comes due, or hands the session a question from another of their assistants (CLI 0.14.0), even while it sits idle. It answers `npx pendingyou hold` itself, so nothing waits in the background, and shows “2 waiting on you” under the prompt, after the plugin’s name. With the Pending You plugin installed too, only one copy acts.
|
|
6
6
|
|
|
7
|
-
Generated from recordplane/pendingyou (packages/claude-plugin/src/wake) with Pending You’s guide 2.
|
|
7
|
+
Generated from recordplane/pendingyou (packages/claude-plugin/src/wake) with Pending You’s guide 2.63.0; send changes there.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pendingyou",
|
|
3
|
-
"version": "0.44.
|
|
3
|
+
"version": "0.44.1",
|
|
4
4
|
"description": "Pending You for your coding agents: one command sets up Claude Code, Codex, OpenCode and Pi to ask you through Pending You and hear your answers, even while they sit idle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pendingyou",
|