killeros 1.5.8 → 2.0.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 +17 -130
- package/Killeros.ts +1 -25
- package/README.md +130 -209
- package/killeros/bounded-text.ts +25 -0
- package/killeros/commands.ts +8 -238
- package/killeros/display.ts +6 -2
- package/killeros/footer.ts +35 -5
- package/killeros/goals.ts +53 -25
- package/killeros/hooks.ts +1 -1
- package/killeros/limits.ts +1 -0
- package/killeros/personal-instructions.ts +3 -1
- package/killeros/question.ts +144 -97
- package/killeros/shell-ui.ts +230 -54
- package/killeros/variants.ts +6 -2
- package/package.json +1 -6
- package/themes/killeros.json +4 -3
- package/killeros/subagent-lifecycle.ts +0 -761
- package/killeros/subagent-persistence.ts +0 -572
- package/killeros/subagent-process.ts +0 -626
- package/killeros/subagent-ui.ts +0 -245
- package/killeros/subagents.ts +0 -3257
- package/subagent-lifecycle.ts +0 -1
- package/subagent-process.ts +0 -1
- package/subagent-ui.ts +0 -1
- package/subagents.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,81 +4,54 @@ All notable changes to KillerOS are documented here.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
-
## [
|
|
7
|
+
## [2.0.1] - 2026-08-08
|
|
8
8
|
|
|
9
|
-
###
|
|
9
|
+
### Added
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
- Preserved bounded role contracts for child threads written by KillerOS 1.5.7, so saved read and write roles can resume after the bundled role files are removed.
|
|
11
|
+
- Added a height-bounded question viewport with configured Pi controls, progress labels, and compact expandable history.
|
|
12
|
+
- Added an interactive `/goal` status and actions panel in TUI mode.
|
|
13
|
+
- Added live command-blue highlighting for recognized slash command prefixes in the prompt editor.
|
|
15
14
|
|
|
16
|
-
###
|
|
15
|
+
### Changed
|
|
17
16
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
- Reported goal start, resume, and edit success only after continuation dispatch succeeded, and paused the goal when dispatch failed.
|
|
22
|
-
- Rechecked project trust and approval when resuming a persisted project role.
|
|
23
|
-
- Removed terminal role metadata when closed threads leave bounded retention.
|
|
17
|
+
- Made reasoning colors contrast-safe, moved commands and links to the themed command-blue role, and changed activity to a static Spark with shuffled 2.5-second verb updates.
|
|
18
|
+
- Reserved footer goal status for active, paused, and blocked work; completed goals remain in history and `/goal` status.
|
|
19
|
+
- Made startup Git lookup asynchronous, cached footer session cost between content changes, and aligned the browser visual reference with v2.0.1 runtime behavior.
|
|
24
20
|
|
|
25
|
-
## [
|
|
21
|
+
## [2.0.0] - 2026-08-07
|
|
26
22
|
|
|
27
|
-
###
|
|
23
|
+
### Changed
|
|
28
24
|
|
|
29
|
-
-
|
|
30
|
-
- Kept in-flight model retries labeled `Running`, exposed requested stops as terminal at once, and kept failed or limited children out of the **Active** list.
|
|
31
|
-
- Replaced the frozen queued spawn result with a static launch receipt so only the separate live widget claims current state and usage.
|
|
25
|
+
- Focused the package, runtime, tests, and documentation on KillerOS's current TUI, repository initialization, long-running goals, reasoning controls, interactive questions, command aliases, and concise-response guidance.
|
|
32
26
|
|
|
33
|
-
## [1.5.
|
|
27
|
+
## [1.5.8] - 2026-08-07
|
|
34
28
|
|
|
35
29
|
### Fixed
|
|
36
30
|
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
- Clarified and tested the shared `message` field limits: 20,000 characters for a spawn task alias and 4,000 characters for steering.
|
|
31
|
+
- Bounded question filter input to 4,000 characters and 16,000 UTF-8 bytes, with a clear rejection notice for excess input.
|
|
32
|
+
- Reported goal start, resume, and edit success only after continuation dispatch succeeded, and paused the goal when dispatch failed.
|
|
40
33
|
|
|
41
34
|
## [1.5.5] - 2026-08-05
|
|
42
35
|
|
|
43
|
-
### Added
|
|
44
|
-
|
|
45
|
-
- Added live background subagent progress with queued, running, and completed states plus per-child and batch usage.
|
|
46
|
-
- Added inline subagent roles for single, parallel, and chain spawns, bounded their tools to those active for the parent, and kept them scoped to one non-resumable spawn.
|
|
47
|
-
- Added `message` as a single-spawn task alias and visible fallback to `worker` for unknown named roles.
|
|
48
|
-
|
|
49
36
|
### Changed
|
|
50
37
|
|
|
51
38
|
- Replaced default deterministic context compaction with model-backed summaries at 40% remaining context, preserved manual focus prompts, and disclosed deterministic fallback after model retries fail.
|
|
52
39
|
|
|
53
40
|
### Fixed
|
|
54
41
|
|
|
55
|
-
- Warned when a settled or failed background subagent handoff cannot reach the parent and pointed users to `list` and `collect` for recovery.
|
|
56
42
|
- Overrode vulnerable transitive `brace-expansion` and `undici` versions with patched releases in the development and CI install tree.
|
|
57
43
|
|
|
58
44
|
## [1.5.4] - 2026-08-04
|
|
59
45
|
|
|
60
|
-
### Added
|
|
61
|
-
|
|
62
|
-
- Added named child sessions with `wait` and `resume`, persisted lifecycle records, real `/subagents` controls, empty-response failure, a 30-minute default wall time, bounded process-exit cleanup, and serialized shared-worktree writers.
|
|
63
|
-
|
|
64
46
|
### Fixed
|
|
65
47
|
|
|
66
48
|
- Added guarded automatic context compaction at 30% remaining, with structured summaries and goal continuation after the compaction is saved.
|
|
67
|
-
- Kept the parent-facing cancellation reason when a steer was already in flight: aborting the parent turn after a steer now reports `abort` on the settled thread and result and no longer triggers a replacement follow-up turn for the cancelled batch.
|
|
68
|
-
- Isolated host update callbacks in child-process and tool telemetry paths so a throwing callback cannot crash the host, strand the result promise, or fail a settled batch.
|
|
69
|
-
- Rejected steering explicitly once 20 messages are pending for a thread instead of silently dropping the oldest steers; task-size overflow is also rejected before mutation, and bounded steering history keeps the earliest messages.
|
|
70
|
-
- `interrupt all` now also stops queued children of the batch, matching `interrupt` on one thread and parent-turn abort, so queued writers cannot run after a stop command.
|
|
71
|
-
- Recreated the subagent thread registry on `session_start`, stopped old children, and fenced old callbacks so embedding hosts that keep the extension instance between sessions can still spawn children without stale follow-ups.
|
|
72
49
|
|
|
73
50
|
## [1.5.3] - 2026-08-03
|
|
74
51
|
|
|
75
52
|
### Fixed
|
|
76
53
|
|
|
77
|
-
-
|
|
78
|
-
- Ignored provider-generated `threadId` values during spawn argument preparation and TUI rendering while retaining strict action validation during execution.
|
|
79
|
-
- Connected Pi's parent cancellation signal to active child processes so Escape stops the subagent, suppresses replacement follow-up turns, and returns control to the terminal.
|
|
80
|
-
- Made `/exit` abort an active run before requesting Pi's graceful shutdown, and made session teardown await bounded background-child settlement.
|
|
81
|
-
- Corrected the README cancellation contract so it matches active-child termination.
|
|
54
|
+
- Made `/exit` abort an active run before requesting Pi's graceful shutdown.
|
|
82
55
|
|
|
83
56
|
## [1.5.2] - 2026-08-03
|
|
84
57
|
|
|
@@ -86,10 +59,6 @@ All notable changes to KillerOS are documented here.
|
|
|
86
59
|
|
|
87
60
|
- Hardened always-on concise guidance around low-friction action, visible multi-turn state, evidence-backed outcomes, material ambiguity, diagnostic resets, and explicit safety and correctness precedence.
|
|
88
61
|
|
|
89
|
-
### Fixed
|
|
90
|
-
|
|
91
|
-
- Resolved bundled subagent role discovery from the package `agents/` directory; the module-relative path broke when subagent modules moved under `killeros/` in v1.5.0, leaving fresh installs with `Unknown subagent "<role>". Available: none`.
|
|
92
|
-
|
|
93
62
|
## [1.5.1] - 2026-08-03
|
|
94
63
|
|
|
95
64
|
### Changed
|
|
@@ -98,8 +67,6 @@ All notable changes to KillerOS are documented here.
|
|
|
98
67
|
|
|
99
68
|
### Fixed
|
|
100
69
|
|
|
101
|
-
- Replaced the `subagent` tool's top-level union with a provider-compatible object schema, fixing request rejection by Console Go and other providers that require function schemas with `type: "object"`.
|
|
102
|
-
- Kept strict action-specific subagent validation at runtime, including single, parallel, chain, steering, interruption, collection, and closure requests.
|
|
103
70
|
- Scoped native concise settings to supported Responses APIs while leaving completion and unrelated provider payloads unchanged.
|
|
104
71
|
|
|
105
72
|
## [1.5.0] - 2026-08-03
|
|
@@ -107,99 +74,19 @@ All notable changes to KillerOS are documented here.
|
|
|
107
74
|
### Changed
|
|
108
75
|
|
|
109
76
|
- Split the main extension into feature modules under `killeros/` while keeping `Killeros.ts` as the stable entry point.
|
|
110
|
-
- Moved subagent modules under `killeros/` and kept root re-export files for existing deep imports.
|
|
111
|
-
|
|
112
|
-
### Fixed
|
|
113
|
-
|
|
114
|
-
- Hardened the subagent schema and runtime checks with action-specific request shapes.
|
|
115
|
-
- Invalid fields now fail before role discovery, project confirmation, thread creation, or child launch.
|
|
116
|
-
- The TUI no longer shows parallel schedules for malformed subagent requests.
|
|
117
|
-
- Kept valid single, parallel, chain, lifecycle, steering, interruption, collection, and closure behavior unchanged.
|
|
118
77
|
|
|
119
78
|
## [1.4.9] - 2026-08-02
|
|
120
79
|
|
|
121
80
|
### Changed
|
|
122
81
|
|
|
123
|
-
-
|
|
124
|
-
- Added an 8 MiB ceiling for one child JSONL record, bounded thread retention with inspectable tombstones, and scoped atomic `/init` reads and writes.
|
|
125
|
-
|
|
126
|
-
## [1.4.7] - 2026-08-01
|
|
127
|
-
|
|
128
|
-
### Fixed
|
|
129
|
-
|
|
130
|
-
- Serialized every write-capable task in a parallel batch in input order instead of rejecting batches with multiple writers.
|
|
131
|
-
- Added opt-in `writerConcurrency` scheduling for independent batches while keeping serialization as the safe default and documenting shared-worktree conflict responsibility.
|
|
132
|
-
- Parent tool-call aborts now settle only queued tasks; active children finish naturally, and session directories remain until child exit is confirmed.
|
|
133
|
-
- Settled queued tasks on interrupted parallel batches and documented the shared-worktree execution model.
|
|
134
|
-
- Restricted the `message` parameter to `action: "steer"` and added focused regression coverage.
|
|
135
|
-
|
|
136
|
-
## [1.4.6] - 2026-08-01
|
|
137
|
-
|
|
138
|
-
### Fixed
|
|
139
|
-
|
|
140
|
-
- Made the registered task schema use the same ten-task limit as runtime validation.
|
|
141
|
-
- Kept one isolated Pi session ID and session directory across steering restarts so a child retains its conversation.
|
|
142
|
-
- Bound retained trace, stderr, and returned text, and spooled large JSONL lines to temporary storage without stopping the child or reporting a retention cutoff as `limited`.
|
|
143
|
-
- Kept explicit embedding resource guards and user stops visible as terminal states.
|
|
144
|
-
|
|
145
|
-
## [1.4.5] - 2026-08-01
|
|
146
|
-
|
|
147
|
-
### Fixed
|
|
148
|
-
|
|
149
|
-
- Removed the child-budget extension, its read-tool budget, and the default 250,000-token/$5 quota.
|
|
150
|
-
- Removed default child wall-time, trace, stderr, returned-output, and model-output-length stops; role `timeoutMs` and other child guards are opt-in, while the parser retains a finite JSONL-record ceiling.
|
|
151
|
-
- Removed forced early-report prompt text so roles can finish their assigned work naturally.
|
|
152
|
-
- Treat model stop reason `length` as a completed child process instead of inventing a KillerOS `limited` result.
|
|
153
|
-
- Documented the child lifecycle contract: children complete naturally; explicit user interruptions, configured guards, and real child-process failures remain visible.
|
|
154
|
-
|
|
155
|
-
## [1.4.3] - 2026-08-01
|
|
156
|
-
|
|
157
|
-
### Fixed
|
|
158
|
-
|
|
159
|
-
- Added child-runtime tool budgets for read-only roles, with a soft finalization nudge and hard blocking for read and web tools after 32 calls.
|
|
160
|
-
- Added bounded child report instructions and kept read-tool budgets cumulative across steering restarts.
|
|
161
|
-
- Lowered the default child quota to 250,000 tokens and $5, and exposed child tool-call counts in results.
|
|
162
|
-
|
|
163
|
-
## [1.4.2] - 2026-08-01
|
|
164
|
-
|
|
165
|
-
### Added
|
|
166
|
-
|
|
167
|
-
- Added named child threads with inspectable lifecycle state, Active/Done views, steering, interruption, collection, and closure controls.
|
|
168
|
-
- Added isolated child-process resource guards for wall time, JSONL lines, retained trace, stderr, output, token quota, cost quota, task count, and concurrency.
|
|
169
|
-
|
|
170
|
-
### Changed
|
|
171
|
-
|
|
172
|
-
- Replaced routine child turn limits with natural completion plus named resource guards.
|
|
173
|
-
- Preserved partial traces and handoffs when a child fails, stops, or reaches a limit.
|
|
82
|
+
- Scoped atomic `/init` reads and writes.
|
|
174
83
|
|
|
175
84
|
## [1.4.1] - 2026-08-01
|
|
176
85
|
|
|
177
|
-
### Added
|
|
178
|
-
|
|
179
|
-
- Added per-invocation child model selection and separate thinking-effort controls, with visible `inherit` placeholders in every bundled role.
|
|
180
|
-
- Added focused `debugger`, `documenter`, `security`, and `tester` roles with explicit access boundaries, skill discovery, and web research guidance.
|
|
181
|
-
- Added child web research through the separately installed `pi-web-access` package and exposed search, source-check, fetch, and stored-content tools to every bundled role.
|
|
182
|
-
|
|
183
|
-
### Fixed
|
|
184
|
-
|
|
185
|
-
- Made child timeout and forced-termination fallbacks settle even when no other event-loop handles remain.
|
|
186
|
-
- Kept streamed child thinking within the retained trace budget without terminating successful invocations.
|
|
187
|
-
- Preserved model IDs containing colons and validated thinking levels through Pi's model capabilities, including models that do not support `off`.
|
|
188
|
-
- Bounded unterminated JSONL lines while preserving fragmented UTF-8 handling.
|
|
189
|
-
|
|
190
86
|
### Changed
|
|
191
87
|
|
|
192
|
-
- Expanded the bundled role roster while keeping read-only auditors separate from write-capable implementation roles.
|
|
193
88
|
- Hardened CI with Node floor/LTS checks, locked-dependency auditing, dependency review, package-content validation, and CodeQL analysis.
|
|
194
89
|
|
|
195
|
-
## [1.4.0] - 2026-08-01
|
|
196
|
-
|
|
197
|
-
### Added
|
|
198
|
-
|
|
199
|
-
- Pi-native `subagent` tool with isolated JSONL child processes, single/parallel/chain modes, streamed TUI status, aggregate usage, and abort propagation.
|
|
200
|
-
- Bundled Markdown roles for read-only scouting, planning, and review plus one serialized write-capable worker.
|
|
201
|
-
- Strict role, tool, model, trust, precedence, concurrency, turn, timeout, trace, stderr, and output enforcement.
|
|
202
|
-
|
|
203
90
|
## [1.3.0] - 2026-07-31
|
|
204
91
|
|
|
205
92
|
### Added
|
package/Killeros.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
createSubagentControlApi,
|
|
5
|
-
registerAliases,
|
|
6
|
-
registerSlashAutocomplete,
|
|
7
|
-
registerSubagentCommand,
|
|
8
|
-
type SubagentControlApi,
|
|
9
|
-
type SubagentToolLike,
|
|
10
|
-
} from "./killeros/commands.ts";
|
|
2
|
+
import { registerAliases, registerSlashAutocomplete } from "./killeros/commands.ts";
|
|
11
3
|
import { registerConcisePrompt } from "./killeros/concise.ts";
|
|
12
4
|
import { registerContextCompaction } from "./killeros/context-compaction.ts";
|
|
13
5
|
import { registerFooter } from "./killeros/footer.ts";
|
|
@@ -35,22 +27,6 @@ export default function Killeros(pi: ExtensionAPI): void {
|
|
|
35
27
|
registerGoal(pi, goalRuntime, initRuntime);
|
|
36
28
|
registerPersonalInstructions(pi, initRuntime);
|
|
37
29
|
registerQuestionTool(pi);
|
|
38
|
-
let subagentTool: SubagentToolLike | undefined;
|
|
39
|
-
const registrationPi = new Proxy(pi, {
|
|
40
|
-
get(target, property, receiver) {
|
|
41
|
-
if (property === "registerTool") {
|
|
42
|
-
return (tool: Parameters<ExtensionAPI["registerTool"]>[0]) => {
|
|
43
|
-
if (tool.name === "subagent") subagentTool = tool as unknown as SubagentToolLike;
|
|
44
|
-
return target.registerTool(tool);
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
return Reflect.get(target, property, receiver);
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
const subagents = registerSubagentTool(registrationPi);
|
|
51
|
-
const subagentControl = (subagents as unknown as SubagentControlApi | undefined)
|
|
52
|
-
?? (subagentTool ? createSubagentControlApi(subagentTool) : undefined);
|
|
53
|
-
registerSubagentCommand(pi, subagentControl);
|
|
54
30
|
registerAliases(pi);
|
|
55
31
|
registerSlashAutocomplete(pi);
|
|
56
32
|
registerFooter(pi, goalRuntime);
|
package/README.md
CHANGED
|
@@ -1,209 +1,130 @@
|
|
|
1
|
-
# KillerOS
|
|
2
|
-
|
|
3
|
-
A production-hardened Pi extension that combines a custom TUI,
|
|
4
|
-
|
|
5
|
-
## Requirements
|
|
6
|
-
|
|
7
|
-
- Node.js `22.19.0` or later
|
|
8
|
-
- Pi `0.82.1` or later
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
- `/
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
/
|
|
62
|
-
/goal
|
|
63
|
-
/goal
|
|
64
|
-
/goal
|
|
65
|
-
/
|
|
66
|
-
/
|
|
67
|
-
/
|
|
68
|
-
/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
KillerOS
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
/
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
Bare `/subagents` opens TUI selectors. RPC, JSON, and print modes require an explicit verb and never open a UI prompt.
|
|
133
|
-
|
|
134
|
-
### Thread lifecycle
|
|
135
|
-
|
|
136
|
-
Each delegated task creates a named child thread. Its contract records the parent ID, child ID, selected generic or custom role, prompt, model, requested capability boundary, trace, usage, and result state. The selected role defines the child’s access and tools; it does not own lifecycle controls or grant new filesystem powers. The parent owns scope, waits, inspection, steering, collection, and closure.
|
|
137
|
-
|
|
138
|
-
Threads move through `queued`, `active`, `done`, `failed`, `stopped`, `orphaned`, and `closed`. The parent renders separate **Active** and **Done** lists. Active threads show their name, task, model, usage, and direct controls. Done threads keep their handoff and trace available until the parent closes them.
|
|
139
|
-
|
|
140
|
-
The parent can inspect a thread’s prompt, role, model, tools, trace, usage, and handoff; wait for one named or ID child or all queued and active children; steer an active or queued thread with a bounded follow-up (at most 20 pending messages; further steering is rejected explicitly until the child restarts or drains the queue); interrupt one child or all active and queued children; collect a concise handoff into parent context; resume a terminal or orphaned child; and close a finished, stopped, or orphaned thread. An interrupt preserves the partial trace, states the reason, and reports the handoff as partial rather than successful. Closing removes a thread from the active workspace; heavy trace and result payloads are evicted as needed under the bounded retention budget, leaving a small inspectable tombstone.
|
|
141
|
-
|
|
142
|
-
A child completes only when it returns usable final assistant text. The default child limits are 64 turns, 2,000,000 reported tokens, and 30 minutes; dollar quotas remain opt-in, and every JSONL record has an 8 MiB parser ceiling. Explicit embedding options can adjust those limits or add output, trace, stderr, JSONL, or cost guards; each guard reports its cause and returns partial work clearly. The parent still bounds task count, reader concurrency, role files, task input, and combined parent output. Aborting the originating parent turn settles queued work as cancelled and terminates active children; explicit `interrupt` actions and real child-process failures remain visible. Session shutdown also terminates active children and waits up to 10 seconds for confirmed process exit.
|
|
143
|
-
|
|
144
|
-
The replacement lifecycle has nine phases:
|
|
145
|
-
|
|
146
|
-
1. **Dispatch:** create a named thread and store its contract before launch.
|
|
147
|
-
2. **Track:** maintain lifecycle states and Active/Done visibility.
|
|
148
|
-
3. **Inspect:** keep the trace in the child thread, not the parent context.
|
|
149
|
-
4. **Steer:** append a bounded parent follow-up to an active or queued thread.
|
|
150
|
-
5. **Interrupt:** stop one or all active or queued children while preserving partial work.
|
|
151
|
-
6. **Collect:** return a concise handoff while retaining the expanded trace.
|
|
152
|
-
7. **Guard:** stop at the default turn, token, or wall-time limit and honor explicit resource-limit overrides.
|
|
153
|
-
8. **Close:** remove a finished or stopped thread from the workspace while retaining a small inspectable tombstone; heavy payloads may be evicted under the retention budget.
|
|
154
|
-
9. **Prove:** test identity, visibility, controls, natural completion, guards, partial handoffs, bounded retention, and closure.
|
|
155
|
-
|
|
156
|
-
## Configuration
|
|
157
|
-
|
|
158
|
-
KillerOS activates its packaged `killeros` theme when a TUI session starts. Tool-call backgrounds stay neutral across pending, successful, and failed states; restrained text and icons preserve status visibility.
|
|
159
|
-
|
|
160
|
-
KillerOS displays session costs in USD. The footer uses Pi's human-readable model name when available, keeps the provider visually secondary, and renders context as `percent left (tokens)` without a progress bar. When a goal exists, the footer adds its active time or terminal state; at narrow widths, context pressure and goal state take priority.
|
|
161
|
-
|
|
162
|
-
KillerOS checks context after each agent turn. At 40% remaining, it starts Pi's model-backed compaction after the current run settles, so the active turn is not aborted. Manual `/compact` uses the same model path and keeps custom focus instructions. If model compaction is unavailable or exhausts its retries, KillerOS uses the disclosed deterministic fallback and warns that repeated compaction can reduce accuracy.
|
|
163
|
-
|
|
164
|
-
For trusted projects, KillerOS loads `AGENTS.local.md` after Pi's shared repository context. A one-line `@path` or `@~/path` file imports personal guidance from another location.
|
|
165
|
-
|
|
166
|
-
Lifecycle hooks are loaded from `.pi/killeros-hooks.json` at session start. Supported event keys are `tool_call`, `tool_result`, and `agent_settled`; matchers are JavaScript regular expressions over Pi tool names. Hook commands run from the repository root with `KILLEROS_EVENT`, `KILLEROS_TOOL`, and `KILLEROS_PAYLOAD` environment variables. Failed `tool_call` hooks block the tool, while later-event failures notify the user.
|
|
167
|
-
|
|
168
|
-
## Behavior by mode
|
|
169
|
-
|
|
170
|
-
| Mode | Behavior |
|
|
171
|
-
|---|---|
|
|
172
|
-
| TUI | All features are available, including confirmation for trusted project subagents |
|
|
173
|
-
| RPC | Goal set/view/pause/resume/clear, subagents, and concise prompt guidance work; TUI components, `/goal edit`, and `/init` are disabled |
|
|
174
|
-
| Print/JSON | Concise prompt guidance works; interactive questions, `/goal`, `/init`, and project-role confirmation fail explicitly |
|
|
175
|
-
|
|
176
|
-
## Validation
|
|
177
|
-
|
|
178
|
-
Before release, run:
|
|
179
|
-
|
|
180
|
-
```bash
|
|
181
|
-
npm ci
|
|
182
|
-
npm run check
|
|
183
|
-
npm test
|
|
184
|
-
npm pack --dry-run
|
|
185
|
-
pi -ne -e . --mode rpc
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
The package manifest lists Pi’s built-in modules as peer dependencies, so npm does not bundle a second copy.
|
|
189
|
-
|
|
190
|
-
## Publish
|
|
191
|
-
|
|
192
|
-
The [`pi-package`](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/packages.md) keyword makes a published npm release visible in Pi’s package catalog.
|
|
193
|
-
|
|
194
|
-
For a release, publish after the validation checks pass:
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
npm login
|
|
198
|
-
npm publish
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
For later releases, choose `patch`, `minor`, or `major` with `npm version`, then publish and push the version commit and tag.
|
|
202
|
-
|
|
203
|
-
## Security
|
|
204
|
-
|
|
205
|
-
Pi extensions and write-capable subagents run with your user permissions. Review the source before installing it globally. KillerOS executes lifecycle hook commands and reads project agent roles only for projects Pi marks as trusted; review `.pi/killeros-hooks.json` and `.pi/agents/*.md` before enabling project trust.
|
|
206
|
-
|
|
207
|
-
## License
|
|
208
|
-
|
|
209
|
-
[MIT](LICENSE) © 2026 KyrosHendrix
|
|
1
|
+
# KillerOS
|
|
2
|
+
|
|
3
|
+
A production-hardened Pi extension that combines a custom TUI, repository initialization, long-running goals, reasoning controls, interactive questions, command aliases, and concise-response guidance.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Node.js `22.19.0` or later
|
|
8
|
+
- Pi `0.82.1` or later
|
|
9
|
+
- Interactive TUI mode for the custom header, editor, footer, `question` tool, and `/init`
|
|
10
|
+
|
|
11
|
+
The extension is strict TypeScript. Pi provides the runtime modules.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
### npm
|
|
16
|
+
|
|
17
|
+
Install KillerOS:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pi install npm:killeros
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Git
|
|
24
|
+
|
|
25
|
+
Install the latest commit:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pi install git:github.com/KyrosHendrix/pi-KillerOS
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Pin an install to a release:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pi install git:github.com/KyrosHendrix/pi-KillerOS@v2.0.1
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Add `-l` to either command for a project-only install. Restart Pi after installing.
|
|
38
|
+
|
|
39
|
+
## Features
|
|
40
|
+
|
|
41
|
+
- 52-column Compact startup card with inline version, polished model/provider identity, adjacent `/model`, directory, conditional Git branch, and a shuffled session-stable tip
|
|
42
|
+
- Cohesive dark theme with coral accents and neutral tool-call containers across pending, success, and error states
|
|
43
|
+
- Static coral Spark activity indicator with a shuffled Claude-adjacent verb bank that changes every 2.5 seconds during active work, plus a quiet hidden-thinking label
|
|
44
|
+
- Framed multiline editor with Shift+Enter support and live command-blue highlighting for recognized slash command prefixes
|
|
45
|
+
- Responsive footer with polished model/provider identity, plain-language context, and active goal state remaining; reasoning, Git branch, elapsed time, cost, and path cut down by available width
|
|
46
|
+
- Automatic model-backed context compaction at 40% remaining; active goals continue after the saved summary
|
|
47
|
+
- `/variants` selector and direct reasoning-level arguments
|
|
48
|
+
- Codex-style `/goal` with an interactive status/action panel, durable objectives, pause, resume, edit, confirmed panel clearing, automatic continuation, and explicit completion
|
|
49
|
+
- Claude Code-style `/init` that scans the repository and generates a concise root `AGENTS.md` without setup questions
|
|
50
|
+
- `question` tool with height-bounded option windows, configured Pi keybindings, live option/input progress, proposal previews, custom answers, history, cancellation, and compact expandable transcript rendering
|
|
51
|
+
- Mid-prompt slash completion with current Pi `0.82.1` commands, extensions, prompts, and skills; paths, URLs, and invalid commands remain plain text
|
|
52
|
+
- `/clear` for a confirmed new session, plus `/exit` for graceful shutdown
|
|
53
|
+
- Concise system-prompt guidance without modifying completed assistant messages
|
|
54
|
+
|
|
55
|
+
## Commands
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
/init Generate root AGENTS.md from repository evidence
|
|
59
|
+
/goal Open current goal status and valid actions
|
|
60
|
+
/goal <objective> Set an objective and start working
|
|
61
|
+
/goal edit Edit and reactivate the current goal
|
|
62
|
+
/goal pause Stop automatic continuation
|
|
63
|
+
/goal resume Resume automatic continuation
|
|
64
|
+
/goal clear Remove the current goal
|
|
65
|
+
/variants Open the reasoning-level selector
|
|
66
|
+
/variants high Set a reasoning level directly
|
|
67
|
+
/clear Start a new session after confirmation
|
|
68
|
+
/exit Quit Pi gracefully
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`/goal` requires a saved session in TUI or RPC mode. Goal state is stored in versioned session entries on the active branch and restored after reload, resume, fork, or tree navigation. Active goals inject their unchanged objective every turn and continue one settled turn at a time. The model must use KillerOS’s private goal tool to mark verified completion or a blocker repeated across at least three goal turns; final prose alone does not end the loop. Aborted turns, provider failures, and continuation failures pause safely. Replacing unfinished work requires confirmation, and `/goal edit` requires TUI mode.
|
|
72
|
+
|
|
73
|
+
`/init` builds a bounded project map, reads high-value manifests, documentation, and CI configuration, and lets the active model inspect additional implementation files before generating root `AGENTS.md`. Existing `AGENTS.md` and `CLAUDE.md` content is intentionally excluded so stale guidance is not inherited. The command asks no setup questions, starts no second model process, writes only `AGENTS.md`, and reloads Pi resources when finished.
|
|
74
|
+
|
|
75
|
+
Supported reasoning levels are `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, and `max`. KillerOS limits choices to levels supported by the current model.
|
|
76
|
+
|
|
77
|
+
## Configuration
|
|
78
|
+
|
|
79
|
+
KillerOS activates its packaged `killeros` theme when a TUI session starts. Tool-call backgrounds stay neutral across pending, successful, and failed states; restrained text and icons preserve status visibility.
|
|
80
|
+
|
|
81
|
+
KillerOS displays session costs in USD. The footer uses Pi's human-readable model name when available, keeps the provider visually secondary, and renders context as `percent left (tokens)` without a progress bar. Active, paused, and blocked goals remain visible; completed goals remain in transcript history and `/goal` status rather than the footer. At narrow widths, context pressure and actionable goal state take priority.
|
|
82
|
+
|
|
83
|
+
KillerOS checks context after each agent turn. At 40% remaining, it starts Pi's model-backed compaction after the current run settles, so the active turn is not aborted. Manual `/compact` uses the same model path and keeps custom focus instructions. If model compaction is unavailable or exhausts its retries, KillerOS uses the disclosed deterministic fallback and warns that repeated compaction can reduce accuracy.
|
|
84
|
+
|
|
85
|
+
For trusted projects, KillerOS loads `AGENTS.local.md` after Pi's shared repository context. A one-line `@path` or `@~/path` file imports personal guidance from another location.
|
|
86
|
+
|
|
87
|
+
Lifecycle hooks are loaded from `.pi/killeros-hooks.json` at session start. Supported event keys are `tool_call`, `tool_result`, and `agent_settled`; matchers are JavaScript regular expressions over Pi tool names. Hook commands run from the repository root with `KILLEROS_EVENT`, `KILLEROS_TOOL`, and `KILLEROS_PAYLOAD` environment variables. Failed `tool_call` hooks block the tool, while later-event failures notify the user.
|
|
88
|
+
|
|
89
|
+
## Behavior by mode
|
|
90
|
+
|
|
91
|
+
| Mode | Behavior |
|
|
92
|
+
|---|---|
|
|
93
|
+
| TUI | All features are available |
|
|
94
|
+
| RPC | Goal set/view/pause/resume/clear and concise prompt guidance work; TUI components, `/goal edit`, and `/init` are disabled |
|
|
95
|
+
| Print/JSON | Concise prompt guidance works; interactive questions, `/goal`, and `/init` fail explicitly |
|
|
96
|
+
|
|
97
|
+
## Validation
|
|
98
|
+
|
|
99
|
+
Before release, run:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
npm ci
|
|
103
|
+
npm run check
|
|
104
|
+
npm test
|
|
105
|
+
npm pack --dry-run
|
|
106
|
+
pi -ne -e . --mode rpc
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The package manifest lists Pi’s built-in modules as peer dependencies, so npm does not bundle a second copy.
|
|
110
|
+
|
|
111
|
+
## Publish
|
|
112
|
+
|
|
113
|
+
The [`pi-package`](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/packages.md) keyword makes a published npm release visible in Pi’s package catalog.
|
|
114
|
+
|
|
115
|
+
For a release, publish after the validation checks pass:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npm login
|
|
119
|
+
npm publish
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
For later releases, choose `patch`, `minor`, or `major` with `npm version`, then publish and push the version commit and tag.
|
|
123
|
+
|
|
124
|
+
## Security
|
|
125
|
+
|
|
126
|
+
Pi extensions run with your user permissions. Review the source before installing KillerOS globally. KillerOS executes lifecycle hook commands only for projects Pi marks as trusted; review `.pi/killeros-hooks.json` before enabling project trust.
|
|
127
|
+
|
|
128
|
+
## License
|
|
129
|
+
|
|
130
|
+
[MIT](LICENSE) © 2026 KyrosHendrix
|