ytdb-slate 0.12.1 → 0.14.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/README.md +14 -6
- package/docs/blast-radius.md +13 -5
- package/docs/configuration.md +444 -4
- package/docs/context-budget.md +62 -42
- package/docs/delivery-packages.md +80 -34
- package/docs/design-principles.md +316 -264
- package/docs/model-routing.md +25 -22
- package/docs/pr-publishing.md +118 -51
- package/docs/recursive-workflow.md +930 -0
- package/docs/review-rules.md +29 -9
- package/docs/roadmap.md +24 -3
- package/docs/track-workflow.md +202 -58
- package/docs/user-notes.md +27 -14
- package/extension/config.ts +2 -0
- package/extension/episodes.ts +6 -1
- package/extension/failover.ts +6 -1
- package/extension/handoff.ts +15 -9
- package/extension/index.ts +36 -14
- package/extension/logical-model-adapters.ts +6 -3
- package/extension/logical-model-definitions.ts +21 -14
- package/extension/mode.ts +21 -28
- package/extension/model-default.ts +35 -37
- package/extension/notification-config.ts +120 -0
- package/extension/notification-dispatcher.ts +274 -0
- package/extension/notification-events.ts +166 -0
- package/extension/notification-native.ts +173 -0
- package/extension/notification-protocols.ts +102 -0
- package/extension/notification-push-resolution.ts +216 -0
- package/extension/notification-push.ts +107 -0
- package/extension/notification-terminal.ts +94 -0
- package/extension/notification-tmux.ts +166 -0
- package/extension/paths.ts +1 -0
- package/extension/record-names.ts +31 -0
- package/extension/run-outcome.ts +7 -0
- package/extension/slate-files.ts +2 -1
- package/extension/startup-summary.ts +2 -2
- package/extension/state.ts +1 -0
- package/extension/threads.ts +16 -3
- package/extension/tools.ts +52 -30
- package/extension/worker-extensions.ts +2 -3
- package/extension/worker.ts +31 -37
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -51,13 +51,19 @@ Through `context`, later worker threads can receive earlier episodes without ful
|
|
|
51
51
|
|
|
52
52
|
Slate independently implements the thread-weaving architecture from the Random Labs technical report for `@randomlabs/slate`.
|
|
53
53
|
|
|
54
|
-
A track is
|
|
54
|
+
A track is a bounded part of approved work. A code track implements that work. A design track plans a nested change with child tracks. A level contains sibling tracks from one split. The level is the merge unit. Slate supplies this development workflow in orchestrator mode. Project configuration can extend the workflow rules but cannot replace them. Eleven focus areas name specific risks. They cover
|
|
55
55
|
concurrency defects, data loss, security weaknesses, performance degradation,
|
|
56
56
|
test-quality defects, unreadable user-facing prose, licensing exposure,
|
|
57
57
|
non-local logic defects, consumer contract breaks, governing-rule defects, and
|
|
58
58
|
unreported failures.
|
|
59
59
|
|
|
60
|
-
The orchestrator records risks for the change and each track. You approve or reject each named proof. Approved proofs select design gates and reviewers. A track with a proved risk gets one general reviewer and its required specialists. An implementer's approximate track size above 100 added plus removed lines also adds the general reviewer unless the track changes only documents that neither ship as code nor run. Lockfiles, migration files, and generated output do not count. A track that the orchestrator estimates above 100 such lines needs a high-level design before implementation, including when it changes only documents. A track with neither review trigger gets no routine implementation reviewer. See [workflow](docs/track-workflow.md) and [focus areas](docs/blast-radius.md) for the rules. Optional draft pull requests cover the whole change. Only you merge
|
|
60
|
+
The orchestrator records risks for the change and each track. You approve or reject each named proof. Approved proofs select design gates and reviewers. A track with a proved risk gets one general reviewer and its required specialists. An implementer's approximate track size above 100 added plus removed lines also adds the general reviewer unless the track changes only documents that neither ship as code nor run. Lockfiles, migration files, and generated output do not count. A track that the orchestrator estimates above 100 such lines needs a high-level design before implementation, including when it changes only documents. A track with neither review trigger gets no routine implementation reviewer. See [workflow](docs/track-workflow.md) and [focus areas](docs/blast-radius.md) for the rules. Optional draft pull requests cover each level with code tracks. A change without nested tracks has at most one pull request. Each design track needs your explicit acceptance of its whole subtree, which contains that track and its descendants. Final acceptance of the whole change remains a separate decision. Only you merge pull requests. See [recursive workflow](docs/recursive-workflow.md) for nested planning, repair children, and acceptance.
|
|
61
|
+
|
|
62
|
+
## Product principles
|
|
63
|
+
|
|
64
|
+
- **Control without reading every line.** Many coding agents produce code that the developer accepts without reading it. Slate keeps you in control in a different way. It gives you higher-level views of the work: approved risks, designs, and review results. You direct and check each change through these views, so you do not need to read all of the generated code.
|
|
65
|
+
- **Quality before cost, within limits.** We expect the cost of model use to fall over time. Slate therefore spends more model work on code quality, up to a reasonable limit. For example, Slate adds reviewers for approved risks and for large tracks that change code.
|
|
66
|
+
- **Cost in proportion to the change.** The cost of a change should grow in proportion to its complexity. A small track with no approved risk gets no design gate and no routine implementation reviewer. A larger or riskier track can add design steps, review steps, or both.
|
|
61
67
|
|
|
62
68
|
## Commands
|
|
63
69
|
|
|
@@ -77,6 +83,8 @@ The orchestrator records risks for the change and each track. You approve or rej
|
|
|
77
83
|
|
|
78
84
|
Slate reads optional home configuration and trusted project configuration. The [configuration reference](docs/configuration.md) lists merge rules, options, examples, and document path warnings.
|
|
79
85
|
|
|
86
|
+
Slate attempts notifications after a main-session run settles or an extension dialog stays open for input. Terminal, desktop and bell delivery default to on. Phone push through ntfy, a notification server, needs home setup. Text defaults to the event type. See [notification setup](docs/configuration.md#notifications) for timing and limits.
|
|
87
|
+
|
|
80
88
|
## Safety and trust
|
|
81
89
|
|
|
82
90
|
Slate limits which extensions worker threads can load and which project settings it reads. [Safety and trust](docs/safety-and-trust.md) explains worker extensions, provider registrations, and the project trust boundary.
|
|
@@ -86,9 +94,8 @@ Slate limits which extensions worker threads can load and which project settings
|
|
|
86
94
|
The main goal is that you can guide a change through its design without reading the code. Planned work:
|
|
87
95
|
|
|
88
96
|
1. Design documents that state exact guarantees and show why the design keeps them. Reviewers check the code against the approved design ([#402](https://github.com/JetBrains/ytdb-slate/issues/402), [#403](https://github.com/JetBrains/ytdb-slate/issues/403), [#404](https://github.com/JetBrains/ytdb-slate/issues/404)).
|
|
89
|
-
2.
|
|
90
|
-
3.
|
|
91
|
-
4. Remote development through integration with pi-agent-dashboard ([#417](https://github.com/JetBrains/ytdb-slate/issues/417)).
|
|
97
|
+
2. Better developer experience: asynchronous threads, a detailed cost breakdown, and a read-only view of thread execution.
|
|
98
|
+
3. Remote development: planned support will allow you to set up your own infrastructure to steer agents from a laptop, a desktop or a phone through one browser application, with notifications when an agent needs attention.
|
|
92
99
|
|
|
93
100
|
See [`docs/roadmap.md`](docs/roadmap.md) for details.
|
|
94
101
|
|
|
@@ -103,8 +110,9 @@ These documents define workflow and reference behavior. Slate cites workflow doc
|
|
|
103
110
|
- [`docs/design-principles.md`](docs/design-principles.md) explains the architecture and its trade-offs.
|
|
104
111
|
- [`docs/model-routing.md`](docs/model-routing.md) defines logical-model routing, recovery, and accepted limits.
|
|
105
112
|
- [`docs/pr-publishing.md`](docs/pr-publishing.md) defines optional draft pull request publishing.
|
|
113
|
+
- [`docs/recursive-workflow.md`](docs/recursive-workflow.md) defines nested planning, repair children, and whole-subtree acceptance.
|
|
106
114
|
- [`docs/review-rules.md`](docs/review-rules.md) defines reviewer roles, evidence, and fix gates.
|
|
107
|
-
- [`docs/roadmap.md`](docs/roadmap.md) describes planned work.
|
|
115
|
+
- [`docs/roadmap.md`](docs/roadmap.md) describes current larger-change guidance and planned work.
|
|
108
116
|
- [`docs/safety-and-trust.md`](docs/safety-and-trust.md) defines worker extension, provider, and trust boundaries.
|
|
109
117
|
- [`docs/track-workflow.md`](docs/track-workflow.md) defines research, design, implementation, review, and delivery.
|
|
110
118
|
- [`docs/user-notes.md`](docs/user-notes.md) defines user note handling.
|
package/docs/blast-radius.md
CHANGED
|
@@ -23,11 +23,19 @@ lines and the separate pre-implementation design estimate. The user alone
|
|
|
23
23
|
judges proofs and whether the proposal is the simplest solution. No script or
|
|
24
24
|
other rule decides whether a proof holds.
|
|
25
25
|
|
|
26
|
-
Each track must be one coherent unit that a human can review in one sitting.
|
|
27
|
-
orchestrator owns the split and records its rationale.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
Each track must be one coherent unit that a human can review in one sitting.
|
|
27
|
+
The orchestrator owns the split and records its rationale.
|
|
28
|
+
A code track implements bounded approved work, including document changes.
|
|
29
|
+
A level contains the sibling tracks created by one split.
|
|
30
|
+
The level is the merge unit.
|
|
31
|
+
All checks pass at each child marker.
|
|
32
|
+
Agreement across documents, prompt guidance, and the extension is required at
|
|
33
|
+
the level boundary.
|
|
34
|
+
Intermediate track packages and review intentions list each remaining difference
|
|
35
|
+
across those surfaces and name the later child that owns it.
|
|
36
|
+
Do not merge an incomplete level into the default branch.
|
|
37
|
+
[track-workflow.md](track-workflow.md) § Recursive planning and loading owns split
|
|
38
|
+
limits, the implementer-requested exception, and the recursive-document loading condition.
|
|
31
39
|
|
|
32
40
|
## Focus areas and their gates
|
|
33
41
|
|
package/docs/configuration.md
CHANGED
|
@@ -9,7 +9,9 @@ Slate reads two optional configuration files at session start:
|
|
|
9
9
|
- Home: `<getAgentDir()>/slate.json`, normally `~/.pi/agent/slate.json`. Pi's `PI_CODING_AGENT_DIR` environment variable can select another agent directory.
|
|
10
10
|
- Project: `<cwd>/.pi/slate.json`, read **only when the project is trusted**.
|
|
11
11
|
|
|
12
|
-
Project values override home values. Objects merge recursively. Arrays, scalar values, and explicit `null` replace the home value. Arrays never append. Slate applies its
|
|
12
|
+
Project values override home values. Objects merge recursively. Arrays, scalar values, and explicit `null` replace the home value. Arrays never append. Slate applies its setting validators after the merge.
|
|
13
|
+
|
|
14
|
+
The `notifications` group has a separate source rule. Only home settings can permit channels and text detail. A trusted project can turn channels off and lower detail. Push destinations and credentials come only from home settings.
|
|
13
15
|
|
|
14
16
|
A missing file is valid. An unreadable file, invalid JSON, or a root that is not an object produces a warning naming that file. Any such error in a permitted file blocks model routing, even when the other file is valid.
|
|
15
17
|
|
|
@@ -44,6 +46,17 @@ The project must be trusted before Slate reads this file. Start a new session af
|
|
|
44
46
|
| Key | Type | Default | Semantics |
|
|
45
47
|
| --- | --- | --- | --- |
|
|
46
48
|
| `orchestratorModeDefault` | boolean | `false` | Start fresh interactive sessions with orchestrator mode ON. |
|
|
49
|
+
| `notifications.terminal`, `notifications.native`, `notifications.bell` | boolean | `true` | Channel permissions. A trusted project can turn a channel off but cannot enable a home-disabled channel. Configuration validation does not send notifications. |
|
|
50
|
+
| `notifications.push.enabled` | boolean | `false` | Home permission for phone push. A trusted project can disable it but cannot enable it. Configuration validation does not contact a server. |
|
|
51
|
+
| `notifications.detail` | `generic` \| `project` \| `message` | `generic` | Text permission for terminal and native channels. `generic` permits event text. `project` also permits the folder name. `message` also permits the agent message. A trusted project can only lower the home permission. |
|
|
52
|
+
| `notifications.pushDetail` | `generic` \| `project` \| `message` | `generic` | Independent text permission for push, with the same levels. Only home can raise it. A trusted project can lower it. General detail does not raise push detail. |
|
|
53
|
+
| `notifications.minimumDelayMs` | number | `30000` | Minimum interval since input, in milliseconds. Accept a nonnegative safe integer. A trusted project value wins. |
|
|
54
|
+
| `notifications.cooldownMs` | number | `60000` | Minimum interval between events of the same type, in milliseconds. Accept a nonnegative safe integer. A trusted project value wins. |
|
|
55
|
+
| `notifications.sequences` | `auto` \| string[] | `auto` | An explicit list must contain distinct values from `osc9`, `osc777`, and `osc99`. The list must not be empty. List order is preserved. A trusted project value wins. |
|
|
56
|
+
| `notifications.push.server` | string | — | Accept HTTPS (Hypertext Transfer Protocol Secure) addresses from home configuration for encrypted web traffic. Accept HTTP (Hypertext Transfer Protocol) only for loopback addresses, which refer to this computer. Allow `localhost`, IPv4 (Internet Protocol version 4) addresses starting with `127.`, or `::1`. HTTP connections also require a resolved loopback address. Reject embedded credentials, query strings, and fragments. The request path ends with `/`. An invalid address disables push with a generic warning. Slate ignores project destination and credential fields with one generic warning. |
|
|
57
|
+
| `notifications.push.topic` | string | — | Home-only topic name of 1 to 64 characters. Accept ASCII (American Standard Code for Information Interchange) letters `A-Z` and `a-z`, digits `0-9`, `_`, or `-`. Enabled push requires both server and topic. An invalid or missing destination disables push. |
|
|
58
|
+
| `notifications.push.token` | string | — | Home-only authentication token. Accept only characters allowed in HTTP headers, without control characters. Do not combine it with username and password. Invalid credentials disable push. |
|
|
59
|
+
| `notifications.push.username`, `notifications.push.password` | string | — | Home-only authentication pair. Supply both values or neither. Credentials must be nonempty and contain no control characters. A username cannot contain `:`. Invalid credentials disable push. |
|
|
47
60
|
| `workerTools` | string[] | `["read", "bash", "edit", "write", "grep", "find", "ls"]` | Tools available to worker threads (an empty list also falls back to the default). |
|
|
48
61
|
| `workerExtensions` | string[] | `[]` | Regex patterns (matched **unanchored**) selecting which of the host session's already-loaded extensions also load into every worker thread; each matched extension's tools are added **on top of** `workerTools`. Empty (default) means workers load no project or discovered extensions. Slate still supplies one internal reminder component. The orchestrator keeps its restricted tool set but its doctrine is told what was whitelisted. Invalid patterns are dropped with a warning at session start. |
|
|
49
62
|
| `cacheKeyEnabled` | boolean | `true` | Add one OpenAI Responses prompt cache key to all workers in the current main Slate session. Another main session receives another key. `false` disables key injection. It does not disable request throttling. Provider requests with `cacheRetention: "none"`, including worker summaries, keep that opt-out and receive no forced key. |
|
|
@@ -56,7 +69,7 @@ The project must be trusted before Slate reads this file. Start a new session af
|
|
|
56
69
|
| `contextBudget` | number \| object | `256000` (Anthropic models: `400000`) | Absolute orchestrator context budget (tokens) at which Slate auto-pauses and prepares a fresh-session handoff — semantics, defaults, per-model overrides, and rationale in [`docs/context-budget.md`](context-budget.md). |
|
|
57
70
|
| `orchestratorPromptDocs` | string[] | `[]` | Markdown files whose paths follow the source rules above and whose **contents** are appended to the orchestrator system prompt. |
|
|
58
71
|
| `workerPromptDocs` | string[] | `[]` | Markdown files whose **contents** are appended to every worker-thread system prompt. |
|
|
59
|
-
| `workflow.draftPRs` | boolean | `false` | Enable one
|
|
72
|
+
| `workflow.draftPRs` | boolean | `false` | Enable one draft pull request per level with code tracks. A change without design tracks keeps one pull request. See [pr-publishing.md](pr-publishing.md) § One draft pull request and § Creation. |
|
|
60
73
|
| `workflow.followUpIssues` | boolean | `false` | When true, the orchestrator asks which deferred items become tracked issues. Deferred items are always reported whatever the value. |
|
|
61
74
|
| `workflow.routingRecommendations` | boolean | `false` | Before final acceptance, add an evidence-bounded model-routing field for logical models dispatched during the current change. The enabled field always appears. It reports when no change is recommended and never edits routing files. |
|
|
62
75
|
| `writing.check` | boolean | ignored | This ignored writing key remains accepted for compatibility. Remove it from `slate.json`. Guidance is automatic during orchestrator mode when the project is trusted or a home file exists. See [`docs/writing-guidance.md`](writing-guidance.md). |
|
|
@@ -71,7 +84,434 @@ The project must be trusted before Slate reads this file. Start a new session af
|
|
|
71
84
|
| `doctrineExtraPath` | string | — | Markdown whose **content** is appended to the orchestrator doctrine (project-specific workflow additions). |
|
|
72
85
|
| `reviewPerspectivesPath` | string | — | Review charters, each declaring its own finding-ID prefix. The doctrine references this **path**; the orchestrator reads the file alongside the shipped review rules. |
|
|
73
86
|
| `router.models` | object | shipped six-model pool | Ordinary membership and definitions. `include` replaces the starting membership, including with an empty list. `add` accepts complete new definitions. `replace` changes selected fields. `exclude` applies last. Within each model definition, lists and provider maps replace shipped fields. The home and project configuration files merge first. |
|
|
74
|
-
| `router.compressor.models` | array of `{ model, effort }` | `[{"model":"claude-sonnet-5","effort":"medium"}]` | Independent ordered compressor list. An explicit empty list blocks work. |
|
|
87
|
+
| `router.compressor.models` | array of `{ model, effort }` | `[{"model":"claude-sonnet-5.5","effort":"medium"}]` | Independent ordered compressor list. An explicit empty list blocks work. |
|
|
88
|
+
|
|
89
|
+
Notification settings define permissions and text policy. Slate validates these settings at session start. Slate registers terminal, bell, native and push delivery channels. A channel is one delivery route. Slate registers no notification tool. See [Notifications](#notifications) for automatic delivery and setup.
|
|
90
|
+
|
|
91
|
+
Invalid values produce generic warnings that name the setting and its home or project source without showing supplied values. Invalid channel values use the channel defaults, combined with home permission for project values. Invalid detail falls back to `generic`. Invalid intervals use their defaults. Invalid sequence selection uses `auto`. Invalid or incomplete push destinations disable push.
|
|
92
|
+
|
|
93
|
+
## Notifications
|
|
94
|
+
|
|
95
|
+
Slate automatically attempts delivery when the main session needs attention.
|
|
96
|
+
Channel settings control automatic delivery. There is no separate enable setting.
|
|
97
|
+
Notifications work with orchestrator mode on or off.
|
|
98
|
+
Worker threads do not trigger their own Slate notifications.
|
|
99
|
+
|
|
100
|
+
Slate sends notifications only in pi's interactive terminal mode.
|
|
101
|
+
Print mode and Remote Procedure Call mode, abbreviated RPC, send none.
|
|
102
|
+
Terminal sequences and bells also require standard output to be a real terminal.
|
|
103
|
+
Captured or redirected output receives no notification controls.
|
|
104
|
+
|
|
105
|
+
### Automatic waits and timing
|
|
106
|
+
|
|
107
|
+
A run wait starts after pi reports that the main run has settled.
|
|
108
|
+
Settlement means the run has ended, including retries and queued continuations.
|
|
109
|
+
Slate also waits for its own model recovery to finish.
|
|
110
|
+
A normal outcome sends **Input needed**. A final error sends **Error**.
|
|
111
|
+
Successful recovery does not send the intermediate error.
|
|
112
|
+
|
|
113
|
+
An open extension dialog can also start an **Input needed** wait.
|
|
114
|
+
Slate observes extension dialog start and end events.
|
|
115
|
+
A blocking dialog waits for your answer before work can continue.
|
|
116
|
+
Closing the dialog cancels its pending wait.
|
|
117
|
+
These events can also describe nonblocking overlays.
|
|
118
|
+
An event proves an outstanding interaction, not that the agent has stopped.
|
|
119
|
+
|
|
120
|
+
The default minimum delay is 30,000 milliseconds, or 30 seconds.
|
|
121
|
+
The delay starts at settlement or dialog opening, whichever wait applies.
|
|
122
|
+
Observed activity restarts the delay for a pending wait.
|
|
123
|
+
|
|
124
|
+
The default cooldown is 60,000 milliseconds, or 60 seconds, between attempts of the same event type.
|
|
125
|
+
Input-needed and error events have separate cooldowns.
|
|
126
|
+
A wait that fails the cooldown check sends nothing.
|
|
127
|
+
Slate does not repeatedly notify about the same wait.
|
|
128
|
+
|
|
129
|
+
Before delivery, Slate checks that the wait still belongs to the current session.
|
|
130
|
+
A run wait also requires an idle agent, no queued message and no active Slate recovery.
|
|
131
|
+
A dialog wait requires an open observed dialog.
|
|
132
|
+
Each channel permits at most one attempt at a time.
|
|
133
|
+
A busy channel does not block the other channels.
|
|
134
|
+
|
|
135
|
+
Change the delay and cooldown in home or trusted project configuration:
|
|
136
|
+
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"notifications": {
|
|
140
|
+
"minimumDelayMs": 30000,
|
|
141
|
+
"cooldownMs": 60000
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Observed activity and stop limits
|
|
147
|
+
|
|
148
|
+
Slate restarts pending waits for these observed actions:
|
|
149
|
+
|
|
150
|
+
- Terminal input that reaches Slate's listener, including typing and navigation keys.
|
|
151
|
+
- An interactive prompt submission or a `!` shell command.
|
|
152
|
+
- Session tree navigation, which selects another point in conversation history.
|
|
153
|
+
- Model selection or a change to the model's thinking effort.
|
|
154
|
+
- A session information change, such as renaming the session.
|
|
155
|
+
- Manual compaction, which shortens conversation history.
|
|
156
|
+
|
|
157
|
+
Model requests do not count as user activity.
|
|
158
|
+
Activity alone never sends a notification.
|
|
159
|
+
After Slate admits delivery, later activity does not recall that attempt.
|
|
160
|
+
|
|
161
|
+
The listener cannot observe every human action.
|
|
162
|
+
Earlier extension listeners and full-screen input consumers can hide keys.
|
|
163
|
+
Built-in pi dialogs may emit no extension dialog events.
|
|
164
|
+
Reading output without keys can outlast the delay and cause a notification.
|
|
165
|
+
Rare terminal replies and extension-caused activity events can postpone a notification.
|
|
166
|
+
Slate does not detect terminal focus or replace the editor.
|
|
167
|
+
|
|
168
|
+
A final response marked as aborted suppresses the run notification.
|
|
169
|
+
An observed aborted run signal also suppresses it.
|
|
170
|
+
Slate cannot detect a stop when pi supplies neither form of evidence.
|
|
171
|
+
|
|
172
|
+
A stop before an automatic retry can leave the earlier error visible to Slate.
|
|
173
|
+
Slate can then send **Error**.
|
|
174
|
+
A stop during another extension's end-of-run handler can leave a normal outcome.
|
|
175
|
+
Slate can then send **Input needed**.
|
|
176
|
+
Slate does not infer a stop from Esc, which also closes dialogs and menus.
|
|
177
|
+
|
|
178
|
+
### Session replacement and reload limits
|
|
179
|
+
|
|
180
|
+
A handler is an extension callback that pi calls for an event.
|
|
181
|
+
Slate observes replacement requests through its `session_before_switch` and `session_before_fork` handlers.
|
|
182
|
+
Outgoing-session notifications stop when Slate's handler observes the request.
|
|
183
|
+
|
|
184
|
+
The built-in commands include `/new`, `/fork`, `/resume`, `/import` and `/clone`.
|
|
185
|
+
Other extensions can also request replacement.
|
|
186
|
+
An extension can delay or cancel a request.
|
|
187
|
+
Pi supplies no final cancellation result for requests that Slate did not start.
|
|
188
|
+
|
|
189
|
+
Pi calls these handlers in extension order and waits for each to finish.
|
|
190
|
+
An earlier handler can delay or cancel `/new` or a fork before Slate observes the request.
|
|
191
|
+
An existing outgoing-session wait can still deliver while that earlier handler runs.
|
|
192
|
+
No new prompt is needed.
|
|
193
|
+
If the earlier handler cancels the request, Slate's handler does not run.
|
|
194
|
+
|
|
195
|
+
Slate tracks its own `/slate handoff` until it finishes, including its wait for the agent to stop.
|
|
196
|
+
A pending Slate handoff keeps outgoing notifications off.
|
|
197
|
+
After cancellation, Slate restores notifications only when no other replacement request remains pending.
|
|
198
|
+
|
|
199
|
+
For other replacement requests, the next interactive prompt submitted while the agent is idle clears Slate's pending state.
|
|
200
|
+
Notifications resume only when no Slate handoff remains pending.
|
|
201
|
+
A `!` shell command alone does not restore them.
|
|
202
|
+
|
|
203
|
+
After Slate observes a request, one outgoing notification can still occur during a delayed replacement when all these conditions hold:
|
|
204
|
+
|
|
205
|
+
1. Slate did not start the replacement request.
|
|
206
|
+
2. Another extension delays it without a pi dialog.
|
|
207
|
+
3. You submit a prompt while the agent is idle during that delay.
|
|
208
|
+
4. The new run settles or a dialog opens before replacement finishes.
|
|
209
|
+
5. No Slate handoff is pending.
|
|
210
|
+
|
|
211
|
+
A replacement that proceeds aborts any run started during that delay.
|
|
212
|
+
Running `/reload` during a pending replacement creates a Slate instance that does not know about that request.
|
|
213
|
+
The new instance can send one outgoing notification before replacement finishes.
|
|
214
|
+
|
|
215
|
+
Slate cannot recall a notification that a channel has already accepted.
|
|
216
|
+
A started native helper or sent push request can finish after replacement or reload.
|
|
217
|
+
Native and push attempts retain their time limits.
|
|
218
|
+
A crash or emergency exit can skip cleanup and leave a started helper to finish.
|
|
219
|
+
|
|
220
|
+
### Text detail and permissions
|
|
221
|
+
|
|
222
|
+
Terminal and native text follow `notifications.detail`.
|
|
223
|
+
Push text follows the independent `notifications.pushDetail` setting.
|
|
224
|
+
Both default to `generic`.
|
|
225
|
+
Raising general detail does not raise push detail.
|
|
226
|
+
Only home configuration can permit higher detail.
|
|
227
|
+
A trusted project can only lower either home permission.
|
|
228
|
+
|
|
229
|
+
| Detail | Permitted text |
|
|
230
|
+
| --- | --- |
|
|
231
|
+
| `generic` | Only the event type, **Input needed** or **Error**. |
|
|
232
|
+
| `project` | The event type and current folder name. |
|
|
233
|
+
| `message` | The event type, folder name and end of the latest agent text. |
|
|
234
|
+
|
|
235
|
+
Message detail copies at most 200 bytes of UTF-8, the Unicode text encoding, with a leading `…`.
|
|
236
|
+
Slate copies text, not thinking or tool data.
|
|
237
|
+
For an error without agent text, message detail can copy provider error text instead.
|
|
238
|
+
Provider error text reaches push only at a home-authorized `message` level.
|
|
239
|
+
Slate removes terminal controls and text direction controls.
|
|
240
|
+
Channel size limits can shorten text further.
|
|
241
|
+
|
|
242
|
+
Home configuration permits terminal, native and bell channels by default.
|
|
243
|
+
Push defaults to off. A trusted project can disable any channel but cannot grant home-denied permission.
|
|
244
|
+
To turn all delivery off, set these home or trusted project values:
|
|
245
|
+
|
|
246
|
+
```json
|
|
247
|
+
{
|
|
248
|
+
"notifications": {
|
|
249
|
+
"terminal": false,
|
|
250
|
+
"native": false,
|
|
251
|
+
"bell": false,
|
|
252
|
+
"push": { "enabled": false }
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Terminal client delivery and the bell
|
|
258
|
+
|
|
259
|
+
Native delivery uses the operating system on the host that runs pi.
|
|
260
|
+
Terminal delivery sends control sequences to the terminal client that displays pi.
|
|
261
|
+
A control sequence is a fixed byte request that a terminal can interpret.
|
|
262
|
+
Over Secure Shell, abbreviated SSH, the host and terminal client can be different computers.
|
|
263
|
+
Native delivery on a remote host does not notify the client desktop.
|
|
264
|
+
Terminal delivery depends on the client terminal's support and permissions.
|
|
265
|
+
|
|
266
|
+
Slate supports three Operating System Command protocols, abbreviated OSC: `osc9`, `osc777` and `osc99`.
|
|
267
|
+
The default `sequences: "auto"` selects protocols from terminal identity hints.
|
|
268
|
+
Outside tmux, a terminal program that manages multiple windows and panes, Slate chooses at most one protocol:
|
|
269
|
+
|
|
270
|
+
| Identified terminal | Automatic choice |
|
|
271
|
+
| --- | --- |
|
|
272
|
+
| iTerm2 | `osc9` |
|
|
273
|
+
| WezTerm or Ghostty | `osc777` |
|
|
274
|
+
| kitty or foot | `osc99` |
|
|
275
|
+
| Konsole | `osc777` |
|
|
276
|
+
| Visual Studio Code terminal | `osc99` |
|
|
277
|
+
| Windows Terminal, GNOME Terminal, Alacritty, macOS Terminal.app or an unknown terminal | No sequence. The independent bell remains available. |
|
|
278
|
+
|
|
279
|
+
Windows Terminal Preview 1.26.2734.0 or later can show OSC 777 notifications as Windows toasts, which are desktop notifications.
|
|
280
|
+
Set the profile setting `compatibility.allowOSC777` to `true`.
|
|
281
|
+
The Settings path is Profiles → Terminal Emulation → **Allow OSC 777 (Desktop Notification) to show toast notifications**.
|
|
282
|
+
Automatic selection sends no sequence to Windows Terminal, so select `["osc777"]` explicitly.
|
|
283
|
+
|
|
284
|
+
Windows Terminal can hide the toast while its window is active and the sending tab and pane are selected.
|
|
285
|
+
Selecting another Windows Terminal tab while waiting avoids this.
|
|
286
|
+
Windows Terminal shows at most one notification every 5 seconds.
|
|
287
|
+
Terminal delivery works for remote pi sessions reached through SSH, including from a Windows Subsystem for Linux (WSL) shell.
|
|
288
|
+
|
|
289
|
+
Automatic selection uses environment variables and cannot prove every connection arrangement.
|
|
290
|
+
Hints inherited across SSH can describe a different terminal.
|
|
291
|
+
Slate queries attached tmux clients when possible.
|
|
292
|
+
For several identified clients, automatic selection reaches as many as possible without duplicate sequence notifications to any identified client.
|
|
293
|
+
Some clients can receive no sequence notification.
|
|
294
|
+
A failed query or no identified client causes a fallback to environment hints.
|
|
295
|
+
|
|
296
|
+
Tmux requires your `allow-passthrough` permission to forward notification sequences.
|
|
297
|
+
On tmux 3.4, `allow-passthrough on` delivers no notification sequence from an inactive window.
|
|
298
|
+
Use `all` on tmux 3.4 or later to permit sequences from invisible panes too:
|
|
299
|
+
|
|
300
|
+
```sh
|
|
301
|
+
tmux set-option -g allow-passthrough all
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
An attached client must belong to a session containing the producing window.
|
|
305
|
+
Slate does not change this permission.
|
|
306
|
+
In tmux automatic mode, the bell can wait up to one second for the client query.
|
|
307
|
+
The query and other channel preparation finish before delivery starts.
|
|
308
|
+
|
|
309
|
+
An explicit list bypasses automatic selection and sends every listed protocol in order:
|
|
310
|
+
|
|
311
|
+
```json
|
|
312
|
+
{
|
|
313
|
+
"notifications": { "sequences": ["osc777"] }
|
|
314
|
+
}
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
Choose only protocols your client supports.
|
|
318
|
+
Several entries can cause duplicate notifications.
|
|
319
|
+
An explicit list cannot override an ambiguous route with multiple multiplexer hints.
|
|
320
|
+
|
|
321
|
+
A multiplexer is a program such as tmux, GNU screen or Zellij that manages terminal sessions.
|
|
322
|
+
Slate suppresses sequences for multiple such hints and warns once per session.
|
|
323
|
+
The bell stays independent.
|
|
324
|
+
Slate wraps sequences for tmux and GNU screen.
|
|
325
|
+
Zellij receives unwrapped requests and controls their forwarding through its own settings.
|
|
326
|
+
|
|
327
|
+
The bell is a separate alert byte, not a notification sequence.
|
|
328
|
+
An unsupported terminal receives no automatic sequence but can still handle the bell.
|
|
329
|
+
Your terminal or tmux bell settings can mute it or turn it into a visual alert.
|
|
330
|
+
Terminal notification permissions and focus rules can suppress display despite correct bytes.
|
|
331
|
+
Slate does not detect focus or override those rules.
|
|
332
|
+
|
|
333
|
+
When pi runs directly on Windows, its standard output is the Windows console.
|
|
334
|
+
Write order in that console has not been validated by hand.
|
|
335
|
+
Slate therefore makes no terminal compatibility claim for pi running directly on Windows.
|
|
336
|
+
|
|
337
|
+
### Native host delivery
|
|
338
|
+
|
|
339
|
+
Native delivery needs the host's desktop notification service and permission to show notifications.
|
|
340
|
+
A remote host without a desktop service can provide no native display.
|
|
341
|
+
Missing helpers, denied permission and delivery failures show no warning.
|
|
342
|
+
A native failure does not stop other channels.
|
|
343
|
+
|
|
344
|
+
| Host | Native route and prerequisites | Delivery attempt limit |
|
|
345
|
+
| --- | --- | --- |
|
|
346
|
+
| Linux | `notify-send` from an absolute search-path directory outside the project and `node_modules`. A desktop display and a user notification service must be available in pi's environment. | 5,000 milliseconds |
|
|
347
|
+
| macOS | `/usr/bin/osascript` uses the user's notification service. Check the notification permission for the sender on your machine. | 5,000 milliseconds |
|
|
348
|
+
| Windows | Windows PowerShell 5.1 at the system path. Slate uses the first case-insensitive exact-name Windows PowerShell entry in the Start applications folder for its registered application identity. | 10,000 milliseconds |
|
|
349
|
+
|
|
350
|
+
Windows uses the system's Start entry, not a universal application identifier.
|
|
351
|
+
The Start applications folder is the application list that `Get-StartApps` enumerates.
|
|
352
|
+
The production helper reads that folder directly and disables PowerShell module auto-loading.
|
|
353
|
+
|
|
354
|
+
A toast is a Windows desktop notification.
|
|
355
|
+
Hosted Windows checks read back toast history through the operating system.
|
|
356
|
+
History read-back proves retention, not visible presentation.
|
|
357
|
+
|
|
358
|
+
Libnotify is the library that supplies `notify-send` on Linux.
|
|
359
|
+
Linux native delivery requires a helper that supports `--app-name`.
|
|
360
|
+
Slate passes `--app-name=Slate` on every Linux native attempt.
|
|
361
|
+
Older stock `notify-send` helpers without `--app-name` reject Slate's `--app-name=Slate` argument before creating a notification.
|
|
362
|
+
Native delivery then fails without a warning.
|
|
363
|
+
|
|
364
|
+
A desktop entry is a file that identifies an application to the desktop environment.
|
|
365
|
+
On KDE Plasma, notifications use the application name `Slate` without a desktop entry, so Plasma applies its **Other Applications** notification settings.
|
|
366
|
+
The **Show in history** setting controls whether notifications stay in history, not whether visible banners appear.
|
|
367
|
+
|
|
368
|
+
Slate doubles body backslashes before the helper parses escape sequences.
|
|
369
|
+
Use [Check delivery by hand](#check-delivery-by-hand) to check local helper support and visible delivery.
|
|
370
|
+
|
|
371
|
+
### Phone push through ntfy
|
|
372
|
+
|
|
373
|
+
Ntfy is a notification server with phone applications that subscribe to topics.
|
|
374
|
+
A topic is a named destination that receives messages for its subscribers.
|
|
375
|
+
Put push destinations and credentials in the home file, normally `~/.pi/agent/slate.json`.
|
|
376
|
+
A trusted project cannot supply or replace them.
|
|
377
|
+
|
|
378
|
+
For a public-server check, choose a long random topic name and keep text generic:
|
|
379
|
+
|
|
380
|
+
```json
|
|
381
|
+
{
|
|
382
|
+
"notifications": {
|
|
383
|
+
"pushDetail": "generic",
|
|
384
|
+
"push": {
|
|
385
|
+
"enabled": true,
|
|
386
|
+
"server": "https://ntfy.sh",
|
|
387
|
+
"topic": "replace-with-random-topic"
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
Replace the topic placeholder before starting pi.
|
|
394
|
+
Install an ntfy phone application and subscribe to the same server and topic.
|
|
395
|
+
Allow phone notifications and follow the application's background-delivery instructions.
|
|
396
|
+
Start a new interactive pi session after saving the home file.
|
|
397
|
+
|
|
398
|
+
Follow [Check delivery by hand](#check-delivery-by-hand) to isolate push and check the effective settings.
|
|
399
|
+
The effective settings are the values Slate uses after resolving home and trusted project configuration.
|
|
400
|
+
Send a short prompt.
|
|
401
|
+
After the response settles, leave the session untouched for the effective `notifications.minimumDelayMs`, then allow time for delivery.
|
|
402
|
+
The default delay is 30 seconds.
|
|
403
|
+
Check actual phone receipt, not just a successful subscription.
|
|
404
|
+
|
|
405
|
+
A public topic is not private storage.
|
|
406
|
+
Anyone who knows its name may subscribe unless the server enforces access control.
|
|
407
|
+
A random name reduces accidental discovery but is not authentication.
|
|
408
|
+
The server can read and retain notification text.
|
|
409
|
+
HTTPS encrypts the network connection, not the message from the server.
|
|
410
|
+
Slate provides no end-to-end encryption between pi and your phone.
|
|
411
|
+
|
|
412
|
+
For private text, use an authenticated server that you host and control.
|
|
413
|
+
Configure the server to deny unauthenticated topic access.
|
|
414
|
+
Grant your account publish and subscribe access only to the required topic.
|
|
415
|
+
For example, use a server-issued access token in the home file:
|
|
416
|
+
|
|
417
|
+
```json
|
|
418
|
+
{
|
|
419
|
+
"notifications": {
|
|
420
|
+
"push": {
|
|
421
|
+
"enabled": true,
|
|
422
|
+
"server": "https://ntfy.example.com",
|
|
423
|
+
"topic": "slate-alerts",
|
|
424
|
+
"token": "replace-with-server-issued-token"
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
Configure the phone subscription with credentials that permit reading that topic.
|
|
431
|
+
Follow your server's mobile-delivery setup instructions.
|
|
432
|
+
Slate also accepts `username` and `password` instead of a token.
|
|
433
|
+
Supply both values. Do not combine the pair with a token.
|
|
434
|
+
Keep credentials out of project configuration and version control.
|
|
435
|
+
|
|
436
|
+
Push detail defaults to `generic` independently of `notifications.detail`.
|
|
437
|
+
Only a home-authorized higher `pushDetail` can disclose the folder name or agent message text.
|
|
438
|
+
At `message`, an error without agent text can also disclose provider error text.
|
|
439
|
+
On a public server, the server and other topic subscribers can read the added text.
|
|
440
|
+
A trusted project can lower push detail but cannot raise it.
|
|
441
|
+
|
|
442
|
+
#### Push validation and connection limits
|
|
443
|
+
|
|
444
|
+
- Topic names contain 1 to 64 ASCII letters, digits, underscores or hyphens.
|
|
445
|
+
- Credentials must be nonempty and contain no control characters.
|
|
446
|
+
- Tokens must also use characters allowed in HTTP headers.
|
|
447
|
+
- A username cannot contain `:`.
|
|
448
|
+
- A server address cannot contain embedded credentials, a query string or a fragment.
|
|
449
|
+
- Slate adds a trailing `/` to the server request path when needed.
|
|
450
|
+
- HTTPS supports remote servers. HTTP accepts only configured loopback names or addresses.
|
|
451
|
+
- An HTTP connection starts only when its selected resolved address is loopback.
|
|
452
|
+
- Slate tries one address per attempt, with no alternate-address retry or redirect.
|
|
453
|
+
- The push attempt limit is 5,000 milliseconds, including name lookup and connection work.
|
|
454
|
+
- Slate ignores proxy environment variables. Push does not work where a proxy is required.
|
|
455
|
+
|
|
456
|
+
Ordinary Node uses a child process for system lookup, which preserves hosts-file entries.
|
|
457
|
+
Bun and Node single executable applications use Domain Name System lookup, abbreviated DNS, instead.
|
|
458
|
+
A single executable application bundles Node and application code into one executable.
|
|
459
|
+
Those runtimes read no hosts file for push lookup.
|
|
460
|
+
They supply loopback answers for `localhost` and names below it without reading a hosts file or querying DNS.
|
|
461
|
+
Other names require DNS answers.
|
|
462
|
+
|
|
463
|
+
Invalid configuration warns at startup. Push delivery failures show no warning.
|
|
464
|
+
|
|
465
|
+
### Check delivery by hand
|
|
466
|
+
|
|
467
|
+
Sending, retention and visible presentation are different results:
|
|
468
|
+
|
|
469
|
+
- **Sending:** Slate writes terminal bytes, starts a native helper or sends a push request.
|
|
470
|
+
- **Retention:** A service keeps the notification in its history or store.
|
|
471
|
+
- **Visible presentation:** The user's desktop or phone shows the notification.
|
|
472
|
+
|
|
473
|
+
Correct terminal bytes do not prove that the terminal interpreted them.
|
|
474
|
+
Native history read-back does not prove a visible banner.
|
|
475
|
+
A server accepting push does not prove phone receipt.
|
|
476
|
+
Slate shows no warning for native or push delivery failure.
|
|
477
|
+
No failure warning does not mean delivery succeeded.
|
|
478
|
+
Configuration warnings still identify invalid settings.
|
|
479
|
+
|
|
480
|
+
Use the effective settings for each check, not just the defaults.
|
|
481
|
+
Slate resolves these values from home and trusted project configuration.
|
|
482
|
+
|
|
483
|
+
1. Enable the channel under test in home configuration. Turn the other channels off.
|
|
484
|
+
Use `notifications.terminal`, `notifications.native`, `notifications.bell` and `notifications.push.enabled` to select channels.
|
|
485
|
+
For push, also supply the home destination described in [Phone push through ntfy](#phone-push-through-ntfy).
|
|
486
|
+
2. Check trusted project configuration for settings that disable the selected channel.
|
|
487
|
+
Check `notifications.minimumDelayMs` and `notifications.cooldownMs` for timing overrides.
|
|
488
|
+
3. On Linux, check that `notify-send --help` lists `--app-name` before a native check.
|
|
489
|
+
A helper without that option cannot deliver Slate's native notification.
|
|
490
|
+
4. Start a new interactive session in a terminal with the required permissions.
|
|
491
|
+
Send a short prompt, such as `Reply with OK`.
|
|
492
|
+
5. After the response settles, leave the session untouched for the effective `notifications.minimumDelayMs`, then allow time for delivery.
|
|
493
|
+
The default delay is 30 seconds.
|
|
494
|
+
Check the intended desktop or phone for **Input needed**.
|
|
495
|
+
For a bell-only check, check the terminal's audible or visual bell instead.
|
|
496
|
+
6. Before checking a blocking extension dialog, wait for the effective `notifications.cooldownMs` to end after the previous input-needed attempt.
|
|
497
|
+
The default cooldown is 60 seconds.
|
|
498
|
+
If the attempt time is unknown, wait the full cooldown after step 5.
|
|
499
|
+
Open the dialog if one is available.
|
|
500
|
+
Leave it untouched for the effective `notifications.minimumDelayMs`, then allow time for delivery.
|
|
501
|
+
Check the selected channel, then answer the dialog.
|
|
502
|
+
|
|
503
|
+
A dialog wait that expires during the cooldown sends nothing.
|
|
504
|
+
Slate does not deliver that expired wait after the cooldown ends.
|
|
505
|
+
Timing or channel settings can cause silence even when delivery works.
|
|
506
|
+
|
|
507
|
+
Check operating system and terminal notification permissions if nothing appears.
|
|
508
|
+
Check Focus or Do Not Disturb settings, which can suppress visible alerts.
|
|
509
|
+
Check history separately from visible display.
|
|
510
|
+
For SSH, check the client desktop for terminal delivery and the host desktop for native delivery.
|
|
511
|
+
Repeat from an inactive tmux window with the documented passthrough permission.
|
|
512
|
+
|
|
513
|
+
Record the host, client, versions, settings and observed result.
|
|
514
|
+
Do not report unavailable checks as successful delivery.
|
|
75
515
|
|
|
76
516
|
## Extended example
|
|
77
517
|
|
|
@@ -91,7 +531,7 @@ The `docs/agents/...` values below are placeholders. Point them at Markdown file
|
|
|
91
531
|
"reviewPerspectivesPath": "docs/agents/review-perspectives.md",
|
|
92
532
|
"router": {
|
|
93
533
|
"models": { "include": ["luna-6", "claude-opus-5.5"] },
|
|
94
|
-
"compressor": { "models": [{ "model": "claude-sonnet-5", "effort": "medium" }] }
|
|
534
|
+
"compressor": { "models": [{ "model": "claude-sonnet-5.5", "effort": "medium" }] }
|
|
95
535
|
}
|
|
96
536
|
}
|
|
97
537
|
```
|