killeros 3.0.4 → 3.0.6
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 +39 -0
- package/Killeros.ts +4 -2
- package/README.md +263 -94
- package/killeros/auto-compaction.ts +13 -1
- package/killeros/footer.ts +59 -23
- package/killeros/goal-settlement.ts +13 -1
- package/killeros/notifications.ts +2 -2
- package/killeros/question-ui.ts +173 -494
- package/killeros/question.ts +27 -20
- package/killeros/worked-for.ts +2 -2
- package/package.json +11 -9
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,45 @@ All notable changes to KillerOS are documented here. Releases use New Features f
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [3.0.6] - 2026-10-12
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Rewrote the README with installation and onboarding steps, grouped usage and configuration guidance, development checks, and release and security expectations.
|
|
12
|
+
- Raised the minimum supported Pi version to 1.1.0, pinned development packages to 1.1.0, and moved all CI Pi targets to that baseline or newer. Cancellation and retry coverage now runs without old-version gates.
|
|
13
|
+
- Removed repository checks that required exact historical changelog wording while retaining current README, Pi compatibility, package, and release safeguards.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Added remaining token counts and Pi's configured context capacity to the TUI footer, with capacity-only and percentage-only fallbacks at narrow widths and explicit unknown states.
|
|
18
|
+
- Added real Pi TUI coverage for context budgets, model switching, automatic-compaction commands, settings failures, reload, and responsive footer output.
|
|
19
|
+
- Added real-Pi cancellation coverage through the complete KillerOS entry point, checking paused goal state, stopped receipts, and suppressed completion sounds.
|
|
20
|
+
- Added an installed-CLI goal workflow covering package loading, public command routing, model-issued completion, durable session restoration, and no unsolicited model work. Verified on Windows Node 22.19.0 with Pi 1.1.0; the exact Windows Node 24.19.0/Pi 1.1.0 combination is skipped after reproduced native RPC shutdown crashes.
|
|
21
|
+
- Added a native-terminal installed-package pilot for question selection after resize, cancellation without partial answers, and multiline editor text across fullscreen transcript navigation. Kept focused question and editor tests, added terminal startup and assertion-failure cleanup controls, and added five-run no-forced-exit CI checks for the installed pilots and changed cancellation lifecycle before the normal-concurrency full suite. Terminal failure logs retain selected versions, sanitized launch arguments, and bounded screen and raw-output diagnostics.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- Fixed release validation for the README's rewritten npm and Git pin examples while retaining stale-version rejection. Made the executable-mode Git oracle refresh index metadata before comparing changes, preventing metadata-only CI failures without changing its assertions.
|
|
26
|
+
- Show the footer's manual `/compact` hint at the existing rounded 15% warning threshold only when KillerOS automatic compaction is known to be off. Commands and turn-end settings reads refresh the hint, including external changes and read failures, without changing automatic triggers or Pi's independent compaction behavior.
|
|
27
|
+
- Fixed unhandled RPC test-driver stdin errors when a child exits during a write. A real-process control now verifies write rejection, retained diagnostics, and orderly cleanup.
|
|
28
|
+
- Fixed the native-terminal test driver's exit race by draining queued screen parsing before rejecting final-output waits or disposing the parser. Kept the native capability probe alive until its input confirmation is observed before orderly shutdown. Successful cleanup waits for queued parsing and tracked native callbacks to quiesce before disposing the parser; cleanup errors are surfaced and the observer is disabled on every close path.
|
|
29
|
+
- Fixed RPC fixture cancellation checks before sending commands or returning cached records. Added subprocess controls that reject unauthorized writes and prevent PID-tree escalation after the parent exits but inherited pipes remain open.
|
|
30
|
+
|
|
31
|
+
## [3.0.5] - 2026-10-08
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- Used Pi 1.1.0's final cancellation signal for `Stopped` task receipts and silent completion notifications, including cancellation after a normal assistant response or without an assistant result. Kept observed changes and checks and the Pi 1.0.4 fallback.
|
|
36
|
+
- Stopped accepted goal continuation after final request cancellation while preserving compaction recovery through its completion and cancellation callbacks.
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
|
|
40
|
+
- Added real Pi 1.1.0 cancellation, busy-error retry, native Mistral transport retry, and additive tool-selection checks. Documented native tool modifiers and reliable extension-tool exclusion through `--exclude-tools`, including Pi 1.1.0's modifier limitation. Kept the Pi and Node support floors and locked development packages unchanged.
|
|
41
|
+
|
|
42
|
+
### Changed
|
|
43
|
+
|
|
44
|
+
- Moved question input to Pi's native dialogs, with KillerOS coordinating bounded multi-select, filtering, custom answers, recent-answer history, and paged text previews. Each step uses native dialog controls and Pi 1.1.0's blocked-status reporting. Preserved the question tool's inputs and results, TUI restriction, and sequential model-only exposure; cancellation and session changes prevent stale steps or partial success.
|
|
45
|
+
|
|
7
46
|
## [3.0.4] - 2026-10-07
|
|
8
47
|
|
|
9
48
|
### Changed
|
package/Killeros.ts
CHANGED
|
@@ -20,6 +20,7 @@ import { registerCodexFastMode } from "./killeros/codex-fast.ts";
|
|
|
20
20
|
import { registerPersonalInstructions } from "./killeros/personal-instructions.ts";
|
|
21
21
|
import { registerQuestionTool } from "./killeros/question.ts";
|
|
22
22
|
import { createGoalRuntime } from "./killeros/runtime.ts";
|
|
23
|
+
import { createKillerosSettingsStore } from "./killeros/settings.ts";
|
|
23
24
|
import { registerShellUi } from "./killeros/shell-ui.ts";
|
|
24
25
|
import { registerWorkedFor } from "./killeros/worked-for.ts";
|
|
25
26
|
|
|
@@ -42,12 +43,13 @@ export default function Killeros(pi: ExtensionAPI, options: KillerosOptions = {}
|
|
|
42
43
|
registerAliases(pi);
|
|
43
44
|
registerHandoff(pi, goalRuntime, options.handoffMaxTokens);
|
|
44
45
|
registerSlashAutocomplete(pi, commandResolver);
|
|
45
|
-
|
|
46
|
+
const settingsStore = createKillerosSettingsStore();
|
|
47
|
+
const updateFooterPreference = registerFooter(pi, goalRuntime, settingsStore);
|
|
46
48
|
registerCodexFastMode(pi);
|
|
47
49
|
registerLifecycleHooks(pi);
|
|
48
50
|
registerWorkedFor(pi);
|
|
49
51
|
const goalCompaction = registerGoalSettlement(pi, goalRuntime);
|
|
50
|
-
registerAutoCompaction(pi, { goal: goalCompaction });
|
|
52
|
+
registerAutoCompaction(pi, { goal: goalCompaction, settingsStore, onPreferenceChange: updateFooterPreference });
|
|
51
53
|
registerRequestActivity(pi);
|
|
52
54
|
registerCompletionNotifications(pi, options.completionNotifications);
|
|
53
55
|
}
|
package/README.md
CHANGED
|
@@ -1,189 +1,358 @@
|
|
|
1
1
|
# KillerOS
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
## A custom terminal UI and goal runner for the Pi coding agent
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
KillerOS is a TypeScript extension for the [Pi coding agent](https://github.com/earendil-works/pi). It replaces Pi's stock terminal UI and lets the agent work toward an objective across turns and context compaction. You can pause or resume a goal, carry context into a fresh session, and answer structured questions without leaving the terminal.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The UI has a dark theme with coral accents, a multiline editor with slash-command completion, and a footer for model, context, and goal state. The startup masthead shows versions, model, working directory, and Git branch. Settled task receipts show duration and token usage. Completion sounds are optional.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- `/goal`: set an objective and Pi keeps working toward it across turns, compaction, reloads, and branch navigation. Each turn must record `continue` with evidence and one next action, `complete`, or the existing blocker decision; otherwise the goal pauses. New goals pause after 20 turns; `/goal resume` grants another 20.
|
|
11
|
-
- `/codex-fast`: toggles the `priority` service tier on legacy Codex and eligible native OpenAI Responses requests or reports its status.
|
|
12
|
-
- `/handoff`: starts a fresh linked session carrying visible continuation context.
|
|
13
|
-
- `/auto-compact`: reports, enables, disables, or tunes automatic context compaction.
|
|
14
|
-
- A `question` tool with single-select and multi-select modes.
|
|
15
|
-
- Lifecycle hooks (`tool_call`, `tool_result`, `agent_settled`) from `.pi/killeros-hooks.json`, plus `AGENTS.local.md` loading for trusted projects.
|
|
16
|
-
- Optional completion sounds for settled requests.
|
|
9
|
+

|
|
17
10
|
|
|
11
|
+
- [Install and start](#install-and-start)
|
|
12
|
+
- [Use KillerOS](#use-killeros)
|
|
13
|
+
- [Configuration and Pi compatibility](#configuration-and-pi-compatibility)
|
|
14
|
+
- [Set up for development](#set-up-for-development)
|
|
15
|
+
- [Contribution and release expectations](#contribution-and-release-expectations)
|
|
16
|
+
- [Known issues and limits](#known-issues-and-limits)
|
|
17
|
+
- [Security](#security)
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## Install and start
|
|
20
|
+
|
|
21
|
+
### Requirements
|
|
20
22
|
|
|
21
23
|
- Node.js 22.19.0+
|
|
22
|
-
- Pi 1.0
|
|
23
|
-
- An interactive TUI session for the custom header, editor, footer, and
|
|
24
|
+
- Pi 1.1.0 or later below 2.0.0
|
|
25
|
+
- An interactive TUI session for the custom header, editor, footer, and questions
|
|
24
26
|
|
|
25
|
-
Users on older Pi versions must upgrade.
|
|
27
|
+
KillerOS supports Windows and Linux. Users on older Pi versions must upgrade.
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
Pi extensions run with your user permissions. Review the source before installing globally. See [Security](#security) before trusting project hooks. Goal work sends model requests and can incur provider charges.
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
1. [Install Pi](https://github.com/earendil-works/pi#getting-started) if you do not already have it.
|
|
32
|
+
2. Install KillerOS:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pi install npm:killeros
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
3. Restart Pi in the project you want to work on:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pi
|
|
42
|
+
```
|
|
32
43
|
|
|
33
|
-
|
|
44
|
+
4. If you have not configured a provider, run `/login` in Pi. Then enter an objective:
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
/goal Create `./summary.md` describing this repository's entry points, verified against the source files
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The goal appears in the footer. The agent works until it records completion, reports a blocker, or pauses. On completion, `summary.md` contains the repository summary. A new goal has a 20-turn limit. Use `/goal` to inspect it and `/goal resume` to grant another 20 turns when the limit is exhausted.
|
|
51
|
+
|
|
52
|
+
You can also install from GitHub:
|
|
34
53
|
|
|
35
54
|
```bash
|
|
36
55
|
pi install git:github.com/KyrosHendrix/pi-KillerOS
|
|
37
56
|
```
|
|
38
57
|
|
|
39
|
-
|
|
58
|
+
To pin a release, use `npm:killeros@3.0.6` or append a Git tag such as `@v3.0.6` to the Git source. Add `-l` to install only for the current project. Pi loads project packages only after you grant project trust.
|
|
40
59
|
|
|
41
|
-
|
|
60
|
+
### Commands
|
|
42
61
|
|
|
43
62
|
```text
|
|
44
63
|
/goal View the current goal
|
|
45
|
-
/goal <objective>
|
|
64
|
+
/goal <objective> Set an objective
|
|
46
65
|
/goal pause Stop automatic continuation
|
|
47
66
|
/goal resume Resume automatic continuation
|
|
48
67
|
/goal clear Remove the current goal
|
|
49
|
-
/codex-fast [status] Toggle or report
|
|
68
|
+
/codex-fast [status] Toggle or report fast mode
|
|
50
69
|
/auto-compact [status|on|off|<percent>]
|
|
51
70
|
Inspect or change automatic compaction
|
|
52
71
|
/notification Configure the completion sound
|
|
53
|
-
/handoff [focus]
|
|
54
|
-
/clear
|
|
72
|
+
/handoff [focus] Start a linked session with continuation context
|
|
73
|
+
/clear Start a new session after confirmation
|
|
55
74
|
/exit Quit Pi gracefully
|
|
56
75
|
```
|
|
57
76
|
|
|
58
|
-
|
|
77
|
+
## Use KillerOS
|
|
78
|
+
|
|
79
|
+
### Goals and proof
|
|
80
|
+
|
|
81
|
+
Include the result you want and how the agent can verify it:
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
/goal Reduce p95 checkout latency below 120 ms, verified by the checkout benchmark, while keeping the correctness suite green
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
KillerOS cannot independently prove arbitrary objectives from prose. The assistant must check the whole objective before reporting completion.
|
|
59
88
|
|
|
60
|
-
|
|
89
|
+
A directly quoted, path-shaped file target adds silent file proof. KillerOS captures its baseline at goal start and accepts completion only after the file is created or changed. For an extensionless relative file, use an explicit path such as `./summary` or `.\summary`. Bare quoted prose uses model-reported completion. File proof verifies the deliverable, not every acceptance criterion in the objective.
|
|
61
90
|
|
|
62
|
-
|
|
91
|
+
Each goal turn must record a decision through `killeros_goal_update`:
|
|
63
92
|
|
|
64
|
-
|
|
93
|
+
- `continue`, with evidence and one next action.
|
|
94
|
+
- `complete`, after verification.
|
|
95
|
+
- A blocker decision that stops automatic work.
|
|
65
96
|
|
|
66
|
-
|
|
97
|
+
An ordinary response does not authorize another turn. Missing decisions, repeated continuation reports, and an unavailable goal tool pause the goal. New goals pause after 20 turns without warning. An explicit `/goal resume` on an exhausted goal grants another 20. Restored goals retain their saved limit.
|
|
67
98
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
99
|
+
Goals survive compaction, reloads, and session-tree navigation. Compaction recovery never grants turns. Recovery within the same turn requires an actual interruption. Successful or skipped compaction cannot restart a stopped goal without an accepted decision. A request that completes or blocks a goal stays goal-owned through settlement, so automatic compaction cannot restart it as ordinary work.
|
|
100
|
+
|
|
101
|
+
A blocked goal stays stopped. During a later ordinary TUI or RPC request in a saved session, the assistant can complete the same unchanged objective with current evidence. This path accepts only `complete`. It preserves the original file baseline and records `file` proof or `model-reported` completion. It does not resume automatic work, grant turns, restart the active clock, or require `/goal clear`. Failed proof or a response without a completion decision leaves the goal blocked. Paused goals still require explicit user controls.
|
|
102
|
+
|
|
103
|
+
Completed goals leave the footer but remain available through `/goal` and session history.
|
|
104
|
+
|
|
105
|
+
Pending goal commands do not replace newer state. If committed navigation changes the branch or another mutation changes the goal during confirmation, idle waiting, or file-baseline reading, KillerOS discards the pending mutation. Cancelled navigation preserves valid pending commands. Discarding a stale replacement preserves the surviving goal's authorized continuation.
|
|
106
|
+
|
|
107
|
+
### Context and automatic compaction
|
|
108
|
+
|
|
109
|
+
Compaction triggers by default at 15% tokens remaining. Use `/auto-compact status` to inspect the effective KillerOS preference, `on` or `off` to toggle it, or an integer from 0 through 100 to set the threshold:
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
/auto-compact 20
|
|
113
|
+
/auto-compact off
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Turning off KillerOS automatic compaction does not turn off Pi's own automatic compaction. A threshold of 0 does not disable Pi's token reserve. Later ordinary requests can still use compaction continuation.
|
|
117
|
+
|
|
118
|
+
The footer shows remaining context as `ctx 85% (849K/1M)`. The percentage and numerator both mean remaining. The denominator is Pi's configured context capacity, not an independently verified provider limit. Counts use decimal K and M units and round down.
|
|
119
|
+
|
|
120
|
+
On narrow terminals, the footer drops the remaining count, then capacity, before dropping the model name and percentage. Unknown usage shows only capacity. Unknown capacity shows `ctx —%` without an invented limit. Usage estimates can be unavailable after compaction.
|
|
121
|
+
|
|
122
|
+
At the rounded 15% remaining warning threshold, the footer suggests `/compact` only when KillerOS automatic compaction is known to be off. Successful `/auto-compact` changes refresh the hint immediately. Turn-end settings reads also refresh it, including changes made by another process. The warning stays at 15% regardless of the automatic threshold. Settings-read errors omit the hint.
|
|
123
|
+
|
|
124
|
+
### Fast mode and billing
|
|
125
|
+
|
|
126
|
+
Priority service can affect billing. OpenAI controls account and model eligibility, the accepted service tier, and charges. A ChatGPT subscription does not guarantee accepted or free priority service.
|
|
127
|
+
|
|
128
|
+
Fast mode is off by default. `/codex-fast` toggles it. `/codex-fast status` reports the preference without changing it. The preference lasts for the current Pi process, including model switches and extension reloads. KillerOS does not save it between processes. The command and notifications retain their legacy Codex wording.
|
|
129
|
+
|
|
130
|
+
Fast mode applies to legacy `openai-codex` requests and native requests that meet all these conditions:
|
|
131
|
+
|
|
132
|
+
- The selected model uses provider `openai` and API `openai-responses`.
|
|
133
|
+
- Its base URL is `https://api.openai.com/v1`, with an optional trailing slash.
|
|
134
|
+
- The request payload names the selected model's exact ID.
|
|
135
|
+
|
|
136
|
+
API-key and ChatGPT subscription authentication follow the same rule. Custom endpoints, Azure, other APIs, and ambiguous native requests pass through unchanged.
|
|
137
|
+
|
|
138
|
+
When enabled, fast mode overrides an eligible request's service tier with `priority` and preserves sampling and other payload fields. When disabled, it leaves the request unchanged. The footer's `fast` label means the preference applies to the selected model, not that OpenAI accepted priority service. KillerOS leaves provider errors and retries to Pi. It does not silently retry with a different tier.
|
|
139
|
+
|
|
140
|
+
### Questions
|
|
141
|
+
|
|
142
|
+
The `question` tool supports single-select and multi-select answers. It asks one question per invocation and requires TUI mode.
|
|
143
|
+
|
|
144
|
+
In single-select mode, choosing a numbered option submits the answer. In multi-select mode, choosing an option toggles its selection and reopens the selector. Choose **Submit answers** when finished. KillerOS checks the requested minimum and maximum. It returns predefined answers in their original order, followed by an optional custom answer.
|
|
145
|
+
|
|
146
|
+
Choose **Custom answer** to open Pi's text input. Multi-select allows one custom answer, which you can edit or remove. Blank answers do not submit. Custom answers accept up to 4,000 Unicode characters. Cancelling custom input returns to the selector without losing selections.
|
|
147
|
+
|
|
148
|
+
**More actions** lets you filter options, clear a filter, review the full question and option details, or select a recent custom answer. Filters match labels and descriptions without losing hidden selections. Filter queries accept up to 4,000 Unicode characters and 16,000 UTF-8 bytes.
|
|
149
|
+
|
|
150
|
+
Option summaries have bounded descriptions. Review displays full descriptions and proposal previews as paged plain text, including Markdown source. Use **Next page**, **Previous page**, and **Back** to navigate. Long option lists and recent-answer history also use pages. History holds at most 100 distinct answers and 64 KiB of text in the current session. Session changes clear it.
|
|
151
|
+
|
|
152
|
+
Questions use Pi's native dialog keybindings and text editing. Multi-select uses successive selection steps, not the former space-toggle and slash-filter shortcuts. Resizing preserves selections and text-input drafts.
|
|
153
|
+
|
|
154
|
+
Cancelling the main selector discards unsubmitted answers. Cancelling a filter, history, or review step returns to the selector. Agent cancellation or session invalidation closes the question and prevents another step. Dialog steps stay within one tool execution. They do not send model requests or grant goal turns.
|
|
155
|
+
|
|
156
|
+
### Handoff
|
|
157
|
+
|
|
158
|
+
`/handoff [focus]` creates a fresh linked session with visible continuation context. It saves that context as a user message before reporting success, so you can exit and resume immediately without another prompt. Creating the handoff does not start an agent turn.
|
|
159
|
+
|
|
160
|
+
The summary output limit is 8192 tokens by default. Raise `handoffMaxTokens` if long sessions truncate it. Handoff validation rejects recognized credentials before creating the destination session. See [Security](#security) for the limits of that check.
|
|
73
161
|
|
|
74
|
-
|
|
162
|
+
### Receipts, sounds, and Git status
|
|
75
163
|
|
|
76
|
-
|
|
164
|
+
Receipts and completion sounds wait for final `agent_settled`, including across provider retries. Sounds are off by default. Configure them with `/notification` in TUI mode. The tab-title indicator requires a Nerd Font.
|
|
77
165
|
|
|
78
|
-
Pi 1.0
|
|
166
|
+
On Pi 1.1.0, final request cancellation records `Stopped` and suppresses the sound even if the last assistant response ended normally. The receipt retains recorded changes and checks. Cancellation stops goal continuation and provider retry work. Cancelling pending compaction prevents its recovery.
|
|
79
167
|
|
|
80
|
-
|
|
168
|
+
Session replacement, reload, and committed tree navigation discard unfinished receipts. Late results cannot write or notify through the old session context or attach to another branch. Cancelled navigation preserves pending receipts.
|
|
81
169
|
|
|
82
|
-
|
|
170
|
+
Failed Git reads retain the footer's last successful file counts and mark task changes unavailable. KillerOS does not treat a failed scan as an empty repository. Passive scans compare content without executing repository filters or repository-owned Git shims.
|
|
171
|
+
|
|
172
|
+
## Configuration and Pi compatibility
|
|
173
|
+
|
|
174
|
+
### KillerOS settings
|
|
175
|
+
|
|
176
|
+
KillerOS activates its packaged `killeros` theme on TUI start. It stores settings in `killeros.json` in Pi's global agent directory, normally `~/.pi/agent/killeros.json`:
|
|
83
177
|
|
|
84
178
|
```json
|
|
85
179
|
{
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
180
|
+
"autoCompaction": {
|
|
181
|
+
"enabled": true,
|
|
182
|
+
"percentRemaining": 15
|
|
183
|
+
},
|
|
184
|
+
"handoffMaxTokens": 8192
|
|
91
185
|
}
|
|
92
186
|
```
|
|
93
187
|
|
|
94
|
-
|
|
188
|
+
Concurrent `/auto-compact` commands preserve independent changes to the enabled flag and threshold, along with unrelated settings. Malformed settings and failed writes report errors without claiming success or replacing the original file.
|
|
95
189
|
|
|
96
|
-
|
|
190
|
+
Trusted projects can use lifecycle hooks for `tool_call`, `tool_result`, and `agent_settled` in `.pi/killeros-hooks.json`. KillerOS also loads `AGENTS.local.md` for trusted projects. Review these files before granting trust.
|
|
97
191
|
|
|
98
|
-
|
|
192
|
+
### Supported modes and navigation
|
|
99
193
|
|
|
100
|
-
|
|
194
|
+
Pi defaults to fullscreen. Use `--tui-mode regular` for one invocation or set `"tuiMode": "regular"` in [Pi settings](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/settings.md#terminal-and-display) to restore terminal-owned scrollback. KillerOS leaves Pi's `tuiMode` and `quietStartup` preferences unchanged.
|
|
101
195
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
196
|
+
| Mode | Support |
|
|
197
|
+
| --- | --- |
|
|
198
|
+
| TUI | Custom UI, questions, goals, proactive compaction, sounds, and title indicator |
|
|
199
|
+
| RPC | Goals and proactive compaction, without TUI components, sounds, or title indicator |
|
|
200
|
+
| Print or JSON | No interactive questions, `/goal`, or proactive compaction |
|
|
105
201
|
|
|
106
|
-
|
|
202
|
+
With Pi's default [keybindings](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/keybindings.md#fullscreen), `Home` and `End` move within the current editor line. In fullscreen mode, `Ctrl+Home` and `Ctrl+End` scroll to the transcript's beginning or end without moving the editor cursor. KillerOS inherits these bindings and preserves user overrides.
|
|
107
203
|
|
|
108
|
-
|
|
109
|
-
/goal Fix `killeros/footer.ts`, verified by npm test
|
|
110
|
-
```
|
|
204
|
+
Pi 1.1.0 reports program status through OSC 7501 in supported terminals. Each question step reports `blocked` and restores the previous status after an answer, cancellation, or abort. Native confirmation dialogs do the same. `PI_PROGRAM_STATUS=1` forces reporting and `PI_PROGRAM_STATUS=0` disables it. KillerOS preserves the preference and uses Pi's native reporting. See [program status](https://github.com/earendil-works/pi/blob/v1.1.0/packages/coding-agent/docs/terminal-setup.md#program-status).
|
|
111
205
|
|
|
112
|
-
|
|
206
|
+
### Tool selection and codemode
|
|
113
207
|
|
|
114
|
-
|
|
208
|
+
`question` and the active `killeros_goal_update` tool are sequential and use Pi's `model-only` exposure. Pi declares them directly to the model with codemode disabled or enabled in `on` or `only` mode. Scripts and other tools cannot call them through `ctx.executeTool()`.
|
|
115
209
|
|
|
116
|
-
|
|
210
|
+
The goal tool is active for active goals. During a later ordinary request, it can also be active for completion only of the same saved blocked goal. It is inactive outside those cases. A direct RPC question call fails with `The question tool requires interactive TUI mode`. KillerOS does not enable or configure codemode.
|
|
117
211
|
|
|
118
|
-
|
|
212
|
+
Pi's native `--tools` and `--exclude-tools` support `*` patterns. Quote patterns such as `"killeros_*"` so the shell does not expand them. An explicit allowlist must include `question` for interactive questions and permit `killeros_goal_update` for goals. Tool selection does not make questions usable outside TUI mode.
|
|
119
213
|
|
|
120
|
-
|
|
214
|
+
Excluding the goal tool pauses goals that are active before any model request. A later ordinary request with a blocked goal still runs, but cannot record completion if the tool is excluded. See [Pi tool selection](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/cli.md#tools).
|
|
121
215
|
|
|
122
|
-
|
|
216
|
+
Pi 1.1.0 accepts lists containing only exact `+name` and `-name` entries to change the default selection:
|
|
123
217
|
|
|
124
|
-
|
|
218
|
+
```bash
|
|
219
|
+
pi --tools +codemode
|
|
220
|
+
pi --tools +codemode,-write
|
|
221
|
+
```
|
|
125
222
|
|
|
126
|
-
|
|
223
|
+
Plain allowlists replace the selection. Pi rejects mixed lists such as `read,+codemode` and modifier patterns such as `-killeros_*`. Use `--exclude-tools "killeros_*"` for wildcard exclusions.
|
|
127
224
|
|
|
128
|
-
|
|
225
|
+
On Pi 1.1.0, a `-name` modifier does not reliably prevent an extension tool from activating on registration or reload. To exclude the goal tool, use:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
pi --exclude-tools killeros_goal_update
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
KillerOS delegates selection to Pi. It does not parse or repair native CLI filters.
|
|
232
|
+
|
|
233
|
+
In Pi codemode, `tools.read()` on an image returns an image block that you can pass to native `image()`. See [codemode tool calls](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/codemode.md#call-tools).
|
|
234
|
+
|
|
235
|
+
Pi's `image()` also saves images to temporary files and returns their paths for later turns to copy or move. On POSIX systems, Pi creates these files with user-only permissions. Windows access follows inherited filesystem ACLs. See [image generation](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/codemode.md#generate-images).
|
|
236
|
+
|
|
237
|
+
### Reasoning, sampling, and Azure
|
|
238
|
+
|
|
239
|
+
Use Pi's native `/thinking` selector for reasoning levels. Pi supports per-level sampling through `samplingParamsByThinkingLevel` in `models.json`. A model entry can contain:
|
|
129
240
|
|
|
130
241
|
```json
|
|
131
242
|
{
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
243
|
+
"samplingParams": { "temperature": 1.0, "top_p": 0.95 },
|
|
244
|
+
"samplingParamsByThinkingLevel": {
|
|
245
|
+
"off": { "temperature": 0.7, "top_p": 0.8 },
|
|
246
|
+
"high": { "temperature": 0.6 }
|
|
247
|
+
}
|
|
137
248
|
}
|
|
138
249
|
```
|
|
139
250
|
|
|
140
|
-
|
|
251
|
+
Configure only parameters your endpoint accepts. These settings apply to `openai-completions`, `openai-responses`, and `azure-openai-responses`, not legacy `openai-codex`. Missing levels inherit model defaults. Request-level sampling parameters take precedence. `/codex-fast` preserves sampling when it adds the priority tier. See [sampling configuration](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/models.md#configure-sampling-by-thinking-level) for the full format and merge rules.
|
|
252
|
+
|
|
253
|
+
Pi's Azure provider is `azure`. It supports Azure Foundry Chat Completions, including `azure/deepseek-v4-pro`. If you still use the old `azure-openai-responses` provider key:
|
|
254
|
+
|
|
255
|
+
1. Rename it to `azure` in `auth.json`, or run `/login azure` again.
|
|
256
|
+
2. Apply the same rename in `models.json`.
|
|
257
|
+
3. Update `defaultProvider`, `enabledModels` patterns, and `modelThinkingLevels` keys in `settings.json`.
|
|
258
|
+
|
|
259
|
+
The Responses API identifier remains `azure-openai-responses`. Foundry Chat Completions uses `openai-completions`. The `AZURE_OPENAI_*` environment variables are unchanged. Old Azure sessions fall back to another model on resume and lose prompt-cache reuse. KillerOS does not migrate credentials or Pi settings. See [Azure configuration](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/providers.md#azure-openai).
|
|
260
|
+
|
|
261
|
+
### MCP settings
|
|
262
|
+
|
|
263
|
+
Use Pi's `/mcp` command and `.pi/mcp.json` to enable, disable, or change the exposure of a user-level MCP server for a trusted project without copying credentials. KillerOS does not manage MCP configuration. See [project MCP overrides](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/mcp.md#configure-servers).
|
|
264
|
+
|
|
265
|
+
In Pi, a nonempty `--tools` list with no `mcp__` entry preserves MCP tool availability according to server exposure. For example, `--tools codemode` does not disable MCP connections or remove their tools. Use `--no-mcp` to disable MCP connections through Pi's built-in support for one run. Explicit MCP selection and exclusion remain Pi's responsibility. See [MCP tool exposure](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/mcp.md#control-tool-exposure).
|
|
266
|
+
|
|
267
|
+
## Set up for development
|
|
268
|
+
|
|
269
|
+
Clone the repository and install its pinned development dependencies:
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
git clone https://github.com/KyrosHendrix/pi-KillerOS.git
|
|
273
|
+
cd pi-KillerOS
|
|
274
|
+
npm ci --ignore-scripts --no-audit --no-fund
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
Run the local package for one Pi invocation:
|
|
141
278
|
|
|
142
|
-
|
|
279
|
+
```bash
|
|
280
|
+
npx pi -e .
|
|
281
|
+
```
|
|
143
282
|
|
|
144
|
-
|
|
283
|
+
Disable any installed copy of KillerOS for that invocation to avoid loading it alongside the checkout. Restart Pi or use `/reload` after edits.
|
|
145
284
|
|
|
146
|
-
|
|
285
|
+
There is no build step. The project uses strict TypeScript, and Node's built-in test runner executes the `.ts` tests directly:
|
|
147
286
|
|
|
148
|
-
|
|
287
|
+
```bash
|
|
288
|
+
npm run check
|
|
289
|
+
npm test
|
|
290
|
+
```
|
|
149
291
|
|
|
150
|
-
|
|
292
|
+
`check` runs TypeScript without emitting files, then ESLint. For README or changelog-only changes, run the repository contracts:
|
|
151
293
|
|
|
152
|
-
|
|
294
|
+
```bash
|
|
295
|
+
node --test --test-force-exit --experimental-strip-types test/RepositoryContracts.test.ts
|
|
296
|
+
```
|
|
153
297
|
|
|
154
|
-
|
|
298
|
+
The default suite is authoritative. To run the installed CLI and native-terminal scenarios without forced exit:
|
|
155
299
|
|
|
156
300
|
```bash
|
|
157
|
-
|
|
301
|
+
node --test --experimental-strip-types --test-name-pattern="installed Pi CLI|installed Pi terminal|terminal driver reports|RPC driver controls" test/PiExtensionContract.test.ts test/PiTerminalControls.test.ts test/PiRpcControls.test.ts
|
|
158
302
|
```
|
|
159
303
|
|
|
304
|
+
Development dependencies pin Pi 1.1.0. CI checks the Node.js floor, current LTS, Windows, and the minimum and latest compatible Pi releases. Compatibility installs leave the tracked manifest and lockfile unchanged. Required jobs repeat installed CLI and terminal pilots five times without forced exit. The latest-Pi job also repeats cancellation lifecycle checks five times. Each job runs the full default suite once.
|
|
305
|
+
|
|
306
|
+
## Contribution and release expectations
|
|
307
|
+
|
|
308
|
+
Run `npm run check` and `npm test` before submitting code changes. Changes to commands, configuration, requirements, or mode behavior also need README updates. Record completed changes to shipped behavior, supported workflows, public documentation, or build, test, and release guarantees under `[Unreleased]` in [CHANGELOG.md](CHANGELOG.md). Do not bump the version unless preparing a release.
|
|
309
|
+
|
|
160
310
|
### Release process
|
|
161
311
|
|
|
162
|
-
1. Prepare the release on `dev
|
|
163
|
-
2. Run `npm run check` and `npm test
|
|
164
|
-
3. Wait for every required check
|
|
165
|
-
4. Merge
|
|
166
|
-
5. Check the `main` CI run and the following Release run. Successful CI on the current `main` commit triggers npm publication with provenance, creates the GitHub release, and fast-forwards `dev` to the released commit. A green PR alone
|
|
312
|
+
1. Prepare the release on `dev`. Update `package.json` and both root versions in `package-lock.json`. Update this README's pinned release examples. Move completed changelog entries into a dated version section below `[Unreleased]`.
|
|
313
|
+
2. Run `npm run check` and `npm test`. Commit and push to `dev`, then open a pull request into `main`. Push later fixes to the same PR so CI reruns.
|
|
314
|
+
3. Wait for every required check, including CodeQL and dependency review. Resolve review conversations and bring the PR up to date with `main`.
|
|
315
|
+
4. Merge with **Create a merge commit**. Squash and rebase merging are disabled because the automated `main`-to-`dev` sync requires shared ancestry. Do not advance `dev` until the sync finishes.
|
|
316
|
+
5. Check the `main` CI run and the following Release run. Successful CI on the current `main` commit triggers npm publication with provenance, creates the GitHub release, and fast-forwards `dev` to the released commit. A green PR alone does not publish.
|
|
317
|
+
|
|
318
|
+
Releases go through CI on `main`; do not push version tags manually. `main` requires pull requests and required CI checks, including for administrators. Force pushes and branch deletion are blocked.
|
|
319
|
+
|
|
320
|
+
The release workflow publishes the source directory with `npm publish . --ignore-scripts=false`. At that boundary, `prepublishOnly` invokes the release validator once, even if an inherited npm setting disables scripts. Validation failure stops publication and release creation. The workflow also checks the verified commit, provenance, version, tag, and release notes.
|
|
321
|
+
|
|
322
|
+
The prepublish guard rejects ordinary direct publication, but does not prove GitHub authorization. Disabling scripts or publishing a tarball bypasses it. Configure npm's trusted publisher for `release.yml`, require two-factor authentication and disallow tokens in package publishing access, and revoke unused publish tokens. Maintainers can still publish interactively with 2FA, so workflow-only publication also depends on maintainer policy.
|
|
323
|
+
|
|
324
|
+
### Required-check maintenance
|
|
325
|
+
|
|
326
|
+
Pi compatibility checks have stable names, `Pi compatibility (minimum)` and `Pi compatibility (latest)`, independent of tested versions. When adopting those names, confirm both passed on the release PR's exact head commit. Replace only the old versioned Pi requirements. Preserve their GitHub Actions app bindings and every other protection.
|
|
327
|
+
|
|
328
|
+
`Quality (Node 22.19.0)` validates release metadata before the full suite and tests the publication lifecycle with the release workflow's pinned npm CLI in an isolated installation. The packed-package Pi test checks the archive's entry point, README, changelog, theme, package name, and current version before activation and reload. Those assertions run across the Node, Windows, and Pi compatibility matrix.
|
|
167
329
|
|
|
168
|
-
`
|
|
330
|
+
`Package smoke test` remains during the required-check migration. Before removing its requirement:
|
|
169
331
|
|
|
170
|
-
|
|
332
|
+
1. Land the replacement coverage and confirm it exists on `main`.
|
|
333
|
+
2. Confirm the Node-floor quality check passed on the replacement PR's exact head commit.
|
|
334
|
+
3. Inspect live branch protection and rulesets, and obtain approval.
|
|
335
|
+
4. Remove only the smoke requirement. Preserve the required quality check's GitHub Actions binding and all other protections.
|
|
336
|
+
5. Remove the job in a follow-up PR and recheck that PR's final head.
|
|
171
337
|
|
|
172
|
-
|
|
338
|
+
Keep the job if those prerequisites are unmet.
|
|
173
339
|
|
|
174
|
-
|
|
340
|
+
## Known issues and limits
|
|
175
341
|
|
|
176
|
-
|
|
342
|
+
- The RPC pilot reproduces a native shutdown crash on Windows Node 24.19.0 with Pi 1.1.0. That exact combination is skipped, not certified. Use Node 22.19.0 on Windows to run the pilot. Terminal pilots and cleanup controls still run on both Node versions.
|
|
343
|
+
- Pi 1.1.0's `-name` tool modifiers do not reliably exclude extension tools. Use `--exclude-tools`, as described in [Tool selection and codemode](#tool-selection-and-codemode).
|
|
344
|
+
- Passive Git scans treat CRLF text as unchanged when it normalizes to the indexed LF content, including with `text=auto eol=lf` or bare `eol=lf`. After a size-changing rewrite, Git's index stat cache can still make `git status` report a modification even when `git diff` is empty.
|
|
345
|
+
- Questions require TUI mode. Print and JSON modes do not support goals or proactive compaction. See [Supported modes and navigation](#supported-modes-and-navigation).
|
|
177
346
|
|
|
178
|
-
|
|
347
|
+
Report bugs through the [issue tracker](https://github.com/KyrosHendrix/pi-KillerOS/issues). Check the [changelog](CHANGELOG.md) for release-specific changes.
|
|
179
348
|
|
|
180
349
|
## Security
|
|
181
350
|
|
|
182
|
-
|
|
351
|
+
KillerOS hooks run only in projects Pi marks as trusted. Check `.pi/killeros-hooks.json` before granting trust. KillerOS accepts hook configuration only as a regular, non-linked file of at most 64 KiB in the project's real `.pi` directory.
|
|
183
352
|
|
|
184
|
-
On POSIX systems, timed-out or cancelled hooks receive `SIGTERM`,
|
|
353
|
+
On POSIX systems, timed-out or cancelled hooks receive `SIGTERM`, then `SIGKILL` if cleanup remains pending. Shell exit alone does not confirm that the original process group stopped. Cleanup has a two-second window and reports uncertainty if it cannot confirm group exit.
|
|
185
354
|
|
|
186
|
-
Handoff validation rejects recognized credential assignments in plain text, Markdown lists, bold labels, and inline-code labels before creating a destination session. This pattern check cannot detect every secret or personally identifying value.
|
|
355
|
+
Handoff validation rejects recognized credential assignments in plain text, Markdown lists, bold labels, and inline-code labels before creating a destination session. Rejected values do not appear in the error notification. This pattern check cannot detect every secret or personally identifying value. Review context before carrying it into another session.
|
|
187
356
|
|
|
188
357
|
## License
|
|
189
358
|
|