@plannotator/pi-extension 0.28.46 → 0.28.47
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/generated/config.ts +10 -0
- package/generated/inbox/connection.ts +19 -3
- package/inbox.ts +22 -0
- package/package.json +1 -1
- package/plannotator.html +313 -313
- package/review-editor.html +257 -257
- package/skills/plannotator/SKILL.md +2 -2
package/generated/config.ts
CHANGED
|
@@ -397,6 +397,16 @@ export interface PlannotatorConfig {
|
|
|
397
397
|
* `{ text_size }`.
|
|
398
398
|
*/
|
|
399
399
|
inboxTextSize?: number;
|
|
400
|
+
/**
|
|
401
|
+
* How the Inbox list's rows look: the names of the row options that are on
|
|
402
|
+
* (core `INBOX_ROWS_OPTIONS`), every other one off. Unset: none written yet
|
|
403
|
+
* (a window adopts its browser's old cookies once). Written by the Inbox's ⋮
|
|
404
|
+
* menu and Settings → Rows through POST /api/inbox/settings `{ rows }`. A
|
|
405
|
+
* name this build does not know is dropped on read.
|
|
406
|
+
*/
|
|
407
|
+
inboxRows?: string[];
|
|
408
|
+
/** How many times `inboxRows` was saved: windows take a look only when it is newer than the last they took. */
|
|
409
|
+
inboxRowsRev?: number;
|
|
400
410
|
/**
|
|
401
411
|
* The Inbox's onboarding tour, per machine (approval "inbox-onboarding-tour"):
|
|
402
412
|
* when it was started, finished or skipped, and whether the first real thread
|
|
@@ -316,7 +316,7 @@ export const INBOX_SESSION_THREADS_CHANNEL = "Their decisions stay in these thre
|
|
|
316
316
|
|
|
317
317
|
/** When to use the Inbox. Fixed text: the agent tool's lead and the Inbox's server instructions carry it whole. */
|
|
318
318
|
export const INBOX_USE_RULE =
|
|
319
|
-
"Use it for a decision only they can make (a :::question block; go on with other work), finished long work (a short summary, files in `attachments`), or when they ask."
|
|
319
|
+
"Use it for a decision only they can make (a :::question block; go on with other work), finished long work (a short summary with its pictures inline, files in `attachments`), or when they ask."
|
|
320
320
|
|
|
321
321
|
/**
|
|
322
322
|
* Separate work, separate threads (the owner, 2026-10-29: an agent given new
|
|
@@ -403,6 +403,20 @@ export const INBOX_AGENT_ACTION_LEADS: Readonly<Record<string, string>> = {
|
|
|
403
403
|
card: "A Board card for work that outlasts this reply: create it, then move it and say where it is as the work moves.",
|
|
404
404
|
}
|
|
405
405
|
|
|
406
|
+
/**
|
|
407
|
+
* Pictures sit where they are discussed (the owner, 2026-11-02: agents sent
|
|
408
|
+
* a message's screenshots and the pictures of its options as attachments at
|
|
409
|
+
* the bottom, so the person had to scroll there to see what each option
|
|
410
|
+
* was). Fixed text: the agent tool's `body` field, the MCP server's `body`
|
|
411
|
+
* field and `plannotator inbox --help` carry it whole.
|
|
412
|
+
*/
|
|
413
|
+
export const INBOX_PICTURES_RULE =
|
|
414
|
+
'Pictures go in the body where you write about them, ``, never only in `attachments`; do not also attach one the body shows. Visual options are picture choices, one picture each: `- [ ] A · Label —  what it means`; the label comes back.'
|
|
415
|
+
|
|
416
|
+
/** The `attachments` field's line on pictures (fixed text, on every copy of the field). */
|
|
417
|
+
export const INBOX_ATTACHMENTS_PICTURES_LINE =
|
|
418
|
+
'Screenshots and pictures go in the body instead (``); attach what the person should open or click through.'
|
|
419
|
+
|
|
406
420
|
/**
|
|
407
421
|
* The agent tool's own words for the fields whose Inbox description is long
|
|
408
422
|
* (the MCP server's are written for a raw MCP client, which has no other
|
|
@@ -432,7 +446,9 @@ export const INBOX_AGENT_FIELD_DESCRIPTIONS: Readonly<Record<string, Readonly<Re
|
|
|
432
446
|
'',
|
|
433
447
|
'Your recommendation goes on the `Recommended:` line, never in a choice label. Keep the choices in their natural order; never move yours first. `:::question-multi` takes several choices, `:::question-text` free text. The person can always answer Other, add a note or skip, so never add an Other choice yourself. `Stopped: <why>` only when you cannot go on until it is answered (never `Stopped: no`); `Holds up: <work>` names work that waits while you go on. Ask only what you cannot decide alone, about 8 a round at most. Answers come back in the reply under "Answers to your questions".',
|
|
434
448
|
'',
|
|
435
|
-
|
|
449
|
+
INBOX_PICTURES_RULE,
|
|
450
|
+
'',
|
|
451
|
+
'Optional lines after the question; most questions need none of these: `Stakes: <what it affects>` (give one with every Stopped or Holds up), `Shows: ` or `Shows: [name](file)` (the one picture or file it is about), `Why: <why your recommendation>` on its own line, `Reversible: no — <why>` only when it cannot be undone.',
|
|
436
452
|
'',
|
|
437
453
|
'Only for a true blocker the person must go and do outside this chat, that you cannot do yourself (approve a deploy, sign in, touch a security key, merge a PR you cannot merge), write a `:::action` block: first line the order, then why. Each command the person must run goes in the why in its own fenced code block (```), one block per command in the order to run them, so each gets a copy button. Optional: `Where: <url>`, `Stopped:`, `Watching: <what you watch>`. Never for a decision or a question, for what you can do yourself, or as a checklist or status update; most messages need none. Done or Can\'t do it comes back under "Action items you asked for".',
|
|
438
454
|
'',
|
|
@@ -444,7 +460,7 @@ export const INBOX_AGENT_FIELD_DESCRIPTIONS: Readonly<Record<string, Readonly<Re
|
|
|
444
460
|
thread: "A short thread name, one line, to keep separate work apart: the same name in this project is the same open thread, across sessions. Without it, your messages join your session's open thread. Ignored with reply_to, except when you are asked to name a thread the person started: then it names that thread, once.",
|
|
445
461
|
supersedes: 'Your own questions in this thread that are still open (read_thread state open or picked) and no longer apply: a newer message replaces them, or the reply settled them in words. "<message id>/<key>" for one, "<message id>" for all of that message\'s; send with reply_to into their thread. With one question in this message it replaces them, otherwise they read "No longer applies".',
|
|
446
462
|
done: 'Your own open action items (`:::action`) in this thread that you saw done yourself, e.g. the deploy you watch is Ready: "<message id>/<key>" (key a-…); send with reply_to into their thread. The card says you saw it done; nothing is sent to the person.',
|
|
447
|
-
attachments:
|
|
463
|
+
attachments: `Files to show the person beside the message, absolute or relative to project_path: a plan, an HTML mock, code, a video, any file. ${INBOX_ATTACHMENTS_PICTURES_LINE} Link one from the body (\`[the mock](mock.html)\`) to open it beside the thread. Their comments on the files come back in the reply. Folders and .env files are refused.`,
|
|
448
464
|
},
|
|
449
465
|
read_thread: {
|
|
450
466
|
thread_id: 'A thread id. read_thread shows its open questions, the newest messages in full, and earlier ones one line each.',
|
package/inbox.ts
CHANGED
|
@@ -186,6 +186,23 @@ function userText(message: { content?: unknown } | undefined): string {
|
|
|
186
186
|
.join("");
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
+
/**
|
|
190
|
+
* PLANNOTATOR_SESSION_PROJECT (apps/hook/server/inbox-mcp-shim.ts,
|
|
191
|
+
* `inboxSessionProjectFromEnv`): `pi:<session id>:<ctx.cwd>`, the folder this
|
|
192
|
+
* session's `plannotator_inbox` tool files under. Pi gives each bash call this
|
|
193
|
+
* process's environment plus PI_SESSION_ID, so a `cd sub && plannotator inbox
|
|
194
|
+
* call …` or `plannotator card …` lands in the tool's project too. Set before
|
|
195
|
+
* every bash call, so a new or resumed session's id is the one named. A stale
|
|
196
|
+
* ctx names nothing new.
|
|
197
|
+
*/
|
|
198
|
+
export function exportPiSessionProject(env: Record<string, string | undefined>, ctx: Pick<ExtensionContext, "cwd" | "sessionManager">): void {
|
|
199
|
+
try {
|
|
200
|
+
env.PLANNOTATOR_SESSION_PROJECT = `${PI_INBOX_HOST}:${ctx.sessionManager.getSessionId()}:${ctx.cwd}`;
|
|
201
|
+
} catch {
|
|
202
|
+
// A stale ctx: the last value stands, and it names its own session.
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
189
206
|
function registerPiInbox(pi: InboxPi, connection: InboxAgentConnection, options: PiInboxOptions & { reminder: string | null }): void {
|
|
190
207
|
const spec = inboxAgentTool(connection.tools);
|
|
191
208
|
const ohMyPi = detectPiHost(pi) === "oh-my-pi";
|
|
@@ -324,6 +341,11 @@ function registerPiInbox(pi: InboxPi, connection: InboxAgentConnection, options:
|
|
|
324
341
|
},
|
|
325
342
|
};
|
|
326
343
|
|
|
344
|
+
// Before each bash call: the session's project for the commands it runs (exportPiSessionProject).
|
|
345
|
+
pi.on("tool_call", (event: { toolName?: unknown } | undefined, callCtx: ExtensionContext) => {
|
|
346
|
+
if (event?.toolName === "bash") exportPiSessionProject(process.env, callCtx);
|
|
347
|
+
});
|
|
348
|
+
|
|
327
349
|
pi.on("session_start", (_event, startCtx: ExtensionContext) => {
|
|
328
350
|
ctx = startCtx;
|
|
329
351
|
if (!activationSettled) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plannotator/pi-extension",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.47",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Plannotator Pi extension - interactive plan review with annotations, annotate agent messages, and review code/PRs",
|
|
6
6
|
"author": "backnotprop",
|