my-durable 0.0.38 → 0.0.40

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.
Files changed (28) hide show
  1. package/apps/dpi-backend/src/doctor.ts +10 -8
  2. package/apps/dpi-backend/src/gc-cli.ts +113 -0
  3. package/apps/dpi-backend/src/gc.ts +142 -0
  4. package/apps/dpi-backend/src/projects.ts +587 -0
  5. package/apps/dpi-backend/src/routes.ts +27 -0
  6. package/apps/dpi-backend/src/schedule-cli.ts +211 -0
  7. package/apps/dpi-backend/src/schedules.ts +676 -0
  8. package/apps/dpi-backend/src/store.ts +304 -2
  9. package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/index-DMJMesxP.css +1 -0
  10. package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/index-jDhVa5sg.js +81 -0
  11. package/apps/dpi-playground/apps/dpi-playground-fe/dist/index.html +2 -2
  12. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/hub.ts +2 -0
  13. package/apps/dpi-playground/apps/dpi-playground-fe/src/client/store.ts +4 -0
  14. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/Inspector.vue +8 -0
  15. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/NetworkSidebar.vue +23 -1
  16. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/ProjectBar.vue +284 -0
  17. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/SchedulesPanel.vue +289 -0
  18. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/TreeRow.vue +13 -1
  19. package/apps/dpi-playground/apps/dpi-playground-fe/src/components/UsagePanel.vue +406 -0
  20. package/apps/dpi-playground/apps/dpi-playground-hub/src/main.ts +20 -1
  21. package/apps/dpi-sdk/src/api.ts +100 -0
  22. package/apps/dpi-sdk/src/client.ts +42 -0
  23. package/apps/dpi-sdk/src/protocol/rest-routes.ts +12 -0
  24. package/bin/dpi.mjs +15 -0
  25. package/docs/host-project-checklist.md +6 -6
  26. package/package.json +1 -1
  27. package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/index-D4M8tCcs.js +0 -81
  28. package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/index-xOvj8ub1.css +0 -1
@@ -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 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)).
5
5
 
6
6
  ## Why this doc exists
7
7
 
@@ -133,13 +133,13 @@ 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 |
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 |
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
+ | 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
+ | 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
- | 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 |
142
- | SHOULD | Remote update badge — **policy #4** | orca `ssh/managed-server-update-check.ts` + `orcad-update-plan.ts` | 🟡 (`dpi update --check` exists, `dpi.mjs:36`) | hub compares `/device` version vs registry → badge. Device always self-updates; hub never pushes code |
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
+ | 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
144
  | SHOULD | Rate-limit surfacing | orca `rate-limits/` | ❌ | parse provider 429/limit info at probe/send time → hint in model picker |
145
145
  | SHOULD | Per-project settings/instructions | orca `settings/RepositoryPane.tsx` | ❌ | after the project entity: per-project model/env defaults |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-durable",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
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": {