heyio 0.25.0 → 0.27.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.
@@ -15,6 +15,7 @@ import { listSchedules, getSchedule, deleteSchedule, setScheduleEnabled } from "
15
15
  import { listIoSchedules, getIoSchedule, deleteIoSchedule, setIoScheduleEnabled } from "../store/io-schedules.js";
16
16
  import { getScheduleRuns } from "../store/schedule-runs.js";
17
17
  import { createFeedEntry, listFeedEntries, countUnreadFeedEntries, markFeedEntryRead, markAllFeedEntriesRead, deleteFeedEntry, markFeedEntriesRead, deleteFeedEntries } from "../store/feed.js";
18
+ import { listInboxEntries, countInboxEntries, deleteInboxEntry } from "../store/inbox.js";
18
19
  import { listPages, readPage } from "../wiki/fs.js";
19
20
  import { runScheduleNow } from "../copilot/scheduler.js";
20
21
  import { runIoScheduleNow } from "../copilot/io-scheduler.js";
@@ -348,6 +349,47 @@ export async function startApiServer() {
348
349
  res.status(500).json({ error: e instanceof Error ? e.message : String(e) });
349
350
  }
350
351
  });
352
+ // Inbox endpoints
353
+ api.get("/inbox/count", (_req, res) => {
354
+ try {
355
+ const count = countInboxEntries();
356
+ res.json({ count });
357
+ }
358
+ catch (e) {
359
+ console.error("Error counting inbox entries:", e);
360
+ res.status(500).json({ error: e instanceof Error ? e.message : String(e) });
361
+ }
362
+ });
363
+ api.get("/inbox", (_req, res) => {
364
+ try {
365
+ const entries = listInboxEntries();
366
+ res.json({ entries });
367
+ }
368
+ catch (e) {
369
+ console.error("Error listing inbox entries:", e);
370
+ res.status(500).json({ error: e instanceof Error ? e.message : String(e) });
371
+ }
372
+ });
373
+ api.delete("/inbox/:id", (req, res) => {
374
+ const raw = Array.isArray(req.params.id) ? req.params.id[0] : req.params.id;
375
+ const id = Number.parseInt(raw, 10);
376
+ if (Number.isNaN(id)) {
377
+ res.status(400).json({ error: "Invalid id" });
378
+ return;
379
+ }
380
+ try {
381
+ const deleted = deleteInboxEntry(id);
382
+ if (!deleted) {
383
+ res.status(404).json({ error: "Inbox entry not found" });
384
+ return;
385
+ }
386
+ res.status(204).send();
387
+ }
388
+ catch (e) {
389
+ console.error("Error deleting inbox entry:", e);
390
+ res.status(500).json({ error: e instanceof Error ? e.message : String(e) });
391
+ }
392
+ });
351
393
  // Squads endpoints
352
394
  api.get("/squads", (_req, res) => {
353
395
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heyio",
3
- "version": "0.25.0",
3
+ "version": "0.27.0",
4
4
  "description": "IO — a personal AI assistant built on the GitHub Copilot SDK",
5
5
  "bin": {
6
6
  "io": "dist/index.js"