@dojocoding/hacienda-mcp 0.2.0 → 0.4.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.
- package/CHANGELOG.md +75 -0
- package/README.md +9 -4
- package/dist/chunk-Q2UJO3PQ.js +944 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +19 -9
- package/dist/chunk-NJFDE5LL.js +0 -61858
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# @dojocoding/hacienda-mcp
|
|
2
|
+
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
- Declare Node.js 22+ and public package metadata; verify installed TypeScript consumers and ship corrected upgrade documentation.
|
|
6
|
+
- Report the package manifest version in CLI/MCP metadata instead of a hardcoded version.
|
|
7
|
+
|
|
8
|
+
### Minor Changes
|
|
9
|
+
|
|
10
|
+
- eaf7cff: Validate XML offline against the vendored Hacienda v4.4 schemas before submission.
|
|
11
|
+
Fix discount totals, reconcile summaries with detail, serialize sequence resets
|
|
12
|
+
and increments, and enforce concurrent API rate limits. Return nonzero CLI exit
|
|
13
|
+
codes for rejected submissions. MCP invoice creation requires the actual system
|
|
14
|
+
provider ID and validates generated documents; its JSON schema resource now
|
|
15
|
+
reflects the tool input schema.
|
|
16
|
+
- 4e89886: Harden cancellation, submission deadlines, response/XML limits, certificate
|
|
17
|
+
readiness, secret-safe diagnostics and retry semantics. Fix standalone MCP ESM
|
|
18
|
+
startup and validate inputs before sequence allocation. Update security-sensitive
|
|
19
|
+
dependencies and add hostile-input, cryptographic, local HTTP lifecycle,
|
|
20
|
+
multiprocess sequence and installed-package regression suites.
|
|
21
|
+
|
|
22
|
+
Submission timeout now covers POST and polling; POST/PATCH are not automatically
|
|
23
|
+
retried. HTTP requests default to a 30-second deadline and reject redirects.
|
|
24
|
+
See docs/security-hardening.md for input caps and remaining trust boundaries.
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [eaf7cff]
|
|
29
|
+
- Updated dependencies [4e89886]
|
|
30
|
+
- @dojocoding/hacienda-sdk@0.4.0
|
|
31
|
+
- @dojocoding/hacienda-shared@0.4.0
|
|
32
|
+
|
|
33
|
+
## 0.3.0
|
|
34
|
+
|
|
35
|
+
### Minor Changes (BREAKING — pre-1.0)
|
|
36
|
+
|
|
37
|
+
- `create_invoice` and `draft_invoice` tools and the `factura-schema` resource now speak the v4.4 contract (`proveedorSistemas`, `codigoActividadEmisor`, required emisor `ubicacion`, single `medioPago` code emitted inside `ResumenFactura`, `codigoTarifaIVA`, `codigoDescuento`, ID types 05/06). `unidadMedida` is validated against the official catalog and location fields enforce the v4.4 bounds.
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- Updated dependencies
|
|
42
|
+
- @dojocoding/hacienda-sdk@0.3.0
|
|
43
|
+
- @dojocoding/hacienda-shared@0.3.0
|
|
44
|
+
|
|
45
|
+
## 0.2.0
|
|
46
|
+
|
|
47
|
+
### Minor Changes
|
|
48
|
+
|
|
49
|
+
- Rename npm scope from `@hacienda-cr` to `@dojocoding` for DojoCoding ecosystem branding. All packages now published under the `@dojocoding` org. No API changes.
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- Updated dependencies
|
|
54
|
+
- @dojocoding/hacienda-shared@0.2.0
|
|
55
|
+
- @dojocoding/hacienda-sdk@0.2.0
|
|
56
|
+
|
|
57
|
+
## 0.1.0
|
|
58
|
+
|
|
59
|
+
### Minor Changes
|
|
60
|
+
|
|
61
|
+
- Initial public release of hacienda-cr — TypeScript SDK, CLI, and MCP Server for Costa Rica electronic invoicing (Hacienda API v4.4).
|
|
62
|
+
|
|
63
|
+
**@dojocoding/hacienda-shared** — Shared types, Zod schemas, and constants for all 7 document types, tax codes, and identification types.
|
|
64
|
+
|
|
65
|
+
**@dojocoding/hacienda-sdk** — Core SDK with OAuth2 authentication, 50-digit clave generation/parsing, XML builder, XAdES-EPES digital signing, API client with submission/polling, and document builders for all 7 electronic document types.
|
|
66
|
+
|
|
67
|
+
**@dojocoding/hacienda-cli** — `hacienda` CLI binary for login, invoice drafting, validation, signing, submission, status checking, and document listing.
|
|
68
|
+
|
|
69
|
+
**@dojocoding/hacienda-mcp** — MCP Server exposing invoice creation, status checking, document retrieval, taxpayer lookup, and reference data as AI-accessible tools and resources.
|
|
70
|
+
|
|
71
|
+
### Patch Changes
|
|
72
|
+
|
|
73
|
+
- Updated dependencies
|
|
74
|
+
- @dojocoding/hacienda-shared@0.1.0
|
|
75
|
+
- @dojocoding/hacienda-sdk@0.1.0
|
package/README.md
CHANGED
|
@@ -75,9 +75,10 @@ Create a Factura Electronica (electronic invoice). Accepts emisor, receptor, and
|
|
|
75
75
|
|
|
76
76
|
- `emisor` -- Issuer information (name, ID, email)
|
|
77
77
|
- `receptor` -- Receiver information (name, optional ID, optional email)
|
|
78
|
-
- `
|
|
78
|
+
- `codigoActividadEmisor` -- Issuer economic activity code (6 digits)
|
|
79
|
+
- `proveedorSistemas` -- Actual invoicing-system provider ID (required; no issuer fallback)
|
|
79
80
|
- `condicionVenta` -- Sale condition code (default: `"01"` = cash)
|
|
80
|
-
- `medioPago` -- Payment
|
|
81
|
+
- `medioPago` -- Payment method code (default: `"01"` = cash; emitted inside ResumenFactura per v4.4)
|
|
81
82
|
- `lineItems` -- Array of line items with CABYS code, quantity, unit, description, price, and optional tax/discount
|
|
82
83
|
- `plazoCredito` -- Credit term in days (optional)
|
|
83
84
|
|
|
@@ -132,7 +133,7 @@ Generate a draft invoice template with sensible defaults. Returns JSON that can
|
|
|
132
133
|
- `receptorIdTipo` -- Receiver ID type (optional)
|
|
133
134
|
- `receptorIdNumero` -- Receiver ID number (optional)
|
|
134
135
|
- `receptorEmail` -- Receiver email (optional)
|
|
135
|
-
- `
|
|
136
|
+
- `codigoActividadEmisor` -- Activity code (default: `"620100"`)
|
|
136
137
|
- `description` -- Default line item description (default: `"Servicio profesional"`)
|
|
137
138
|
- `amount` -- Default line item amount (default: `0`)
|
|
138
139
|
- `includeIva` -- Include 13% IVA (default: `true`)
|
|
@@ -148,4 +149,8 @@ Generate a draft invoice template with sensible defaults. Returns JSON that can
|
|
|
148
149
|
|
|
149
150
|
## Full Documentation
|
|
150
151
|
|
|
151
|
-
See the [root README](
|
|
152
|
+
See the [root README](https://github.com/DojoCodingLabs/hacienda-cr#readme) for comprehensive documentation with examples.
|
|
153
|
+
|
|
154
|
+
## Migrating to 0.4.0
|
|
155
|
+
|
|
156
|
+
Read the [migration guide](https://github.com/DojoCodingLabs/hacienda-cr/blob/main/packages/sdk/MIGRATION-v4.4.md) before upgrading.
|