@hasna/invoices 0.0.1 → 0.1.1

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 CHANGED
@@ -11,7 +11,10 @@ Invoice generation and management for AI agents.
11
11
 
12
12
  ## Features
13
13
 
14
- - SQLite storage with WAL mode and migrations
14
+ - Local SQLite storage with WAL mode + migrations
15
+ - PostgreSQL migration support via `@hasna/cloud`
16
+ - Cloud sync push/pull between local SQLite and PostgreSQL
17
+ - Feedback delivery with remote send + local fallback persistence
15
18
  - Invoice + line item CRUD with computed totals
16
19
  - FTS5 search over invoice number, parties, and notes
17
20
  - Agent registry (`register_agent`, `heartbeat`, `set_focus`, `list_agents`)
@@ -27,9 +30,22 @@ bun add @hasna/invoices
27
30
  ## CLI
28
31
 
29
32
  ```bash
30
- # initialize DB schema
33
+ # initialize local SQLite schema
31
34
  invoices db:migrate
32
35
 
36
+ # initialize PostgreSQL schema translated from local migrations
37
+ invoices db:migrate:pg
38
+
39
+ # cloud sync (all tables by default)
40
+ invoices cloud:push
41
+ invoices cloud:pull
42
+
43
+ # optional subset
44
+ invoices cloud:push --tables parties,invoices,invoice_lines
45
+
46
+ # feedback
47
+ invoices feedback:send --message "SDK auth flow failed on staging"
48
+
33
49
  # create parties
34
50
  invoices party:create --kind issuer --name "Hasna SRL"
35
51
  invoices party:create --kind customer --name "ACME GmbH"
@@ -64,6 +80,10 @@ Key endpoints:
64
80
 
65
81
  - `GET /health`
66
82
  - `POST /api/migrate`
83
+ - `POST /api/migrate/pg`
84
+ - `POST /api/cloud/push`
85
+ - `POST /api/cloud/pull`
86
+ - `POST /api/feedback`
67
87
  - `GET|POST /api/parties`
68
88
  - `GET|POST /api/invoices`
69
89
  - `GET /api/invoices/search?q=...`
@@ -83,7 +103,8 @@ invoices-mcp
83
103
 
84
104
  Core tools:
85
105
 
86
- - `migrate_database`
106
+ - `migrate_database`, `migrate_postgres`
107
+ - `cloud_push`, `cloud_pull`, `send_feedback`
87
108
  - `create_party`, `list_parties`
88
109
  - `create_invoice`, `get_invoice`, `list_invoices`, `search_invoices`, `update_invoice_status`, `delete_invoice`
89
110
  - `register_agent`, `heartbeat`, `set_focus`, `list_agents`