pi-roundtable-sandbox 0.49.0 → 0.50.0

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
@@ -2,6 +2,19 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.50.0] - 2026-11-16
6
+
7
+ ### Added
8
+
9
+ - `ChannelContextOptions.conversation(message)` (and the host default `discord.channelContext.conversation`, code only) names the conversation a turn runs in, such as the principal of a person's private conversation in a forum post. What channel context remembers as handed over then belongs to that conversation: a turn of another conversation than the channel's last reads the window as if nothing had been handed over, the thread's starter too, so a second person who asks in a post gets the card, the comments and the earlier discussion that the first asker's turn already read. One record is still kept per channel, so it takes no more memory. Without the option nothing changes. The sandbox's `channelContext` accepts it.
10
+
11
+ ## [0.49.1] - 2026-11-16
12
+
13
+ ### Fixed
14
+
15
+ - Sandbox's `channelContext` option now accepts `starter` and `authors`, which its type already allowed but its startup check rejected.
16
+ - Channel context no longer looks up a thread's starter on every turn: it skips the lookup once the starter was handed over and reuses the fetched window's copy when it holds it.
17
+
5
18
  ## [0.49.0] - 2026-11-16
6
19
 
7
20
  - Release in lockstep with pi-roundtable 0.49.0 (channel context can include a thread's opening message); no package-specific behavior changes.
package/README.md CHANGED
@@ -11,7 +11,7 @@ Opt-in options (below) can also sandbox a whole Discord server, share one worksp
11
11
 
12
12
  ## Requirements
13
13
 
14
- - Bun 1.4.4 or later and pi-roundtable `>=0.49.0 <0.50.0`.
14
+ - Bun 1.4.4 or later and pi-roundtable `>=0.50.0 <0.51.0`.
15
15
  - A native Linux host with a local Docker daemon and a non-root service account permitted to run Docker.
16
16
  - The worker UID/GID match that account; root workers are refused.
17
17
  - A trusted OpenAI-compatible, non-streaming Chat Completions endpoint supporting function tools and `max_tokens`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-roundtable-sandbox",
3
- "version": "0.49.0",
3
+ "version": "0.50.0",
4
4
  "description": "Sealed guest channels and an allow-listed credential broker for pi-roundtable",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@earendil-works/pi-coding-agent": ">=1.0.0 <2",
40
- "pi-roundtable": ">=0.49.0 <0.50.0",
40
+ "pi-roundtable": ">=0.50.0 <0.51.0",
41
41
  "typebox": ">=1.3.34 <2"
42
42
  },
43
43
  "peerDependenciesMeta": {
@@ -53,7 +53,7 @@
53
53
  "@biomejs/biome": "2.5.15",
54
54
  "@types/bun": "1.4.3",
55
55
  "discord.js": "14.27.0",
56
- "pi-roundtable": "0.49.0",
56
+ "pi-roundtable": "0.50.0",
57
57
  "typebox": "1.4.6",
58
58
  "typescript": "7.0.2"
59
59
  }
@@ -46,6 +46,9 @@ const KEYS = [
46
46
  "peerMessageChars",
47
47
  "foreignWebhook",
48
48
  "attachments",
49
+ "starter",
50
+ "authors",
51
+ "conversation",
49
52
  ];
50
53
 
51
54
  function onlyKeys(name: string, value: object, allowed: readonly string[]) {
@@ -88,6 +91,15 @@ export function resolveChannelContextOptions(
88
91
  typeof given.foreignWebhook !== "function"
89
92
  )
90
93
  throw new TypeError("channelContext.foreignWebhook must be a function");
94
+ if (given.starter !== undefined && typeof given.starter !== "boolean")
95
+ throw new TypeError("channelContext.starter must be a boolean");
96
+ if (given.authors !== undefined && typeof given.authors !== "function")
97
+ throw new TypeError("channelContext.authors must be a function");
98
+ if (
99
+ given.conversation !== undefined &&
100
+ typeof given.conversation !== "function"
101
+ )
102
+ throw new TypeError("channelContext.conversation must be a function");
91
103
  if (given.attachments !== undefined) {
92
104
  if (typeof given.attachments !== "object" || given.attachments === null)
93
105
  throw new TypeError("channelContext.attachments must be an object");