my-durable 0.0.40 → 0.0.41

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.
@@ -7,8 +7,8 @@
7
7
  <meta name="referrer" content="no-referrer" />
8
8
  <link rel="icon" type="image/svg+xml" href="/icons/durable-pi.svg" />
9
9
  <title>Durable Pi | Network</title>
10
- <script type="module" crossorigin src="/assets/index-jDhVa5sg.js"></script>
11
- <link rel="stylesheet" crossorigin href="/assets/index-DMJMesxP.css">
10
+ <script type="module" crossorigin src="/assets/index-DMb-n4O-.js"></script>
11
+ <link rel="stylesheet" crossorigin href="/assets/index-D6ClJqd8.css">
12
12
  </head>
13
13
  <body>
14
14
  <div id="app"></div>
@@ -7,6 +7,7 @@ import {
7
7
  PackageOpen,
8
8
  PiggyBank,
9
9
  CalendarClock,
10
+ Bell,
10
11
  GitBranch,
11
12
  ChevronDown,
12
13
  FolderOpen,
@@ -28,6 +29,7 @@ import GitPanel from "./GitPanel.vue";
28
29
  import HostPanel from "./HostPanel.vue";
29
30
  import UsagePanel from "./UsagePanel.vue";
30
31
  import SchedulesPanel from "./SchedulesPanel.vue";
32
+ import NotifyPanel from "./NotifyPanel.vue";
31
33
  import ExtensionsPanel from "./ExtensionsPanel.vue";
32
34
  import ContextBar from "./ContextBar.vue";
33
35
  import { deviceClient, message } from "../client/hub";
@@ -70,6 +72,7 @@ const tabs = [
70
72
  { id: "host", label: "Host", icon: Activity },
71
73
  { id: "usage", label: "Usage", icon: PiggyBank },
72
74
  { id: "auto", label: "Auto", icon: CalendarClock },
75
+ { id: "notify", label: "Notify", icon: Bell },
73
76
  { id: "state", label: "State", icon: Braces },
74
77
  { id: "tasks", label: "Tasks", icon: Activity },
75
78
  { id: "tools", label: "Tools", icon: Wrench },
@@ -441,6 +444,7 @@ const offeredTools = computed(() => detail.value?.tools.filter((t) => t.offered)
441
444
  <HostPanel v-if="ui.tab === 'host'" />
442
445
  <UsagePanel v-if="ui.tab === 'usage'" />
443
446
  <SchedulesPanel v-if="ui.tab === 'auto'" />
447
+ <NotifyPanel v-if="ui.tab === 'notify'" />
444
448
  <ExtensionsPanel v-if="ui.tab === 'extensions'" />
445
449
  <template v-if="ui.tab === 'tools'"
446
450
  ><div class="panel-heading">
@@ -0,0 +1,292 @@
1
+ <script setup lang="ts">
2
+ // Outbound notifications (Wave 2): webhook / ntfy sinks owned by the DEVICE.
3
+ // This panel only edits the records and can fire a test event; delivery happens
4
+ // on the device, so it works with no browser open.
5
+ import { computed, ref, watch } from "vue";
6
+ import { Bell, Plus, RefreshCw, Send, Trash2, Power } from "lucide-vue-next";
7
+ import type { NotifyDelivery, NotifySinkView } from "@sdk/api";
8
+ import { deviceClient, message } from "../client/hub";
9
+ import { notify, selected, ui } from "../client/store";
10
+
11
+ const sinks = ref<NotifySinkView[]>([]);
12
+ const busy = ref("");
13
+ const error = ref("");
14
+ const loading = ref(false);
15
+ const results = ref<NotifyDelivery[]>([]);
16
+ const deviceId = computed(() => selected.value?.deviceId);
17
+ const client = () => deviceClient(deviceId.value ?? "");
18
+
19
+ const adding = ref(false);
20
+ const draft = ref({ kind: "webhook" as "webhook" | "ntfy", url: "", label: "", events: "" });
21
+
22
+ async function load() {
23
+ if (!deviceId.value) return void (sinks.value = []);
24
+ loading.value = true;
25
+ error.value = "";
26
+ try {
27
+ sinks.value = (await client().notifySinks()).sinks;
28
+ } catch (e) {
29
+ const code = (e as { code?: string }).code;
30
+ error.value =
31
+ code === "not_found" || /allowlist/i.test(message(e))
32
+ ? "This device runs an older build: update it (`dpi update`) to use notifications."
33
+ : message(e).slice(0, 160);
34
+ } finally {
35
+ loading.value = false;
36
+ }
37
+ }
38
+ watch(deviceId, load, { immediate: true });
39
+
40
+ const when = (at?: number) => {
41
+ if (!at) return "never";
42
+ const mins = Math.round((Date.now() - at) / 60_000);
43
+ return mins < 1 ? "just now" : mins < 60 ? `${mins}m ago` : `${Math.round(mins / 60)}h ago`;
44
+ };
45
+
46
+ async function create() {
47
+ const d = draft.value;
48
+ if (!d.url.trim()) return;
49
+ busy.value = "new";
50
+ try {
51
+ await client().createNotifySink({
52
+ kind: d.kind,
53
+ url: d.url.trim(),
54
+ ...(d.label.trim() ? { label: d.label.trim() } : {}),
55
+ ...(d.events.trim()
56
+ ? { events: d.events.split(",").map((e) => e.trim()).filter(Boolean) }
57
+ : {}),
58
+ });
59
+ adding.value = false;
60
+ draft.value = { kind: "webhook", url: "", label: "", events: "" };
61
+ await load();
62
+ notify("Sink added on the device.");
63
+ } catch (e) {
64
+ notify(message(e).slice(0, 160));
65
+ } finally {
66
+ busy.value = "";
67
+ }
68
+ }
69
+
70
+ async function toggle(sink: NotifySinkView) {
71
+ busy.value = sink.id;
72
+ try {
73
+ await client().updateNotifySink(sink.id, { enabled: !sink.enabled });
74
+ await load();
75
+ } catch (e) {
76
+ notify(message(e).slice(0, 140));
77
+ } finally {
78
+ busy.value = "";
79
+ }
80
+ }
81
+
82
+ function remove(sink: NotifySinkView) {
83
+ ui.dialog = {
84
+ kind: "prompt",
85
+ title: `Remove this ${sink.kind} sink?`,
86
+ hint: "The device stops notifying this target. Nothing else changes.",
87
+ submit: "Remove sink",
88
+ danger: true,
89
+ run: async () => {
90
+ await client().removeNotifySink(sink.id);
91
+ await load();
92
+ },
93
+ };
94
+ }
95
+
96
+ async function test() {
97
+ busy.value = "test";
98
+ results.value = [];
99
+ try {
100
+ results.value = (await client().testNotifySinks()).results;
101
+ const failed = results.value.filter((r) => r.status === "failed").length;
102
+ notify(
103
+ results.value.length
104
+ ? `Test: ${results.value.length - failed} sent${failed ? `, ${failed} failed` : ""}.`
105
+ : "No enabled sinks matched — nothing was sent.",
106
+ );
107
+ } catch (e) {
108
+ notify(message(e).slice(0, 160));
109
+ } finally {
110
+ busy.value = "";
111
+ }
112
+ }
113
+ </script>
114
+
115
+ <template>
116
+ <section class="notify-panel" aria-label="Notification sinks">
117
+ <header class="panel-heading">
118
+ <span><Bell :size="16" />NOTIFY</span>
119
+ <button class="icon-button" :disabled="loading || !deviceId" aria-label="Refresh sinks" title="Refresh sinks" @click="load">
120
+ <RefreshCw :size="15" :class="{ spin: loading }" />
121
+ </button>
122
+ <button
123
+ class="icon-button"
124
+ :disabled="!deviceId || !sinks.length || busy === 'test'"
125
+ aria-label="Send a test notification"
126
+ title="Send a test event through every enabled sink"
127
+ @click="test"
128
+ >
129
+ <Send :size="15" />
130
+ </button>
131
+ <button class="icon-button" :disabled="!deviceId" aria-label="Add a sink" title="Add a sink" @click="adding = !adding">
132
+ <Plus :size="15" />
133
+ </button>
134
+ </header>
135
+
136
+ <p class="hint">Delivered by the device — no browser needs to be open.</p>
137
+ <p v-if="!deviceId" class="hint">Select a session to see its device.</p>
138
+ <p v-else-if="error" class="message-error">{{ error }}</p>
139
+
140
+ <form v-if="adding" class="add-form" @submit.prevent="create">
141
+ <label
142
+ >Kind
143
+ <select v-model="draft.kind">
144
+ <option value="webhook">webhook (JSON POST)</option>
145
+ <option value="ntfy">ntfy (topic)</option>
146
+ </select>
147
+ </label>
148
+ <label
149
+ >URL
150
+ <input v-model="draft.url" :placeholder="draft.kind === 'ntfy' ? 'https://ntfy.sh/my-topic' : 'https://example.com/hook'" required />
151
+ </label>
152
+ <label>Label<input v-model="draft.label" placeholder="phone" /></label>
153
+ <label
154
+ >Events
155
+ <input v-model="draft.events" placeholder="empty = all — e.g. session.failed,schedule.*" />
156
+ </label>
157
+ <div class="row">
158
+ <button class="primary small" type="submit" :disabled="busy === 'new'">
159
+ {{ busy === "new" ? "adding…" : "Add sink" }}
160
+ </button>
161
+ <button class="small" type="button" @click="adding = false">Cancel</button>
162
+ </div>
163
+ <p class="hint">LAN targets (192.168.x, localhost) need <code>DPI_NOTIFY_ALLOW_PRIVATE=1</code> on the device.</p>
164
+ </form>
165
+
166
+ <p v-if="!adding && !sinks.length && deviceId && !error" class="hint">
167
+ No sinks yet. Press + to add a webhook or an ntfy topic.
168
+ </p>
169
+
170
+ <ul v-if="sinks.length" class="sink-list">
171
+ <li v-for="s in sinks" :key="s.id" class="sink" :class="{ off: !s.enabled }">
172
+ <div class="head">
173
+ <span class="tag">{{ s.kind }}</span>
174
+ <b>{{ s.label || s.url }}</b>
175
+ <em class="next">{{ s.lastError ? `last failed` : `sent ${when(s.lastDeliveryAt)}` }}</em>
176
+ </div>
177
+ <code class="url">{{ s.url }}</code>
178
+ <p v-if="s.events?.length" class="hint">events: {{ s.events.join(", ") }}</p>
179
+ <p v-if="s.lastError" class="message-error">{{ s.lastError.slice(0, 160) }}</p>
180
+ <div class="row">
181
+ <button class="small" :disabled="busy === s.id" @click="toggle(s)">
182
+ <Power :size="12" />{{ s.enabled ? "disable" : "enable" }}
183
+ </button>
184
+ <button class="small danger" :disabled="busy === s.id" @click="remove(s)"><Trash2 :size="12" />remove</button>
185
+ </div>
186
+ </li>
187
+ </ul>
188
+
189
+ <ul v-if="results.length" class="results" aria-label="Test results">
190
+ <li v-for="r in results" :key="r.id" :class="r.status">
191
+ <span class="tag">{{ r.status }}</span> {{ r.kind }} {{ r.id.slice(0, 8) }}
192
+ <em v-if="r.detail">{{ r.detail }}</em>
193
+ </li>
194
+ </ul>
195
+ </section>
196
+ </template>
197
+
198
+ <style scoped>
199
+ .notify-panel {
200
+ display: flex;
201
+ flex-direction: column;
202
+ gap: 10px;
203
+ padding: 4px 2px 12px;
204
+ font-size: 16px;
205
+ }
206
+ .sink-list,
207
+ .results {
208
+ display: flex;
209
+ flex-direction: column;
210
+ gap: 8px;
211
+ margin: 0;
212
+ padding: 0;
213
+ list-style: none;
214
+ }
215
+ .sink {
216
+ display: flex;
217
+ flex-direction: column;
218
+ gap: 4px;
219
+ padding: 8px 10px;
220
+ border: 1px solid var(--line);
221
+ border-radius: 10px;
222
+ }
223
+ .sink.off {
224
+ opacity: 0.6;
225
+ }
226
+ .sink .head {
227
+ display: flex;
228
+ align-items: center;
229
+ gap: 6px;
230
+ flex-wrap: wrap;
231
+ }
232
+ .sink .next {
233
+ margin-left: auto;
234
+ font-style: normal;
235
+ font-size: 13px;
236
+ opacity: 0.7;
237
+ }
238
+ .sink .url,
239
+ .url {
240
+ font-size: 13px;
241
+ opacity: 0.7;
242
+ word-break: break-all;
243
+ }
244
+ .sink .row,
245
+ .add-form .row {
246
+ display: flex;
247
+ gap: 6px;
248
+ flex-wrap: wrap;
249
+ }
250
+ .results li {
251
+ display: flex;
252
+ align-items: center;
253
+ gap: 6px;
254
+ font-size: 15px;
255
+ }
256
+ .results li.failed {
257
+ color: var(--warn, #e5a50a);
258
+ }
259
+ .add-form {
260
+ display: flex;
261
+ flex-direction: column;
262
+ gap: 8px;
263
+ padding: 10px;
264
+ border: 1px solid var(--line);
265
+ border-radius: 10px;
266
+ }
267
+ .add-form label {
268
+ display: flex;
269
+ flex-direction: column;
270
+ gap: 3px;
271
+ font-size: 13px;
272
+ opacity: 0.85;
273
+ }
274
+ .add-form input,
275
+ .add-form select {
276
+ font: inherit;
277
+ font-size: 15px;
278
+ padding: 5px 8px;
279
+ color: var(--fg);
280
+ background: transparent;
281
+ border: 1px solid var(--line);
282
+ border-radius: 8px;
283
+ }
284
+ .spin {
285
+ animation: spin 1s linear infinite;
286
+ }
287
+ @keyframes spin {
288
+ to {
289
+ transform: rotate(360deg);
290
+ }
291
+ }
292
+ </style>
@@ -215,6 +215,60 @@ export interface ProjectPatchBody {
215
215
  labels?: string[];
216
216
  }
217
217
 
218
+ /** What a live model probe found. `status` is what a picker can show as a hint. */
219
+ export interface ModelProbe {
220
+ ok: boolean;
221
+ detail: string;
222
+ /** "rate_limited" is the actionable one: the model works, you must wait. */
223
+ status?: "rate_limited" | "auth" | "missing" | "error";
224
+ /** From a provider's Retry-After, when it said so. */
225
+ retryAfterMs?: number;
226
+ }
227
+
228
+ /** One outbound notification target on the device (webhook or ntfy). */
229
+ export type NotifySinkKind = "webhook" | "ntfy";
230
+
231
+ export interface NotifySinkRecord {
232
+ id: string;
233
+ kind: NotifySinkKind;
234
+ url: string;
235
+ enabled: boolean;
236
+ /** Empty/absent = every event; supports `schedule.*` wildcards. */
237
+ events?: string[];
238
+ label?: string;
239
+ priority?: "min" | "low" | "default" | "high" | "max";
240
+ tags?: string[];
241
+ createdAt: number;
242
+ updatedAt: number;
243
+ lastDeliveryAt?: number;
244
+ lastError?: string;
245
+ lastStatus?: number;
246
+ }
247
+
248
+ /** What a UI shows: the record plus live cooldown state. */
249
+ export interface NotifySinkView extends NotifySinkRecord {
250
+ silencedUntil: number | null;
251
+ }
252
+
253
+ export interface NotifySinkBody {
254
+ kind: NotifySinkKind;
255
+ url: string;
256
+ enabled?: boolean;
257
+ events?: string[];
258
+ label?: string;
259
+ priority?: NotifySinkRecord["priority"];
260
+ tags?: string[];
261
+ }
262
+
263
+ /** Per-sink result of one fan-out (also what `POST /v1/notify/test` returns). */
264
+ export interface NotifyDelivery {
265
+ id: string;
266
+ kind: NotifySinkKind;
267
+ status: "sent" | "skipped" | "failed";
268
+ detail?: string;
269
+ ms?: number;
270
+ }
271
+
218
272
  /** A scheduled session: the device owns the clock, the hub only displays it. */
219
273
  export interface ScheduleModelRef {
220
274
  provider: string;
@@ -14,6 +14,9 @@ import type {
14
14
  ForkBody,
15
15
  Frame,
16
16
  DeviceUsageReport,
17
+ NotifyDelivery,
18
+ NotifySinkBody,
19
+ NotifySinkView,
17
20
  Page,
18
21
  ProjectPatchBody,
19
22
  ProjectRecord,
@@ -226,6 +229,23 @@ export class DpiClient {
226
229
  unarchiveProject(id: string) {
227
230
  return this.request<ProjectRecord>("POST", `/v1/projects/${enc(id)}/unarchive`, {});
228
231
  }
232
+ /** Outbound notification sinks (webhook/ntfy) on this device. */
233
+ notifySinks() {
234
+ return this.request<{ sinks: NotifySinkView[] }>("GET", "/v1/notify/sinks");
235
+ }
236
+ createNotifySink(input: NotifySinkBody) {
237
+ return this.request<NotifySinkView>("POST", "/v1/notify/sinks", input);
238
+ }
239
+ updateNotifySink(id: string, patch: Partial<NotifySinkBody>) {
240
+ return this.request<NotifySinkView>("PATCH", `/v1/notify/sinks/${enc(id)}`, patch);
241
+ }
242
+ removeNotifySink(id: string) {
243
+ return this.request<{ removed: boolean }>("DELETE", `/v1/notify/sinks/${enc(id)}`);
244
+ }
245
+ /** Fire a test event through every enabled sink. */
246
+ testNotifySinks() {
247
+ return this.request<{ results: NotifyDelivery[] }>("POST", "/v1/notify/test", {});
248
+ }
229
249
  /** Scheduled sessions on this device (device-owned clock). */
230
250
  schedules() {
231
251
  return this.request<{ schedules: ScheduleView[] }>("GET", "/v1/schedules");
@@ -25,6 +25,12 @@ const ROUTES: readonly (readonly [method: string, pattern: string])[] = [
25
25
  ["POST", "/projects/:id/archive"],
26
26
  ["POST", "/projects/:id/unarchive"],
27
27
 
28
+ ["GET", "/notify/sinks"],
29
+ ["POST", "/notify/sinks"],
30
+ ["PATCH", "/notify/sinks/:id"],
31
+ ["DELETE", "/notify/sinks/:id"],
32
+ ["POST", "/notify/test"],
33
+
28
34
  ["GET", "/schedules"],
29
35
  ["POST", "/schedules"],
30
36
  ["PATCH", "/schedules/:id"],
package/bin/dpi.mjs CHANGED
@@ -4,6 +4,7 @@
4
4
  // dpi device [start|stop|status|install|uninstall] device-side daemon
5
5
  // dpi tui terminal admin client
6
6
  // dpi schedule [list|add|enable|disable|run|remove] scheduled sessions
7
+ // dpi notify [list|add|enable|disable|remove|test] outbound notifications
7
8
  // dpi gc --closed-before 30d [--dry-run|--yes] retention (dry-run default)
8
9
  // dpi doctor [--json] [--quiet] one-shot device health check
9
10
  // Every subcommand runs the TypeScript entry through tsx, so no build step is needed.
@@ -147,6 +148,12 @@ if (command === "update" || command === "upgrade") {
147
148
  register();
148
149
  const { scheduleCli } = await import("../apps/dpi-backend/src/schedule-cli.ts");
149
150
  process.exit(await scheduleCli(commandRest));
151
+ } else if (command === "notify") {
152
+ // Outbound fan-out: the CLI edits the device's sinks over its own API.
153
+ const { register } = await loadTsx();
154
+ register();
155
+ const { notifyCli } = await import("../apps/dpi-backend/src/notify-cli.ts");
156
+ process.exit(await notifyCli(commandRest));
150
157
  } else if (command === "gc") {
151
158
  // Retention: dry-run unless --yes. Never runs on its own (policy gate #3).
152
159
  const { register } = await loadTsx();
@@ -1,7 +1,7 @@
1
1
  # Host / Project / Device / Session Management Feature Checklist — orca / paseo / zcode / herdr / piggery → durable-pi
2
2
 
3
3
  Run: `team_20261024143910_47d06fe8b77400d4` · Steps: 01_explore (inventory) → 02_analyze (verify/correct) → 03_write (this file)
4
- Status: **Waves 1a+1b+2 ADOPTED (0.0.40 — live-verified in production Chrome: bell+panel, usage chip+total row, transcript download, prompt library, bulk select bar, recent-cwds chips; Host vitals with real uptime/load/memory/disk, tunnel-routed session search, and a bundle zip that real `unzip` opens).** Remaining: notification fan-out, env UI, backup/restore, rate-limit surfacing, per-project settings (Wave 2 SHOULDs) and Wave 3. Policy gates #1/#2/#4 are still open; #3 is implemented as manual-only GC (no defaults, no timer). Companion to `docs/git-ui-checklist.md` (CLOSED): that file covered the git panel; this one covers everything **around** the agent runtime — projects/workspaces, host/device management, session lifecycle, config/credentials, diagnostics, maintenance. Git-panel features are deliberately absent here. Every load-bearing citation below was re-read in the actual files during this run (see [Verification log](#verification-log)).
4
+ Status: **Waves 1a+1b+2 ADOPTED (0.0.41 — live-verified in production Chrome: bell+panel, usage chip+total row, transcript download, prompt library, bulk select bar, recent-cwds chips; Host vitals with real uptime/load/memory/disk, tunnel-routed session search, and a bundle zip that real `unzip` opens).** Remaining: env UI, backup/restore, per-project settings (Wave 2 SHOULDs) and Wave 3. Policy gates #1/#2/#4 are still open; #3 is implemented as manual-only GC (no defaults, no timer). Companion to `docs/git-ui-checklist.md` (CLOSED): that file covered the git panel; this one covers everything **around** the agent runtime — projects/workspaces, host/device management, session lifecycle, config/credentials, diagnostics, maintenance. Git-panel features are deliberately absent here. Every load-bearing citation below was re-read in the actual files during this run (see [Verification log](#verification-log)).
5
5
 
6
6
  ## Why this doc exists
7
7
 
@@ -136,12 +136,12 @@ None of them blocks Wave 1.
136
136
  | MUST | Project entity + labels + archive | paseo `workspace-registry.ts:22-40` (`PersistedProjectRecord`: projectId/rootPath/kind/displayName/projectKey with COMPAT migration, customName; atomic writes via `atomic-file.ts`); zcode `packages/services/src/project/CONTRACT.md` + `autoArchiveScheduler.ts` | ✅ (`0.0.39`) | `projects.ts`: atomic 0600 registry with `.bak` + v0→v1 COMPAT migration, customName/labels/archive; seeded from every session cwd on boot and on create. FE `ProjectBar.vue` chips filter the tree, name/labels/archive through the app-styled prompt |
137
137
  | MUST | Scheduled sessions (device-side) | orca `automations/service.ts:186-211` (scheduled trigger, precheck, completion watcher; separate drift report) | ✅ (`0.0.40`) | `schedules.ts` registry + a 30 s unref'd device loop (`store.ts`): a run creates a **fresh session** (`<name> · <time>`), sends the prompt, records the outcome. `dpi schedule list/add/enable/disable/run/remove`; Inspector **Auto** tab. Live: run → `ok`, next run computed |
138
138
  | MUST | Usage dashboard | orca `usage/agent-token-usage.ts` + `usage-calendar-range.ts` (46-file suite incl. per-provider parsers) | ✅ (`0.0.39`) | GET `/device/usage` sums each harness's usage per session/model/project; Inspector **Usage** tab. Live: 4,307 tok → `opencode-go/claude-haiku-5-5`, attributed to its project. No calendar/persistence yet (archived sessions are closed stores) |
139
- | SHOULD | Notification delivery fan-out | orca `notification-delivery-service.ts:15-49` (tray→mobile→desktop, burst cooldown); piggery notify hooks desktop/herdr/ntfy (`docs/reference.md:15`) | ❌ | webhook + ntfy targets driven from existing events; per-device cooldown like orca's |
139
+ | SHOULD | Notification delivery fan-out | orca `notification-delivery-service.ts:15-49` (tray→mobile→desktop, burst cooldown); piggery notify hooks desktop/herdr/ntfy (`docs/reference.md:15`) | ✅ (`0.0.41`) | `notify-sinks.ts`: webhook + ntfy sinks, per-(sink,event-kind) 10 s cooldown, SSRF guard with `DPI_NOTIFY_ALLOW_PRIVATE=1` for LAN. Events: `session.failed`, `schedule.ok`, `schedule.failed`, `test`. `dpi notify list/add/enable/disable/remove/test/events`; Inspector **Notify** tab. Live: ntfy.sh received the test sent from the panel |
140
140
  | SHOULD | Env-var management UI | orca `settings/HostAgentEnvironmentEditor.tsx` + `agent-default-env-draft.ts` | ❌ | edit the `env`/`env_keys` blocks of `dpi-network.yaml` (the file that generates `backend.env`, `dpi-network.example.yaml:23-30`) |
141
141
  | MUST | Retention / auto-GC — **policy #3** | orca `terminal-history-gc.ts`; piggery `gc --closed-before DURATION [--dry-run]` (`docs/reference.md:31`) | ✅ manual-only (`0.0.40`) | `gc.ts` + `dpi gc --closed-before 30d [--yes]`: **dry-run is the default and nothing schedules itself** — the retention policy stays the operator's call (gate #3 remains open for defaults) |
142
142
  | SHOULD | Remote update badge — **policy #4** | orca `ssh/managed-server-update-check.ts` + `orcad-update-plan.ts` | ✅ (`0.0.40`) | `GET /api/version` (hub walks up to the `my-durable` package.json) + device `packageVersion` in `/v1/device` → tree badge "update". Hint only: devices self-update, the hub never pushes code. Verified 0 badges when versions match, and the 1.3.0-vs-0.0.39 trap (pi-durable's version) is fixed by reporting both |
143
143
  | SHOULD | Backup/restore of session data | orca `rolling-file-backup.ts`; paseo `migrations/` (schema side) | ❌ | rolling copies of registry + device store ahead of schema migrations |
144
- | SHOULD | Rate-limit surfacing | orca `rate-limits/` | ❌ | parse provider 429/limit info at probe/send time → hint in model picker |
144
+ | SHOULD | Rate-limit surfacing | orca `rate-limits/` | ✅ device-side (`0.0.41`) | `classifyProviderError`: 429/quota → `rate_limited` (+`retryAfterMs` from Retry-After), 401/403 → `auth`, 404 → `missing`; `probeModel` returns the provider's own words, `dpi doctor` prints "rate limited — retry in 30s" / "provider key rejected". **Not** in the web picker: `probe-model` is deliberately local-only (never tunnelled), so the FE cannot probe |
145
145
  | SHOULD | Per-project settings/instructions | orca `settings/RepositoryPane.tsx` | ❌ | after the project entity: per-project model/env defaults |
146
146
 
147
147
  ## Wave 3 — differentiators / later
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-durable",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "description": "Durable Pi — the durable agent network: hub web UI, device backend daemon, TUI admin and the shared SDK, packaged as one runnable monorepo install",
5
5
  "license": "MIT",
6
6
  "repository": {