killeros 1.5.7 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -119
- package/Killeros.ts +1 -25
- package/README.md +130 -220
- package/killeros/commands.ts +1 -238
- package/killeros/display.ts +6 -2
- package/killeros/footer.ts +8 -3
- package/killeros/goals.ts +10 -9
- package/killeros/hooks.ts +1 -1
- package/killeros/limits.ts +1 -0
- package/killeros/personal-instructions.ts +3 -1
- package/killeros/question.ts +19 -4
- package/package.json +2 -8
- package/agents/debugger.md +0 -50
- package/agents/documenter.md +0 -49
- package/agents/planner.md +0 -53
- package/agents/reviewer.md +0 -58
- package/agents/scout.md +0 -56
- package/agents/security.md +0 -54
- package/agents/tester.md +0 -50
- package/agents/worker.md +0 -54
- 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 -3048
- 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
|
@@ -2,65 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to KillerOS are documented here.
|
|
4
4
|
|
|
5
|
-
## [
|
|
5
|
+
## [2.0.0] - 2026-08-07
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Fixed
|
|
7
|
+
### Changed
|
|
10
8
|
|
|
11
|
-
-
|
|
12
|
-
- 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.
|
|
13
|
-
- Replaced the frozen queued spawn result with a static launch receipt so only the separate live widget claims current state and usage.
|
|
9
|
+
- 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.
|
|
14
10
|
|
|
15
|
-
## [1.5.
|
|
11
|
+
## [1.5.8] - 2026-08-07
|
|
16
12
|
|
|
17
13
|
### Fixed
|
|
18
14
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
- Clarified and tested the shared `message` field limits: 20,000 characters for a spawn task alias and 4,000 characters for steering.
|
|
15
|
+
- Bounded question filter input to 4,000 characters and 16,000 UTF-8 bytes, with a clear rejection notice for excess input.
|
|
16
|
+
- Reported goal start, resume, and edit success only after continuation dispatch succeeded, and paused the goal when dispatch failed.
|
|
22
17
|
|
|
23
18
|
## [1.5.5] - 2026-08-05
|
|
24
19
|
|
|
25
|
-
### Added
|
|
26
|
-
|
|
27
|
-
- Added live background subagent progress with queued, running, and completed states plus per-child and batch usage.
|
|
28
|
-
- 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.
|
|
29
|
-
- Added `message` as a single-spawn task alias and visible fallback to `worker` for unknown named roles.
|
|
30
|
-
|
|
31
20
|
### Changed
|
|
32
21
|
|
|
33
22
|
- 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.
|
|
34
23
|
|
|
35
24
|
### Fixed
|
|
36
25
|
|
|
37
|
-
- Warned when a settled or failed background subagent handoff cannot reach the parent and pointed users to `list` and `collect` for recovery.
|
|
38
26
|
- Overrode vulnerable transitive `brace-expansion` and `undici` versions with patched releases in the development and CI install tree.
|
|
39
27
|
|
|
40
28
|
## [1.5.4] - 2026-08-04
|
|
41
29
|
|
|
42
|
-
### Added
|
|
43
|
-
|
|
44
|
-
- 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.
|
|
45
|
-
|
|
46
30
|
### Fixed
|
|
47
31
|
|
|
48
32
|
- Added guarded automatic context compaction at 30% remaining, with structured summaries and goal continuation after the compaction is saved.
|
|
49
|
-
- 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.
|
|
50
|
-
- 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.
|
|
51
|
-
- 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.
|
|
52
|
-
- `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.
|
|
53
|
-
- 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.
|
|
54
33
|
|
|
55
34
|
## [1.5.3] - 2026-08-03
|
|
56
35
|
|
|
57
36
|
### Fixed
|
|
58
37
|
|
|
59
|
-
-
|
|
60
|
-
- Ignored provider-generated `threadId` values during spawn argument preparation and TUI rendering while retaining strict action validation during execution.
|
|
61
|
-
- 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.
|
|
62
|
-
- Made `/exit` abort an active run before requesting Pi's graceful shutdown, and made session teardown await bounded background-child settlement.
|
|
63
|
-
- Corrected the README cancellation contract so it matches active-child termination.
|
|
38
|
+
- Made `/exit` abort an active run before requesting Pi's graceful shutdown.
|
|
64
39
|
|
|
65
40
|
## [1.5.2] - 2026-08-03
|
|
66
41
|
|
|
@@ -68,10 +43,6 @@ All notable changes to KillerOS are documented here.
|
|
|
68
43
|
|
|
69
44
|
- 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.
|
|
70
45
|
|
|
71
|
-
### Fixed
|
|
72
|
-
|
|
73
|
-
- 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`.
|
|
74
|
-
|
|
75
46
|
## [1.5.1] - 2026-08-03
|
|
76
47
|
|
|
77
48
|
### Changed
|
|
@@ -80,8 +51,6 @@ All notable changes to KillerOS are documented here.
|
|
|
80
51
|
|
|
81
52
|
### Fixed
|
|
82
53
|
|
|
83
|
-
- 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"`.
|
|
84
|
-
- Kept strict action-specific subagent validation at runtime, including single, parallel, chain, steering, interruption, collection, and closure requests.
|
|
85
54
|
- Scoped native concise settings to supported Responses APIs while leaving completion and unrelated provider payloads unchanged.
|
|
86
55
|
|
|
87
56
|
## [1.5.0] - 2026-08-03
|
|
@@ -89,99 +58,19 @@ All notable changes to KillerOS are documented here.
|
|
|
89
58
|
### Changed
|
|
90
59
|
|
|
91
60
|
- Split the main extension into feature modules under `killeros/` while keeping `Killeros.ts` as the stable entry point.
|
|
92
|
-
- Moved subagent modules under `killeros/` and kept root re-export files for existing deep imports.
|
|
93
|
-
|
|
94
|
-
### Fixed
|
|
95
|
-
|
|
96
|
-
- Hardened the subagent schema and runtime checks with action-specific request shapes.
|
|
97
|
-
- Invalid fields now fail before role discovery, project confirmation, thread creation, or child launch.
|
|
98
|
-
- The TUI no longer shows parallel schedules for malformed subagent requests.
|
|
99
|
-
- Kept valid single, parallel, chain, lifecycle, steering, interruption, collection, and closure behavior unchanged.
|
|
100
61
|
|
|
101
62
|
## [1.4.9] - 2026-08-02
|
|
102
63
|
|
|
103
64
|
### Changed
|
|
104
65
|
|
|
105
|
-
-
|
|
106
|
-
- Added an 8 MiB ceiling for one child JSONL record, bounded thread retention with inspectable tombstones, and scoped atomic `/init` reads and writes.
|
|
107
|
-
|
|
108
|
-
## [1.4.7] - 2026-08-01
|
|
109
|
-
|
|
110
|
-
### Fixed
|
|
111
|
-
|
|
112
|
-
- Serialized every write-capable task in a parallel batch in input order instead of rejecting batches with multiple writers.
|
|
113
|
-
- Added opt-in `writerConcurrency` scheduling for independent batches while keeping serialization as the safe default and documenting shared-worktree conflict responsibility.
|
|
114
|
-
- Parent tool-call aborts now settle only queued tasks; active children finish naturally, and session directories remain until child exit is confirmed.
|
|
115
|
-
- Settled queued tasks on interrupted parallel batches and documented the shared-worktree execution model.
|
|
116
|
-
- Restricted the `message` parameter to `action: "steer"` and added focused regression coverage.
|
|
117
|
-
|
|
118
|
-
## [1.4.6] - 2026-08-01
|
|
119
|
-
|
|
120
|
-
### Fixed
|
|
121
|
-
|
|
122
|
-
- Made the registered task schema use the same ten-task limit as runtime validation.
|
|
123
|
-
- Kept one isolated Pi session ID and session directory across steering restarts so a child retains its conversation.
|
|
124
|
-
- 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`.
|
|
125
|
-
- Kept explicit embedding resource guards and user stops visible as terminal states.
|
|
126
|
-
|
|
127
|
-
## [1.4.5] - 2026-08-01
|
|
128
|
-
|
|
129
|
-
### Fixed
|
|
130
|
-
|
|
131
|
-
- Removed the child-budget extension, its read-tool budget, and the default 250,000-token/$5 quota.
|
|
132
|
-
- 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.
|
|
133
|
-
- Removed forced early-report prompt text so roles can finish their assigned work naturally.
|
|
134
|
-
- Treat model stop reason `length` as a completed child process instead of inventing a KillerOS `limited` result.
|
|
135
|
-
- Documented the child lifecycle contract: children complete naturally; explicit user interruptions, configured guards, and real child-process failures remain visible.
|
|
136
|
-
|
|
137
|
-
## [1.4.3] - 2026-08-01
|
|
138
|
-
|
|
139
|
-
### Fixed
|
|
140
|
-
|
|
141
|
-
- 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.
|
|
142
|
-
- Added bounded child report instructions and kept read-tool budgets cumulative across steering restarts.
|
|
143
|
-
- Lowered the default child quota to 250,000 tokens and $5, and exposed child tool-call counts in results.
|
|
144
|
-
|
|
145
|
-
## [1.4.2] - 2026-08-01
|
|
146
|
-
|
|
147
|
-
### Added
|
|
148
|
-
|
|
149
|
-
- Added named child threads with inspectable lifecycle state, Active/Done views, steering, interruption, collection, and closure controls.
|
|
150
|
-
- Added isolated child-process resource guards for wall time, JSONL lines, retained trace, stderr, output, token quota, cost quota, task count, and concurrency.
|
|
151
|
-
|
|
152
|
-
### Changed
|
|
153
|
-
|
|
154
|
-
- Replaced routine child turn limits with natural completion plus named resource guards.
|
|
155
|
-
- Preserved partial traces and handoffs when a child fails, stops, or reaches a limit.
|
|
66
|
+
- Scoped atomic `/init` reads and writes.
|
|
156
67
|
|
|
157
68
|
## [1.4.1] - 2026-08-01
|
|
158
69
|
|
|
159
|
-
### Added
|
|
160
|
-
|
|
161
|
-
- Added per-invocation child model selection and separate thinking-effort controls, with visible `inherit` placeholders in every bundled role.
|
|
162
|
-
- Added focused `debugger`, `documenter`, `security`, and `tester` roles with explicit access boundaries, skill discovery, and web research guidance.
|
|
163
|
-
- 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.
|
|
164
|
-
|
|
165
|
-
### Fixed
|
|
166
|
-
|
|
167
|
-
- Made child timeout and forced-termination fallbacks settle even when no other event-loop handles remain.
|
|
168
|
-
- Kept streamed child thinking within the retained trace budget without terminating successful invocations.
|
|
169
|
-
- Preserved model IDs containing colons and validated thinking levels through Pi's model capabilities, including models that do not support `off`.
|
|
170
|
-
- Bounded unterminated JSONL lines while preserving fragmented UTF-8 handling.
|
|
171
|
-
|
|
172
70
|
### Changed
|
|
173
71
|
|
|
174
|
-
- Expanded the bundled role roster while keeping read-only auditors separate from write-capable implementation roles.
|
|
175
72
|
- Hardened CI with Node floor/LTS checks, locked-dependency auditing, dependency review, package-content validation, and CodeQL analysis.
|
|
176
73
|
|
|
177
|
-
## [1.4.0] - 2026-08-01
|
|
178
|
-
|
|
179
|
-
### Added
|
|
180
|
-
|
|
181
|
-
- Pi-native `subagent` tool with isolated JSONL child processes, single/parallel/chain modes, streamed TUI status, aggregate usage, and abort propagation.
|
|
182
|
-
- Bundled Markdown roles for read-only scouting, planning, and review plus one serialized write-capable worker.
|
|
183
|
-
- Strict role, tool, model, trust, precedence, concurrency, turn, timeout, trace, stderr, and output enforcement.
|
|
184
|
-
|
|
185
74
|
## [1.3.0] - 2026-07-31
|
|
186
75
|
|
|
187
76
|
### 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,220 +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
|
-
```text
|
|
132
|
-
/subagents
|
|
133
|
-
/subagents list
|
|
134
|
-
/subagents inspect <id-or-name>
|
|
135
|
-
/subagents wait [<id-or-name>] [timeout-ms]
|
|
136
|
-
/subagents steer <id-or-name> <message>
|
|
137
|
-
/subagents interrupt <id-or-name|all>
|
|
138
|
-
/subagents collect <id-or-name>
|
|
139
|
-
/subagents resume <id-or-name> [task]
|
|
140
|
-
/subagents close <id-or-name>
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
Bare `/subagents` opens TUI selectors. RPC, JSON, and print modes require an explicit verb and never open a UI prompt.
|
|
144
|
-
|
|
145
|
-
### Thread lifecycle
|
|
146
|
-
|
|
147
|
-
Each delegated task creates a named child thread. Its contract records the parent ID, child ID, role, prompt, model, requested capability boundary, trace, usage, and result state. Roles define the child’s access and tools; they do not own lifecycle controls or grant new filesystem powers. The parent owns scope, waits, inspection, steering, collection, and closure.
|
|
148
|
-
|
|
149
|
-
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.
|
|
150
|
-
|
|
151
|
-
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.
|
|
152
|
-
|
|
153
|
-
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.
|
|
154
|
-
|
|
155
|
-
The replacement lifecycle has nine phases:
|
|
156
|
-
|
|
157
|
-
1. **Dispatch:** create a named thread and store its contract before launch.
|
|
158
|
-
2. **Track:** maintain lifecycle states and Active/Done visibility.
|
|
159
|
-
3. **Inspect:** keep the trace in the child thread, not the parent context.
|
|
160
|
-
4. **Steer:** append a bounded parent follow-up to an active or queued thread.
|
|
161
|
-
5. **Interrupt:** stop one or all active or queued children while preserving partial work.
|
|
162
|
-
6. **Collect:** return a concise handoff while retaining the expanded trace.
|
|
163
|
-
7. **Guard:** stop at the default turn, token, or wall-time limit and honor explicit resource-limit overrides.
|
|
164
|
-
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.
|
|
165
|
-
9. **Prove:** test identity, visibility, controls, natural completion, guards, partial handoffs, bounded retention, and closure.
|
|
166
|
-
|
|
167
|
-
## Configuration
|
|
168
|
-
|
|
169
|
-
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.
|
|
170
|
-
|
|
171
|
-
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.
|
|
172
|
-
|
|
173
|
-
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.
|
|
174
|
-
|
|
175
|
-
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.
|
|
176
|
-
|
|
177
|
-
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.
|
|
178
|
-
|
|
179
|
-
## Behavior by mode
|
|
180
|
-
|
|
181
|
-
| Mode | Behavior |
|
|
182
|
-
|---|---|
|
|
183
|
-
| TUI | All features are available, including confirmation for trusted project subagents |
|
|
184
|
-
| RPC | Goal set/view/pause/resume/clear, subagents, and concise prompt guidance work; TUI components, `/goal edit`, and `/init` are disabled |
|
|
185
|
-
| Print/JSON | Concise prompt guidance works; interactive questions, `/goal`, `/init`, and project-role confirmation fail explicitly |
|
|
186
|
-
|
|
187
|
-
## Validation
|
|
188
|
-
|
|
189
|
-
Before release, run:
|
|
190
|
-
|
|
191
|
-
```bash
|
|
192
|
-
npm ci
|
|
193
|
-
npm run check
|
|
194
|
-
npm test
|
|
195
|
-
npm pack --dry-run
|
|
196
|
-
pi -ne -e . --mode rpc
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
The package manifest lists Pi’s built-in modules as peer dependencies, so npm does not bundle a second copy.
|
|
200
|
-
|
|
201
|
-
## Publish
|
|
202
|
-
|
|
203
|
-
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.
|
|
204
|
-
|
|
205
|
-
For a release, publish after the validation checks pass:
|
|
206
|
-
|
|
207
|
-
```bash
|
|
208
|
-
npm login
|
|
209
|
-
npm publish
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
For later releases, choose `patch`, `minor`, or `major` with `npm version`, then publish and push the version commit and tag.
|
|
213
|
-
|
|
214
|
-
## Security
|
|
215
|
-
|
|
216
|
-
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.
|
|
217
|
-
|
|
218
|
-
## License
|
|
219
|
-
|
|
220
|
-
[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.0
|
|
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
|
+
- Coral Spark activity indicator with Claude-adjacent verbs that advance between agent runs and a quiet hidden-thinking label
|
|
44
|
+
- Framed multiline editor with Shift+Enter support
|
|
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` for durable long-running objectives with pause, resume, edit, clear, 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 filtering, proposal previews, keyboard selection, custom answers, history, cancellation, and resize-safe rendering
|
|
51
|
+
- Mid-prompt slash completion with current Pi `0.82.1` commands, extensions, prompts, and skills
|
|
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 View the current long-running goal
|
|
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. When a goal exists, the footer adds its active time or terminal state; at narrow widths, context pressure and 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
|