pi-roundtable 0.7.9 → 0.7.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/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.7.10] - 2026-10-03
9
+
10
+ ### Added
11
+
12
+ - Kit: the core's compaction tiers for a host that builds its own Pi session, such as a sandbox worker: `CompactionTiers`, `compactionEngine`, `SOFT_COMPACT_TOKENS`, `HARD_COMPACT_TOKENS`, `COMPACT_HEADROOM_TOKENS`, and the types `CompactionEngine`, `CompactionHistory` and `LatestCompaction`.
13
+ - Sandbox: Pi worker sessions compact with those tiers, through an optional host compactor (`compaction` on `PiSandboxRuntime`) at 300,000 tokens and Pi's summary past 500,000, and the host logs each compaction and fallback per channel.
14
+
15
+ ### Changed
16
+
17
+ - Sandbox: a failed Pi turn keeps its cause and is logged, the broker logs upstream failures, a timed-out worker's last log lines are logged before its container is removed, and Pi containers log to journald tagged `sandbox/<channel>` by default instead of local files (the Docker daemon must have journald).
18
+
8
19
  ## [0.7.9] - 2026-10-03
9
20
 
10
21
  ### Added
package/docs/plugins.md CHANGED
@@ -67,6 +67,7 @@ Use the kit's building blocks for a plugin that runs Pi itself, such as a coding
67
67
  - Tools: `textToolsExtension`, `requiredString`, `stringList` (with `toolText` and `toolError`) for tools that return text.
68
68
  - Mirroring a built-in tool in a worker that cannot reach the host: `SCHEDULE_TOOLS`, `scheduleToolSpecs({ locale, timeZone })`, `isScheduleTool`, `callScheduleTool`, `DELEGATE_TOOL` and `DELEGATE_TOOL_SPEC`.
69
69
  The specs take the locale and time zone for their descriptions, so the worker needs no process-wide setting.
70
+ - Compaction: `CompactionTiers` gives a session the core's compaction tiers (`settings()` for Pi's `SettingsManager`, `wrapCompactor(factory, onBypass)` to hold a compaction extension back past the ceiling, `latest()`), with `SOFT_COMPACT_TOKENS` (300,000), `HARD_COMPACT_TOKENS` (500,000), `COMPACT_HEADROOM_TOKENS` (50,000), `compactionEngine(details, engine)` and the types `CompactionEngine`, `CompactionHistory` and `LatestCompaction`.
70
71
  - Effort: `effortJudge` picks a turn's thinking level from a message with your own brief (`EffortBrief`, `JUDGE_WORK`).
71
72
  - Presentation and small helpers: `thinkingLine`, `zonedStamp(date, timeZone)`, `channelQueue()` (a queue of your own, so work does not wait behind a running turn), `checkRepoName` and `SKILL_LIST_TOOL` with `skillListExtension` for repositories and skills, and `searchTerms` for memory search.
72
73
 
@@ -2665,6 +2666,14 @@ Import from the entries listed below; source area files are internal.
2665
2666
  | `formatModelRef` | `pi-roundtable/kit` | value |
2666
2667
  | `headline` | `pi-roundtable/kit` | value |
2667
2668
  | `holdChain` | `pi-roundtable/kit` | value |
2669
+ | `COMPACT_HEADROOM_TOKENS` | `pi-roundtable/kit` | value |
2670
+ | `CompactionTiers` | `pi-roundtable/kit` | value |
2671
+ | `compactionEngine` | `pi-roundtable/kit` | value |
2672
+ | `HARD_COMPACT_TOKENS` | `pi-roundtable/kit` | value |
2673
+ | `SOFT_COMPACT_TOKENS` | `pi-roundtable/kit` | value |
2674
+ | `CompactionEngine` | `pi-roundtable/kit` | type |
2675
+ | `CompactionHistory` | `pi-roundtable/kit` | type |
2676
+ | `LatestCompaction` | `pi-roundtable/kit` | type |
2668
2677
  | `isScheduleTool` | `pi-roundtable/kit` | value |
2669
2678
  | `lastAssistant` | `pi-roundtable/kit` | value |
2670
2679
  | `mcpAdapterExtension` | `pi-roundtable/kit` | value |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-roundtable",
3
- "version": "0.7.9",
3
+ "version": "0.7.10",
4
4
  "description": "A plugin-driven Pi agent server for Discord",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -0,0 +1,14 @@
1
+ // The core's compaction tiers, for a host that builds its own Pi session (a sandbox worker, say).
2
+
3
+ export type {
4
+ CompactionEngine,
5
+ CompactionHistory,
6
+ LatestCompaction,
7
+ } from "../core/runtime/compaction-tiers.ts";
8
+ export {
9
+ COMPACT_HEADROOM_TOKENS,
10
+ CompactionTiers,
11
+ compactionEngine,
12
+ HARD_COMPACT_TOKENS,
13
+ SOFT_COMPACT_TOKENS,
14
+ } from "../core/runtime/compaction-tiers.ts";
package/src/kit/index.ts CHANGED
@@ -14,6 +14,18 @@ export {
14
14
  withAttachmentsBlock,
15
15
  withReference,
16
16
  } from "./channels.ts";
17
+ export type {
18
+ CompactionEngine,
19
+ CompactionHistory,
20
+ LatestCompaction,
21
+ } from "./compaction.ts";
22
+ export {
23
+ COMPACT_HEADROOM_TOKENS,
24
+ CompactionTiers,
25
+ compactionEngine,
26
+ HARD_COMPACT_TOKENS,
27
+ SOFT_COMPACT_TOKENS,
28
+ } from "./compaction.ts";
17
29
  export { scrubDiagnostic } from "./diagnostics.ts";
18
30
  export type {
19
31
  ChoiceAnswer,