pi-roundtable 0.52.3 → 0.53.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 CHANGED
@@ -5,6 +5,23 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.53.1] - 2026-11-18
9
+
10
+ ### Added
11
+
12
+ - `InboundMessage.reference.channel` is the channel key of the message a reply quotes, which the Discord surface now sets on live and caught-up messages alike. A claim compares it with the message's own `channel` to tell a reply within the conversation, such as one to a forum post's starter, from a reply to a message of another channel, before it acts on `reference.attachments`.
13
+
14
+ ## [0.53.0] - 2026-11-18
15
+
16
+ ### Added
17
+
18
+ - pi-roundtable-mcp, pi-roundtable-web: Agents get `connector_list`, `connector_add` and `connector_remove` for the owner's MCP connectors, and none takes or shows a connector's URL. `connector_list` gives each connector's name, host, tool count and purpose. `connector_remove` is held under a new rule, `connector`, which yolo mode never approves; its card names the connector and its host only. `connector_add` takes a name and purpose only. With pi-roundtable-web it returns a one-time link (an hour, single use) to the connectors page's add form, filled in, where the owner pastes the URL; the asking conversation then gets a follow-up with the outcome. On Discord it points the owner to `/<root> connector add`.
19
+ - pi-roundtable-mcp, pi-roundtable-web: The web console stores those add requests (never a URL) in `web_connector_add_requests`, serves them under `api/connectors/requests/<id>`, and opens the add form at `#/connectors?add=<id>`.
20
+
21
+ ### Changed
22
+
23
+ - pi-roundtable-web: The chat home in the side column keeps its pins and its folder tabs to one row each. Five pins share the row and more scroll sideways, so no pin sits alone on a second row; the folder tabs no longer wrap but scroll sideways as on a phone, shorter (36px) and tighter there, as a pointer needs no 48px target.
24
+
8
25
  ## [0.52.3] - 2026-11-17
9
26
 
10
27
  ### Fixed
package/docs/plugins.md CHANGED
@@ -1098,7 +1098,7 @@ defineTool({
1098
1098
 
1099
1099
  #### Hold classes and yolo mode
1100
1100
 
1101
- Every held call carries its **hold classes**: ids of the form `<rule>.<class>` that name why it is held. They are what yolo mode (below) judges, and they are recorded with the call as `HeldCall.holdClasses`, so they survive a restart. A rule reports them with `holdClasses(tool, input, context)`, which lists every reason the call is held, not only the first. **Report only classes that are safe to approve with no one looking: a rule that reports classes has opted its calls in to yolo mode**, which approves them unless the config cards them. A rule that reports none leaves its calls **unclassed**: they carry the rule's bare name (`mail` for a rule called `mail`) and yolo cards them, unless `autonomy.yolo.allow` lists that name. A tool's own `hold` is a rule named `tool:<name>`, so it is unclassed, and `autonomy.yolo.allow: ["tool:repo_push"]` approves a `repo_push` tool's calls. Every reported id must start with the rule's name and a dot; one that does not, such as another rule's id, leaves the call unclassed, as does a `holdClasses` that throws. A rule that stands for other rules' calls, as the one that holds saving a precheck script does, declares `relay: true` and may list their ids instead; its calls also carry `<rule>.relay`, so `autonomy.yolo.card: ["precheck-scripts"]` cards them. A rule name has no dot. The same holds for `HoldDescription.classes`, and a hold check built without `holdChain` has no classes: yolo cards its calls. A rule that describes a call in a turn may name the classes in the description instead: `{ text, classes: ["repo.push"] }` (`HoldDescription.classes`). When several rules hold one call, its classes are all of theirs, so one unclassed or carded rule cards it. `holdChain(rules)` reports them as `classesOf(tool, input, context)` and, with the description, as `inTurnWithClasses(...)` (`ClassedHold`), which also asks the rules after the first that holds the call; a hold check built without `holdChain` has none. A rule declared `yolo: "never"` is one yolo mode never approves: its calls carry the class `<rule>.yolo-never` whatever it reports, which yolo always cards, and the host refuses to start when `autonomy.yolo.allow` names the rule or one of its classes (a turn nobody can answer still fails its held call closed). `mcp-connectors` holds a connector's tool through such a rule, `mcp-hints`, when its server's hints mark it `destructiveHint: true` or `readOnlyHint: false`; `VirtualServer.hints` carries the hints.
1101
+ Every held call carries its **hold classes**: ids of the form `<rule>.<class>` that name why it is held. They are what yolo mode (below) judges, and they are recorded with the call as `HeldCall.holdClasses`, so they survive a restart. A rule reports them with `holdClasses(tool, input, context)`, which lists every reason the call is held, not only the first. **Report only classes that are safe to approve with no one looking: a rule that reports classes has opted its calls in to yolo mode**, which approves them unless the config cards them. A rule that reports none leaves its calls **unclassed**: they carry the rule's bare name (`mail` for a rule called `mail`) and yolo cards them, unless `autonomy.yolo.allow` lists that name. A tool's own `hold` is a rule named `tool:<name>`, so it is unclassed, and `autonomy.yolo.allow: ["tool:repo_push"]` approves a `repo_push` tool's calls. Every reported id must start with the rule's name and a dot; one that does not, such as another rule's id, leaves the call unclassed, as does a `holdClasses` that throws. A rule that stands for other rules' calls, as the one that holds saving a precheck script does, declares `relay: true` and may list their ids instead; its calls also carry `<rule>.relay`, so `autonomy.yolo.card: ["precheck-scripts"]` cards them. A rule name has no dot. The same holds for `HoldDescription.classes`, and a hold check built without `holdChain` has no classes: yolo cards its calls. A rule that describes a call in a turn may name the classes in the description instead: `{ text, classes: ["repo.push"] }` (`HoldDescription.classes`). When several rules hold one call, its classes are all of theirs, so one unclassed or carded rule cards it. `holdChain(rules)` reports them as `classesOf(tool, input, context)` and, with the description, as `inTurnWithClasses(...)` (`ClassedHold`), which also asks the rules after the first that holds the call; a hold check built without `holdChain` has none. A rule declared `yolo: "never"` is one yolo mode never approves: its calls carry the class `<rule>.yolo-never` whatever it reports, which yolo always cards, and the host refuses to start when `autonomy.yolo.allow` names the rule or one of its classes (a turn nobody can answer still fails its held call closed). `mcp-connectors` holds a connector's tool through such a rule, `mcp-hints`, when its server's hints mark it `destructiveHint: true` or `readOnlyHint: false`; `VirtualServer.hints` carries the hints. It holds every `connector_remove` call through another, `connector`, whose card names the connector and its host only.
1102
1102
 
1103
1103
  **Yolo mode.** In a conversation whose `yolo` mode an owner switched on ([`MODES`](#conversation-modes-modes)), the server decides a held call before any card opens, and approves it without one only when **all** of these hold at that moment:
1104
1104
 
@@ -2983,6 +2983,7 @@ It resolves with `AttachmentBytes` (`id`, `name`, `contentType`, empty when Disc
2983
2983
  At most the host's `discord.attachmentRead.maxBytes` (default `ATTACHMENT_READ_MAX_BYTES`, 10 MiB; at most 100 MiB) is read, and a call's `maxBytes` may lower that, never raise it; a `maxBytes` that is not a positive whole number rejects with the code `invalid`. `discordPlugin` throws a `ConfigError` for an `attachmentRead.maxBytes` outside 1 to 100 MiB, as the config file does.
2984
2984
  Nothing is parsed, stored or logged: what the bytes are for (text extraction, an image for the model, a file in the workspace) is the plugin's call.
2985
2985
  The core checks nothing about who may read which channel beyond what the bot can see: pass the channel of the conversation the file was posted in, such as the addressed message's channel, never one a model names in a tool call.
2986
+ A reply may quote a message of another channel, so a reply's `reference.channel` names the channel the quoted message is in (the Discord surface sets it, live and when it catches up). It is a channel key, like `channel`: pass its id (`parseChannelKey(reference.channel).id`) to `readAttachment` to read a quoted file, and compare it with the message's `channel` before treating the quoted files as the conversation's own. A forum post's starter is in the post itself, so a reply that quotes it compares as the same channel; a message of a thread's parent text channel, such as the one the thread was started from, is in that text channel, so a reply that quotes it compares as another.
2986
2987
 
2987
2988
  ```ts
2988
2989
  import { AttachmentReadError, DISCORD } from "pi-roundtable/discord";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-roundtable",
3
- "version": "0.52.3",
3
+ "version": "0.53.1",
4
4
  "description": "A plugin-driven Pi agent server for one owner, reached through Discord or the web",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -117,6 +117,12 @@ export interface InboundMessage {
117
117
  reference?: {
118
118
  text: string;
119
119
  attachments: AttachmentRef[];
120
+ /**
121
+ * The channel the referenced message is in, when the surface reports it; Discord does. Compare
122
+ * it with `channel` to tell a reply within the conversation (such as to a forum post's starter)
123
+ * from one to a message of another channel.
124
+ */
125
+ channel?: ChannelKey;
120
126
  /** The surface's id of the referenced message's author, when the surface reports it. */
121
127
  authorId?: string;
122
128
  /** The name a webhook posted the referenced message under, such as an agent's. */
@@ -41,6 +41,8 @@ function referenceOf(referenced: Message, mention: RegExp) {
41
41
  .replace(mention, "")
42
42
  .trim(),
43
43
  attachments: attachmentRefs(referenced, referenced.id),
44
+ // The fetched message's own channel: a forum post's starter is in the post itself; a referenced message elsewhere, such as a crosspost's source, is in another channel.
45
+ channel: channelKey("discord", referenced.channelId),
44
46
  authorId: referenced.author.id,
45
47
  ...(referenced.webhookId
46
48
  ? { webhookName: referenced.author.username }