my-durable 0.0.38 → 0.0.39

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.
@@ -0,0 +1,406 @@
1
+ <script setup lang="ts">
2
+ // Inspector USAGE tab — what the selected device has actually spent: the whole
3
+ // device rollup (totals, by model, by project, by session), not just this
4
+ // session's usage chip. Asked for when the tab is opened — no polling, matching
5
+ // the lazy host tab. The API already sorts each list by cost, desc.
6
+ import { computed, ref, watch } from "vue";
7
+ import { Activity, Cpu, FolderGit2, RefreshCw } from "lucide-vue-next";
8
+ import type { DeviceUsageReport } from "@sdk/api";
9
+ import { deviceClient, message } from "../client/hub";
10
+ import { notify, selected } from "../client/store";
11
+
12
+ const usage = ref<DeviceUsageReport>();
13
+ const busy = ref(false);
14
+ const error = ref("");
15
+
16
+ const deviceId = computed(() => selected.value?.deviceId);
17
+
18
+ /** Same numbers, same shapes as the TopBar usage chip: thousands separators and
19
+ * four decimals of dollars — cents are too coarse for cache reads. */
20
+ const tokens = (n: number) => Math.round(n || 0).toLocaleString("en-US");
21
+ /** Sub-cent costs are real here (one small turn is $0.0000467): fixed 4dp
22
+ * would print $0.0000, so small non-zero amounts keep their significant digits. */
23
+ const cost = (n: number) => {
24
+ const v = n || 0;
25
+ if (v === 0) return "$0.0000";
26
+ if (v < 0.0001) return `$${v.toPrecision(2)}`;
27
+ if (v < 0.01) return `$${v.toFixed(6)}`;
28
+ return `$${v.toFixed(4)}`;
29
+ };
30
+ /** Compact form for the per-type columns, where the magnitude matters more than
31
+ * the last digit and the row must stay one line. */
32
+ /** Shares are relative to the biggest model — a device-wide bar chart. */
33
+ const topModelCost = computed(() =>
34
+ (usage.value?.models ?? []).reduce((max, m) => Math.max(max, m.cost || 0), 0),
35
+ );
36
+ const share = (value: number) =>
37
+ topModelCost.value > 0 ? Math.max(0, Math.min(100, Math.round(((value || 0) / topModelCost.value) * 100))) : 0;
38
+
39
+ const empty = computed(() => {
40
+ const u = usage.value;
41
+ return !u || (!u.models.length && !u.sessions.length && !u.projects.length);
42
+ });
43
+ const readAt = computed(() =>
44
+ usage.value ? new Date(usage.value.at).toLocaleTimeString("en-US", { hour: "2-digit", minute: "2-digit" }) : "",
45
+ );
46
+ const plural = (n: number, one: string) => `${tokens(n)} ${one}${n === 1 ? "" : "s"}`;
47
+
48
+ async function load() {
49
+ const id = deviceId.value;
50
+ usage.value = undefined;
51
+ error.value = "";
52
+ if (!id) return;
53
+ busy.value = true;
54
+ try {
55
+ usage.value = await deviceClient(id).deviceUsage();
56
+ } catch (e) {
57
+ error.value = message(e).slice(0, 160);
58
+ } finally {
59
+ busy.value = false;
60
+ }
61
+ }
62
+
63
+ watch(deviceId, load, { immediate: true });
64
+
65
+ async function refresh() {
66
+ await load();
67
+ if (!error.value) notify("Usage refreshed.");
68
+ }
69
+ </script>
70
+
71
+ <template>
72
+ <section class="usage-panel" aria-label="Device usage">
73
+ <header class="panel-heading">
74
+ <span><Activity :size="16" />USAGE</span>
75
+ <button
76
+ class="icon-button"
77
+ :disabled="busy || !deviceId"
78
+ aria-label="Refresh usage"
79
+ title="Refresh usage"
80
+ @click="refresh"
81
+ >
82
+ <RefreshCw :size="15" :class="{ spin: busy }" />
83
+ </button>
84
+ </header>
85
+
86
+ <p v-if="!deviceId" class="hint">Select a session to see its device's usage.</p>
87
+ <p v-else-if="error" class="message-error">{{ error }}</p>
88
+ <p v-else-if="!usage" class="hint">{{ busy ? "Reading usage…" : "No usage recorded yet." }}</p>
89
+ <p v-else-if="empty" class="hint">No usage recorded yet.</p>
90
+
91
+ <template v-else>
92
+ <!-- 1 · TOTALS -->
93
+ <section class="usage-block" aria-labelledby="usage-totals">
94
+ <div class="section-label block-label"><span id="usage-totals">TOTALS</span></div>
95
+ <div class="totals">
96
+ <div class="total">
97
+ <span class="label">Tokens</span>
98
+ <strong>{{ tokens(usage.totals.tokens) }}</strong>
99
+ </div>
100
+ <div class="total">
101
+ <span class="label">Cost</span>
102
+ <strong>{{ cost(usage.totals.cost) }}</strong>
103
+ </div>
104
+ <div class="total">
105
+ <span class="label">Sessions</span>
106
+ <strong>{{ tokens(usage.sessions.length) }}</strong>
107
+ <em>{{ tokens(usage.projects.length) }} projects</em>
108
+ </div>
109
+ <div class="total">
110
+ <span class="label">Models</span>
111
+ <strong>{{ tokens(usage.models.length) }}</strong>
112
+ <em>costliest first</em>
113
+ </div>
114
+ </div>
115
+ </section>
116
+
117
+ <!-- 2 · BY MODEL -->
118
+ <section class="usage-block" aria-labelledby="usage-models">
119
+ <div class="section-label block-label">
120
+ <span id="usage-models">BY MODEL</span><Cpu :size="13" />
121
+ </div>
122
+ <div class="table-scroll">
123
+ <table class="usage-table" aria-label="Usage by model">
124
+ <colgroup>
125
+ <col /><col /><col /><col />
126
+ </colgroup>
127
+ <thead>
128
+ <tr>
129
+ <th scope="col">Model</th>
130
+ <th scope="col" class="num">Tokens</th>
131
+ <th scope="col" class="num">Cost</th>
132
+ <th scope="col" class="share-col">Share</th>
133
+ </tr>
134
+ </thead>
135
+ <tbody>
136
+ <tr v-for="m in usage.models" :key="m.key">
137
+ <th
138
+ scope="row"
139
+ class="model-key"
140
+ :title="`${m.key} — in ${m.input} · out ${m.output} · cache read ${m.cacheRead} · cache write ${m.cacheWrite}`"
141
+ >
142
+ {{ m.key }}
143
+ </th>
144
+ <td class="num">{{ tokens(m.tokens) }}</td>
145
+ <td class="num">{{ cost(m.cost) }}</td>
146
+ <td class="share-col">
147
+ <div class="share">
148
+ <div
149
+ class="bar"
150
+ role="meter"
151
+ :aria-valuenow="share(m.cost)"
152
+ aria-valuemin="0"
153
+ aria-valuemax="100"
154
+ :aria-label="`${m.key} share of the costliest model`"
155
+ >
156
+ <i :style="{ width: `${share(m.cost)}%` }" :class="{ high: share(m.cost) > 90 }" />
157
+ </div>
158
+ <em class="pct">{{ share(m.cost) }}%</em>
159
+ </div>
160
+ </td>
161
+ </tr>
162
+ </tbody>
163
+ </table>
164
+ </div>
165
+ </section>
166
+
167
+ <!-- 3a · BY PROJECT -->
168
+ <section class="usage-block" aria-labelledby="usage-projects">
169
+ <div class="section-label block-label">
170
+ <span id="usage-projects">BY PROJECT</span><FolderGit2 :size="13" />
171
+ </div>
172
+ <p v-if="!usage.projects.length" class="hint">No project usage recorded yet.</p>
173
+ <ul v-else class="rows">
174
+ <li v-for="p in usage.projects" :key="p.rootPath" class="row" :title="p.rootPath">
175
+ <span class="row-main">
176
+ <strong>{{ p.name }}</strong>
177
+ <em>{{ p.rootPath }}</em>
178
+ </span>
179
+ <span class="row-num">{{ tokens(p.tokens) }} tok</span>
180
+ <span class="row-num">{{ cost(p.cost) }}</span>
181
+ <span class="row-meta">{{ plural(p.sessions, "session") }}</span>
182
+ </li>
183
+ </ul>
184
+ </section>
185
+
186
+ <!-- 3b · BY SESSION -->
187
+ <section class="usage-block" aria-labelledby="usage-sessions">
188
+ <div class="section-label block-label"><span id="usage-sessions">BY SESSION</span></div>
189
+ <p v-if="!usage.sessions.length" class="hint">No session usage recorded yet.</p>
190
+ <ul v-else class="rows scroll">
191
+ <li v-for="s in usage.sessions" :key="s.id" class="row" :title="s.cwd">
192
+ <span class="row-main">
193
+ <strong>{{ s.name }}</strong>
194
+ <em>{{ s.project ?? s.cwd }}</em>
195
+ </span>
196
+ <span class="row-num">{{ tokens(s.tokens) }} tok</span>
197
+ <span class="row-num">{{ cost(s.cost) }}</span>
198
+ <span class="row-meta">{{ plural(s.agents, "agent") }}</span>
199
+ </li>
200
+ </ul>
201
+ </section>
202
+
203
+ <p class="hint">
204
+ <Activity :size="13" /> Read on demand — open this tab or press refresh ({{ readAt }}). Nothing polls the
205
+ device.
206
+ </p>
207
+ </template>
208
+ </section>
209
+ </template>
210
+
211
+ <style scoped>
212
+ .usage-panel {
213
+ display: flex;
214
+ flex-direction: column;
215
+ gap: 10px;
216
+ padding: 4px 2px 12px;
217
+ font-size: 16px;
218
+ }
219
+ .usage-block {
220
+ display: flex;
221
+ flex-direction: column;
222
+ gap: 8px;
223
+ }
224
+ .block-label {
225
+ font-size: 13px;
226
+ text-transform: uppercase;
227
+ letter-spacing: 0.04em;
228
+ color: var(--fg-dim, var(--fg));
229
+ opacity: 0.72;
230
+ margin-bottom: 0;
231
+ align-items: center;
232
+ }
233
+ .totals {
234
+ display: grid;
235
+ grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
236
+ gap: 10px;
237
+ }
238
+ .total {
239
+ display: flex;
240
+ flex-direction: column;
241
+ gap: 2px;
242
+ padding: 10px 12px;
243
+ border: 1px solid var(--line);
244
+ border-radius: 10px;
245
+ }
246
+ .total .label {
247
+ color: var(--fg-dim, var(--fg));
248
+ opacity: 0.72;
249
+ font-size: 13px;
250
+ text-transform: uppercase;
251
+ letter-spacing: 0.04em;
252
+ }
253
+ .total strong {
254
+ font-size: 18px;
255
+ font-variant-numeric: tabular-nums;
256
+ }
257
+ .total em {
258
+ font-style: normal;
259
+ font-size: 13px;
260
+ opacity: 0.7;
261
+ }
262
+ .table-scroll {
263
+ overflow-x: auto;
264
+ border: 1px solid var(--line);
265
+ border-radius: 10px;
266
+ }
267
+ .usage-table {
268
+ width: 100%;
269
+ table-layout: fixed;
270
+ border-collapse: collapse;
271
+ font-size: 14px;
272
+ border: 0;
273
+ }
274
+ .usage-table th,
275
+ .usage-table td {
276
+ padding: 6px 8px;
277
+ text-align: left;
278
+ border-bottom: 1px solid var(--line);
279
+ white-space: nowrap;
280
+ }
281
+ .usage-table thead th {
282
+ font-size: 13px;
283
+ font-weight: 500;
284
+ text-transform: uppercase;
285
+ letter-spacing: 0.04em;
286
+ color: var(--fg-dim, var(--fg));
287
+ opacity: 0.72;
288
+ }
289
+ .usage-table tbody tr:last-child th,
290
+ .usage-table tbody tr:last-child td {
291
+ border-bottom: 0;
292
+ }
293
+ .usage-table .num {
294
+ text-align: right;
295
+ font-variant-numeric: tabular-nums;
296
+ }
297
+ .usage-table .dim {
298
+ opacity: 0.7;
299
+ }
300
+ /* A 390px inspector cannot hold four full-width columns: fixed layout plus a
301
+ single-line ellipsis, with the full figures in the row's tooltip. */
302
+ .usage-table col:nth-child(1) { width: 44%; }
303
+ .usage-table col:nth-child(2) { width: 17%; }
304
+ .usage-table col:nth-child(3) { width: 15%; }
305
+ .usage-table col:nth-child(4) { width: 24%; }
306
+ .model-key {
307
+ font-weight: 600;
308
+ white-space: nowrap;
309
+ overflow: hidden;
310
+ text-overflow: ellipsis;
311
+ }
312
+
313
+ .share {
314
+ display: flex;
315
+ align-items: center;
316
+ gap: 6px;
317
+ }
318
+ .share .bar {
319
+ flex: 1;
320
+ height: 6px;
321
+ border-radius: 999px;
322
+ background: var(--line);
323
+ overflow: hidden;
324
+ }
325
+ .share .bar i {
326
+ display: block;
327
+ height: 100%;
328
+ background: var(--accent);
329
+ transition: width 0.3s ease;
330
+ }
331
+ .share .bar i.high {
332
+ background: var(--warn, #e5a50a);
333
+ }
334
+ .share .pct {
335
+ font-style: normal;
336
+ font-size: 13px;
337
+ opacity: 0.72;
338
+ font-variant-numeric: tabular-nums;
339
+ width: 4ch;
340
+ text-align: right;
341
+ }
342
+ .rows {
343
+ display: flex;
344
+ flex-direction: column;
345
+ gap: 2px;
346
+ margin: 0;
347
+ padding: 4px 10px;
348
+ list-style: none;
349
+ border: 1px solid var(--line);
350
+ border-radius: 10px;
351
+ }
352
+ .rows.scroll {
353
+ max-height: 280px;
354
+ overflow: auto;
355
+ }
356
+ .row {
357
+ display: flex;
358
+ align-items: center;
359
+ gap: 10px;
360
+ padding: 4px 0;
361
+ font-size: 14px;
362
+ }
363
+ .row + .row {
364
+ border-top: 1px solid var(--line);
365
+ }
366
+ .row-main {
367
+ display: flex;
368
+ flex-direction: column;
369
+ gap: 1px;
370
+ flex: 1;
371
+ min-width: 0;
372
+ }
373
+ .row-main strong {
374
+ font-weight: 600;
375
+ overflow: hidden;
376
+ text-overflow: ellipsis;
377
+ white-space: nowrap;
378
+ }
379
+ .row-main em {
380
+ font-style: normal;
381
+ font-size: 13px;
382
+ opacity: 0.65;
383
+ overflow: hidden;
384
+ text-overflow: ellipsis;
385
+ white-space: nowrap;
386
+ }
387
+ .row-num {
388
+ font-variant-numeric: tabular-nums;
389
+ white-space: nowrap;
390
+ }
391
+ .row-meta {
392
+ font-size: 13px;
393
+ opacity: 0.72;
394
+ white-space: nowrap;
395
+ min-width: 9ch;
396
+ text-align: right;
397
+ }
398
+ .spin {
399
+ animation: spin 1s linear infinite;
400
+ }
401
+ @keyframes spin {
402
+ to {
403
+ transform: rotate(360deg);
404
+ }
405
+ }
406
+ </style>
@@ -189,6 +189,60 @@ export function compactionThresholds(window: number, s: CompactionSettings) {
189
189
  return { wait, auto: s.backgroundTokens > 0 ? Math.max(0, wait - s.backgroundTokens) : undefined };
190
190
  }
191
191
 
192
+ /** A project: a root a session starts in, promoted to an entity (paseo model). */
193
+ export type ProjectKind = "git" | "plain";
194
+
195
+ export interface ProjectRecord {
196
+ id: string;
197
+ /** Absolute path of the root; sessions under it belong to this project. */
198
+ rootPath: string;
199
+ /** Derived display name (basename); never empty. */
200
+ name: string;
201
+ /** Human override; wins over `name` and survives reconciliation. */
202
+ customName?: string;
203
+ /** Free-form filters, lowercase; at most 12 per project. */
204
+ labels: string[];
205
+ kind: ProjectKind;
206
+ createdAt: string;
207
+ updatedAt: string;
208
+ archivedAt: string | null;
209
+ }
210
+
211
+ export interface ProjectPatchBody {
212
+ customName?: string;
213
+ labels?: string[];
214
+ }
215
+
216
+ /** Device usage rollup over the sessions it still holds (archived are closed). */
217
+ export interface DeviceUsageReport {
218
+ at: number;
219
+ totals: { tokens: number; cost: number };
220
+ models: Array<{
221
+ key: string;
222
+ tokens: number;
223
+ cost: number;
224
+ input: number;
225
+ output: number;
226
+ cacheRead: number;
227
+ cacheWrite: number;
228
+ inputCost: number;
229
+ outputCost: number;
230
+ cacheReadCost: number;
231
+ cacheWriteCost: number;
232
+ }>;
233
+ sessions: Array<{
234
+ id: string;
235
+ name: string;
236
+ cwd: string;
237
+ /** Project display name when the cwd resolves to a registered root. */
238
+ project?: string;
239
+ tokens: number;
240
+ cost: number;
241
+ agents: number;
242
+ }>;
243
+ projects: Array<{ rootPath: string; name: string; tokens: number; cost: number; sessions: number }>;
244
+ }
245
+
192
246
  /** One device's live host health — asked for on demand, never polled. */
193
247
  export interface DeviceVitals {
194
248
  /** Seconds the host has been up. */
@@ -13,7 +13,10 @@ import type {
13
13
  ErrorCode,
14
14
  ForkBody,
15
15
  Frame,
16
+ DeviceUsageReport,
16
17
  Page,
18
+ ProjectPatchBody,
19
+ ProjectRecord,
17
20
  SendResult,
18
21
  SessionSearchResult,
19
22
  SessionSummary,
@@ -204,6 +207,27 @@ export class DpiClient {
204
207
  tree() {
205
208
  return this.request<DeviceTree>("GET", "/v1/tree");
206
209
  }
210
+ /** Projects on this device: roots with labels, custom names and archive state. */
211
+ projects(includeArchived = false) {
212
+ return this.request<{ projects: ProjectRecord[] }>(
213
+ "GET",
214
+ `/v1/projects${includeArchived ? "?includeArchived=1" : ""}`,
215
+ );
216
+ }
217
+ updateProject(id: string, patch: ProjectPatchBody) {
218
+ return this.request<ProjectRecord>("PATCH", `/v1/projects/${enc(id)}`, patch);
219
+ }
220
+ /** POSTs carry `{}`: the hub guard 415s a bodiless POST ("JSON required"). */
221
+ archiveProject(id: string) {
222
+ return this.request<ProjectRecord>("POST", `/v1/projects/${enc(id)}/archive`, {});
223
+ }
224
+ unarchiveProject(id: string) {
225
+ return this.request<ProjectRecord>("POST", `/v1/projects/${enc(id)}/unarchive`, {});
226
+ }
227
+ /** Usage rollup over the sessions this device still holds. */
228
+ deviceUsage() {
229
+ return this.request<DeviceUsageReport>("GET", "/v1/device/usage");
230
+ }
207
231
  /** Session search over names/cwds/models (transcripts are not scanned). */
208
232
  searchSessions(query: string) {
209
233
  return this.request<SessionSearchResult>("GET", `/v1/sessions/search?q=${enc(query)}`);
@@ -12,6 +12,7 @@
12
12
  const ROUTES: readonly (readonly [method: string, pattern: string])[] = [
13
13
  ["GET", "/device"],
14
14
  ["GET", "/device/vitals"],
15
+ ["GET", "/device/usage"],
15
16
  ["GET", "/tree"],
16
17
  ["GET", "/fs/dirs"],
17
18
  ["GET", "/git/status"],
@@ -19,6 +20,11 @@ const ROUTES: readonly (readonly [method: string, pattern: string])[] = [
19
20
  ["POST", "/git/status-batch"],
20
21
  ["GET", "/docs/:kind"],
21
22
 
23
+ ["GET", "/projects"],
24
+ ["PATCH", "/projects/:id"],
25
+ ["POST", "/projects/:id/archive"],
26
+ ["POST", "/projects/:id/unarchive"],
27
+
22
28
  ["GET", "/sessions"],
23
29
  ["POST", "/sessions"],
24
30
  ["GET", "/sessions/search"],
@@ -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 ADOPTED (0.0.38 — 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).** Waves 2+ remain planning input. 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(projects,usage) ADOPTED (0.0.39 — 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).** The rest of Wave 2 (scheduling, GC, webhooks, env UI, update badge) remains planning input, and policy gates #1–#4 are still open. 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
 
@@ -133,9 +133,9 @@ None of them blocks Wave 1.
133
133
 
134
134
  | Tier | Feature | Source (path:line) | Ours | Adoption suggestion |
135
135
  |---|---|---|---|---|
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` | ❌ | registry keyed on cwd; promote the TUI's group-by-cwd (`views.ts:72-73`) into an entity; copy paseo's schema-migration discipline |
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) | ❌ | systemd timer / launchd job through the existing service layer; the **device** owns execution, the hub only displays. New surface — `config.test.ts:25` rejects `service: cron` by design |
138
- | MUST | Usage dashboard | orca `usage/agent-token-usage.ts` + `usage-calendar-range.ts` (46-file suite incl. per-provider parsers) | 🟡 | persist the Inspector-shaped rows → per-device/per-provider/calendar views; entries already carry usage |
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
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 |
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`) | 🟡 (archive exists, no deletion policy) | archive → verify → delete, `--dry-run` first (piggery pattern); defaults need leader sign-off |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-durable",
3
- "version": "0.0.38",
3
+ "version": "0.0.39",
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": {