@llblab/pi-kit 0.1.11 → 0.1.12
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 +5 -0
- package/README.md +2 -2
- package/node_modules/@llblab/pi-codex-usage/BACKLOG.md +1 -6
- package/node_modules/@llblab/pi-codex-usage/CHANGELOG.md +4 -0
- package/node_modules/@llblab/pi-codex-usage/README.md +1 -1
- package/node_modules/@llblab/pi-codex-usage/index.ts +1 -1
- package/node_modules/@llblab/pi-codex-usage/package.json +1 -1
- package/node_modules/@llblab/pi-telegram/CHANGELOG.md +4 -0
- package/node_modules/@llblab/pi-telegram/lib/bindings.ts +35 -8
- package/node_modules/@llblab/pi-telegram/package.json +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@llblab/pi-kit` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.1.12 - 2026-08-28
|
|
6
|
+
|
|
7
|
+
- `Codex Usage Release`: Advances `@llblab/pi-codex-usage` to `0.9.4`, reducing automatic OpenAI quota polling by increasing the refresh interval from 30 to 60 seconds while preserving the local countdown responsiveness.
|
|
8
|
+
- `Telegram Hotfix`: Advances `@llblab/pi-telegram` to `0.39.5`, preserving terminal-equivalent chronology by delivering an active turn's final Telegram answer before automatic-compaction start and completion notices.
|
|
9
|
+
|
|
5
10
|
## 0.1.11 - 2026-08-28
|
|
6
11
|
|
|
7
12
|
- `Telegram Hotfix`: Advances `@llblab/pi-telegram` to `0.39.4`, preventing repeated extension errors when print, RPC, ACP, or other headless hosts refresh lifecycle status without an initialized theme while preserving interactive status rendering.
|
package/README.md
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
| Package | Version | Resources |
|
|
8
8
|
| --- | ---: | --- |
|
|
9
9
|
| `@llblab/pi-actors` | `0.50.0` | Extension and Skills |
|
|
10
|
-
| `@llblab/pi-codex-usage` | `0.9.
|
|
10
|
+
| `@llblab/pi-codex-usage` | `0.9.4` | Extension |
|
|
11
11
|
| `@llblab/pi-grow-loop` | `0.7.3` | Extension and Skills |
|
|
12
|
-
| `@llblab/pi-telegram` | `0.39.
|
|
12
|
+
| `@llblab/pi-telegram` | `0.39.5` | Extension and Skills |
|
|
13
13
|
|
|
14
14
|
Versions are exact by design. Updating an extension does not change an installed kit until this repository explicitly advances that dependency and publishes a new kit version.
|
|
15
15
|
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
# Backlog
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
- [x] Fix stale extension context usage after session replacement or reload. Source: GitHub issue #1. Timers must not keep using captured stale `ctx` after Pi session lifecycle changes.
|
|
6
|
-
- [x] Make usage refresh cache/in-flight state model-aware for Codex vs Spark. A regular Codex cache or request must not temporarily render Spark as `n/a` after model switching.
|
|
7
|
-
- [x] Preserve the active `codex`/`spark` label for failure states. Spark failures should render `spark n/a` or `spark error`, not `codex ...`.
|
|
8
|
-
- [x] Replace the visually full startup/request placeholder with counter-moving upper/lower in-bar loading markers. Keep the last usable active-bucket bar visible during ordinary refreshes, and hold provisional zero-usage reports behind the loader until confirmed stable.
|
|
3
|
+
No open work.
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.4: Responsive Quota Polling
|
|
4
|
+
|
|
5
|
+
- Increased the automatic Codex quota refresh interval from 30 to 60 seconds. Impact: status values remain responsive down to the locally rendered seconds countdown while reducing repeated OpenAI requests, especially when several Pi instances are open.
|
|
6
|
+
|
|
3
7
|
## 0.9.3: Trusted Release Automation
|
|
4
8
|
|
|
5
9
|
- Added tag-gated release automation with exact package/lock/tag identity checks, full package validation, npm Trusted Publisher provenance, public registry verification, and workflow-owned GitHub Release creation through `.github/workflows/release.yml`.
|
|
@@ -14,7 +14,7 @@ This repository is a minimal fork of [`narumiruna/pi-extensions/extensions/pi-co
|
|
|
14
14
|
|
|
15
15
|
## Features
|
|
16
16
|
|
|
17
|
-
- Shows two counter-moving half-height markers in the statusline bar while the active Codex/Spark quota bucket is loading, then refreshes every
|
|
17
|
+
- Shows two counter-moving half-height markers in the statusline bar while the active Codex/Spark quota bucket is loading, then refreshes every 60 seconds
|
|
18
18
|
- Keeps the last usable active-bucket bar visible during ordinary refreshes instead of replacing known quota with a loading state
|
|
19
19
|
- Statusline output adapts to the response: weekly-only limits show an explicit remaining percentage and reset countdown, while dual-window limits keep the compact themed bar
|
|
20
20
|
- Regular Codex subscription models show the primary `codex` quota bucket
|
|
@@ -16,7 +16,7 @@ const HOUR_MS = 60 * MINUTE_MS;
|
|
|
16
16
|
const HOUR_TENTH_MS = 6 * MINUTE_MS;
|
|
17
17
|
const DAY_MS = 24 * HOUR_MS;
|
|
18
18
|
const DAY_TENTH_MS = 144 * MINUTE_MS;
|
|
19
|
-
const REFRESH_INTERVAL_MS =
|
|
19
|
+
const REFRESH_INTERVAL_MS = 60 * SECOND_MS;
|
|
20
20
|
const PROVISIONAL_RETRY_MS = SECOND_MS;
|
|
21
21
|
const FULL_AVAILABILITY_CONFIRMATION_MS = 15 * SECOND_MS;
|
|
22
22
|
const LOADING_FRAME_MS = 30;
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
> Each release keeps at most 8 outcome records of at most 512 characters.
|
|
4
4
|
|
|
5
|
+
## 0.39.5: Auto-Compaction Notice Chronology Hotfix
|
|
6
|
+
|
|
7
|
+
- `Turn Chronology`: Defers observed automatic-compaction notices while a Telegram turn is still active, preserving the same causal order shown by the terminal: final answer, compaction started, then compaction completed. Abandoned compactions and session shutdown discard deferred notices instead of leaking them into a later turn.
|
|
8
|
+
|
|
5
9
|
## 0.39.4: Headless Status Bar Hotfix
|
|
6
10
|
|
|
7
11
|
- `Headless Hosts`: Skips status-bar rendering when a print, RPC, ACP, or other non-interactive host has not initialized its theme, preventing repeated extension errors during lifecycle status refreshes while preserving normal interactive status updates and error propagation.
|
|
@@ -1028,6 +1028,7 @@ export function registerTelegramLifecycleRuntimeHooks({
|
|
|
1028
1028
|
});
|
|
1029
1029
|
};
|
|
1030
1030
|
let observedAutomaticCompaction = false;
|
|
1031
|
+
const deferredAutomaticCompactionNotices: string[] = [];
|
|
1031
1032
|
const sendCompactionNotice = async (text: string): Promise<void> => {
|
|
1032
1033
|
const turn = activeTurnRuntime.get();
|
|
1033
1034
|
const target = turn?.target ?? proactivePushTargetGetter?.();
|
|
@@ -1042,6 +1043,10 @@ export function registerTelegramLifecycleRuntimeHooks({
|
|
|
1042
1043
|
});
|
|
1043
1044
|
}
|
|
1044
1045
|
};
|
|
1046
|
+
const flushDeferredAutomaticCompactionNotices = async (): Promise<void> => {
|
|
1047
|
+
const notices = deferredAutomaticCompactionNotices.splice(0);
|
|
1048
|
+
for (const notice of notices) await sendCompactionNotice(notice);
|
|
1049
|
+
};
|
|
1045
1050
|
const compactionObserver = Lifecycle.createTelegramCompactionObserverRuntime({
|
|
1046
1051
|
isContextActive: isSessionContextActive,
|
|
1047
1052
|
setCompactionInProgress: lifecycle.setCompactionInProgress,
|
|
@@ -1054,6 +1059,7 @@ export function registerTelegramLifecycleRuntimeHooks({
|
|
|
1054
1059
|
recordRuntimeEvent,
|
|
1055
1060
|
onCompactionAbandoned: () => {
|
|
1056
1061
|
observedAutomaticCompaction = false;
|
|
1062
|
+
deferredAutomaticCompactionNotices.length = 0;
|
|
1057
1063
|
activityRuntime.onCompactionAbandoned();
|
|
1058
1064
|
},
|
|
1059
1065
|
});
|
|
@@ -1088,6 +1094,7 @@ export function registerTelegramLifecycleRuntimeHooks({
|
|
|
1088
1094
|
activityVerbosityRuntime?.reset();
|
|
1089
1095
|
assistantOutputRuntime.stop();
|
|
1090
1096
|
observedAutomaticCompaction = false;
|
|
1097
|
+
deferredAutomaticCompactionNotices.length = 0;
|
|
1091
1098
|
compactionObserver.onSessionShutdown();
|
|
1092
1099
|
if (event.reason === "quit" && disconnectOnQuit) {
|
|
1093
1100
|
try {
|
|
@@ -1109,11 +1116,17 @@ export function registerTelegramLifecycleRuntimeHooks({
|
|
|
1109
1116
|
activityRuntime.onCompactionStart(Pi.getSessionCompactionReason(event));
|
|
1110
1117
|
compactionObserver.onSessionBeforeCompact(event, ctx);
|
|
1111
1118
|
if (shouldNotify) {
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1119
|
+
if (activeTurnRuntime.has()) {
|
|
1120
|
+
deferredAutomaticCompactionNotices.push(
|
|
1121
|
+
Commands.TELEGRAM_COMPACTION_STARTED_MARKDOWN,
|
|
1122
|
+
);
|
|
1123
|
+
} else {
|
|
1124
|
+
await waitForActiveTurnDelivery();
|
|
1125
|
+
if (!isSessionContextActive(ctx)) return;
|
|
1126
|
+
await sendCompactionNotice(
|
|
1127
|
+
Commands.TELEGRAM_COMPACTION_STARTED_MARKDOWN,
|
|
1128
|
+
);
|
|
1129
|
+
}
|
|
1117
1130
|
}
|
|
1118
1131
|
},
|
|
1119
1132
|
async onSessionCompact(event, ctx) {
|
|
@@ -1122,9 +1135,18 @@ export function registerTelegramLifecycleRuntimeHooks({
|
|
|
1122
1135
|
compactionObserver.onSessionCompact(event, ctx);
|
|
1123
1136
|
if (observedAutomaticCompaction) {
|
|
1124
1137
|
observedAutomaticCompaction = false;
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1138
|
+
if (
|
|
1139
|
+
activeTurnRuntime.has() ||
|
|
1140
|
+
deferredAutomaticCompactionNotices.length > 0
|
|
1141
|
+
) {
|
|
1142
|
+
deferredAutomaticCompactionNotices.push(
|
|
1143
|
+
Commands.TELEGRAM_COMPACTION_COMPLETED_MARKDOWN,
|
|
1144
|
+
);
|
|
1145
|
+
} else {
|
|
1146
|
+
await sendCompactionNotice(
|
|
1147
|
+
Commands.TELEGRAM_COMPACTION_COMPLETED_MARKDOWN,
|
|
1148
|
+
);
|
|
1149
|
+
}
|
|
1128
1150
|
}
|
|
1129
1151
|
},
|
|
1130
1152
|
async onAgentStart(event, ctx) {
|
|
@@ -1177,6 +1199,11 @@ export function registerTelegramLifecycleRuntimeHooks({
|
|
|
1177
1199
|
if (!isSessionContextActive(ctx)) return;
|
|
1178
1200
|
activityRuntime.onAgentEnd();
|
|
1179
1201
|
await agentLifecycleHooks.onAgentEnd(event, ctx);
|
|
1202
|
+
if (deferredAutomaticCompactionNotices.length > 0) {
|
|
1203
|
+
await waitForActiveTurnDelivery();
|
|
1204
|
+
if (!isSessionContextActive(ctx)) return;
|
|
1205
|
+
await flushDeferredAutomaticCompactionNotices();
|
|
1206
|
+
}
|
|
1180
1207
|
},
|
|
1181
1208
|
async onAgentSettled(event, ctx) {
|
|
1182
1209
|
if (!isSessionContextActive(ctx)) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llblab/pi-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@llblab/pi-actors": "0.50.0",
|
|
44
|
-
"@llblab/pi-codex-usage": "0.9.
|
|
44
|
+
"@llblab/pi-codex-usage": "0.9.4",
|
|
45
45
|
"@llblab/pi-grow-loop": "0.7.3",
|
|
46
|
-
"@llblab/pi-telegram": "0.39.
|
|
46
|
+
"@llblab/pi-telegram": "0.39.5"
|
|
47
47
|
},
|
|
48
48
|
"bundledDependencies": [
|
|
49
49
|
"@llblab/pi-actors",
|