@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 +24 -3
- package/dist/cli/index.js +10109 -11
- package/dist/db/agents.d.ts +7 -7
- package/dist/db/agents.d.ts.map +1 -1
- package/dist/db/cloud.d.ts +20 -0
- package/dist/db/cloud.d.ts.map +1 -0
- package/dist/db/database.d.ts +3 -2
- package/dist/db/database.d.ts.map +1 -1
- package/dist/db/invoices.d.ts +12 -12
- package/dist/db/invoices.d.ts.map +1 -1
- package/dist/db/migrate.d.ts +2 -3
- package/dist/db/migrate.d.ts.map +1 -1
- package/dist/db/pg.d.ts +3 -0
- package/dist/db/pg.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10190 -9
- package/dist/mcp/index.js +10257 -14
- package/dist/server/index.js +10237 -9
- package/package.json +1 -1
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
|
|
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
|
|
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`
|