@hasna/domains 0.0.39 → 0.0.42

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 (52) hide show
  1. package/README.md +11 -15
  2. package/dist/cli/commands/domain.d.ts.map +1 -1
  3. package/dist/cli/index.js +19736 -32040
  4. package/dist/db/database.d.ts +24 -0
  5. package/dist/db/database.d.ts.map +1 -1
  6. package/dist/db/domain-records.d.ts +61 -2
  7. package/dist/db/domain-records.d.ts.map +1 -1
  8. package/dist/db/domains.d.ts +14 -7
  9. package/dist/db/domains.d.ts.map +1 -1
  10. package/dist/db/migrations.d.ts.map +1 -1
  11. package/dist/db/pg-migrations.d.ts.map +1 -1
  12. package/dist/db/store.d.ts +48 -48
  13. package/dist/db/store.d.ts.map +1 -1
  14. package/dist/generated/storage-kit/backend.d.ts +19 -0
  15. package/dist/generated/storage-kit/backend.d.ts.map +1 -0
  16. package/dist/generated/storage-kit/index.d.ts +2 -2
  17. package/dist/generated/storage-kit/index.d.ts.map +1 -1
  18. package/dist/generated/storage-kit/migrations.d.ts.map +1 -1
  19. package/dist/generated/storage-kit/own.d.ts +11 -0
  20. package/dist/generated/storage-kit/own.d.ts.map +1 -0
  21. package/dist/generated/storage-kit/pool.d.ts +7 -6
  22. package/dist/generated/storage-kit/pool.d.ts.map +1 -1
  23. package/dist/generated/storage-kit/query.d.ts +1 -1
  24. package/dist/generated/storage-kit/query.d.ts.map +1 -1
  25. package/dist/generated/storage-kit/tls.d.ts +30 -3
  26. package/dist/generated/storage-kit/tls.d.ts.map +1 -1
  27. package/dist/index.js +15865 -28359
  28. package/dist/lib/brandsight.d.ts.map +1 -1
  29. package/dist/lib/config.d.ts +23 -3
  30. package/dist/lib/config.d.ts.map +1 -1
  31. package/dist/lib/freshness.d.ts +65 -0
  32. package/dist/lib/freshness.d.ts.map +1 -0
  33. package/dist/lib/godaddy.d.ts.map +1 -1
  34. package/dist/lib/namecheap.d.ts +2 -0
  35. package/dist/lib/namecheap.d.ts.map +1 -1
  36. package/dist/lib/registrar.js +17 -6
  37. package/dist/lib/route53.d.ts.map +1 -1
  38. package/dist/lib/route53.js +5 -2
  39. package/dist/mcp/index.js +13479 -25921
  40. package/dist/sdk/index.d.ts +3 -2
  41. package/dist/sdk/index.d.ts.map +1 -1
  42. package/dist/sdk/index.js +280 -3
  43. package/dist/server/app.d.ts +12 -8
  44. package/dist/server/app.d.ts.map +1 -1
  45. package/dist/server/index.d.ts +4 -5
  46. package/dist/server/index.d.ts.map +1 -1
  47. package/dist/server/index.js +527 -181
  48. package/dist/server/openapi.d.ts.map +1 -1
  49. package/dist/server/repo.d.ts.map +1 -1
  50. package/package.json +7 -4
  51. package/dist/generated/storage-kit/mode.d.ts +0 -48
  52. package/dist/generated/storage-kit/mode.d.ts.map +0 -1
package/README.md CHANGED
@@ -33,7 +33,7 @@ Domain portfolio, registrar, marketplace, and DNS management for AI agents. The
33
33
  npm install -g @hasna/domains
34
34
  ```
35
35
 
36
- Data is stored in the local domains data directory (`$XDG_DATA_HOME/open-domains` or `~/.local/share/open-domains` for new installs; existing legacy installs continue using their current directory). Override with `DOMAINS_DB_PATH`, `DOMAINS_DIR`, or the legacy `HASNA_DOMAINS_DB_PATH` / `HASNA_DOMAINS_DIR` names.
36
+ Data is stored in the local domains data directory (`~/.hasna/domains`; existing legacy installs continue using their current directory). Override with `DOMAINS_DB_PATH`, `DOMAINS_DIR`, or the legacy `HASNA_DOMAINS_DB_PATH` / `HASNA_DOMAINS_DIR` names.
37
37
 
38
38
  ## Optional Command Groups
39
39
 
@@ -230,19 +230,16 @@ domains doctor --json
230
230
 
231
231
  Route 53 sync imports registered domains when the selected AWS account permits `route53domains:ListDomains`, and hosted zones when the account permits Route 53 hosted-zone reads. Domain-looking names from unrelated systems such as SSM parameters or Secrets Manager should only be imported after review because they do not prove registrar ownership.
232
232
 
233
- ## Storage Modes
233
+ ## Storage
234
234
 
235
- The CLI and library use local SQLite by default. Client cloud mode is pure HTTP: configure the service URL and API key rather than exposing a database DSN to clients.
235
+ The CLI and library use local SQLite by default. The client selects the hosted HTTP API when both `HASNA_DOMAINS_API_URL` and `HASNA_DOMAINS_API_KEY` are set a database DSN is never exposed to clients.
236
236
 
237
237
  ```bash
238
- export HASNA_DOMAINS_STORAGE_MODE=cloud
239
238
  export HASNA_DOMAINS_API_URL=https://domains.example.com
240
239
  export HASNA_DOMAINS_API_KEY=dom_...
241
240
  ```
242
241
 
243
- The unprefixed `DOMAINS_API_URL` and `DOMAINS_API_KEY` aliases are also accepted. When both URL and key are present, the store selects cloud HTTP automatically unless an explicit storage mode overrides it.
244
-
245
- The standalone `domains-serve` process is the server-side exception: it connects directly to Postgres using `HASNA_DOMAINS_DATABASE_URL` and requires `HASNA_DOMAINS_API_SIGNING_KEY`. Apply owner-role migrations first with `domains db migrate`.
242
+ The unprefixed `DOMAINS_API_URL` and `DOMAINS_API_KEY` aliases are also accepted. When only one of URL and key is set, the client refuses to start (fail-closed). The standalone `domains-serve` process is the server side: it connects directly to PostgreSQL using `HASNA_DOMAINS_DATABASE_URL` (SQLite when unset) and requires `HASNA_DOMAINS_API_SIGNING_KEY`. Apply owner-role migrations first with `domains db migrate`.
246
243
 
247
244
  ## MCP Server
248
245
 
@@ -327,11 +324,10 @@ const portfolio = await domains.listDomains({ status: "active" });
327
324
  | `DOMAINS_COMMAND_GROUPS` | Comma-separated optional command groups to load, or `all` |
328
325
  | `DOMAINS_ENABLE_EXTRAS` | Set to `1` to load all optional command groups |
329
326
  | `DOMAINS_MCP_SAFE_MODE` | Set to `1` to expose only read-only MCP tools |
330
- | `HASNA_DOMAINS_STORAGE_MODE`, `DOMAINS_STORAGE_MODE` | Client storage mode: `local` or `cloud` |
331
- | `HASNA_DOMAINS_API_URL`, `DOMAINS_API_URL` | Cloud HTTP API base URL for the CLI/library store |
332
- | `HASNA_DOMAINS_API_KEY`, `DOMAINS_API_KEY` | Cloud HTTP API key for the CLI/library store and SDK |
333
- | `HASNA_DOMAINS_ALLOW_CLOUD_WITH_LOCAL_PATH` | Set to `1` to keep the cloud store even though a local path variable is set. Without it that combination is a hard error — see below |
334
- | `HASNA_DOMAINS_DATABASE_URL` | Server-side Postgres DSN used by `domains-serve` and DB migrations |
327
+ | `HASNA_DOMAINS_API_URL`, `DOMAINS_API_URL` | Hosted HTTP API base URL for the CLI/library store (set together with the key) |
328
+ | `HASNA_DOMAINS_API_KEY`, `DOMAINS_API_KEY` | Hosted HTTP API key for the CLI/library store and SDK (set together with the URL) |
329
+ | `HASNA_DOMAINS_ALLOW_CLOUD_WITH_LOCAL_PATH` | Set to `1` to keep the hosted store even though a local path variable is set. Without it that combination is a hard error — see below |
330
+ | `HASNA_DOMAINS_DATABASE_URL` | Server-side PostgreSQL DSN used by `domains-serve` and DB migrations; SQLite backend when unset |
335
331
  | `HASNA_DOMAINS_API_SIGNING_KEY` | HMAC signing secret used by `domains-serve` to verify API keys |
336
332
  | `AWS_PROFILE` | AWS profile for Route 53 Domains and hosted zones |
337
333
  | `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN` | AWS credential fallback |
@@ -362,9 +358,9 @@ success. Nothing on any surface said which store it had used.
362
358
  To resolve it, say which you meant:
363
359
 
364
360
  ```sh
365
- HASNA_DOMAINS_STORAGE_MODE=local # use the sqlite file the path variable names
366
- unset DOMAINS_DB_PATH # use the cloud store
367
- HASNA_DOMAINS_ALLOW_CLOUD_WITH_LOCAL_PATH=1 # keep cloud with the variable present
361
+ unset HASNA_DOMAINS_API_URL HASNA_DOMAINS_API_KEY # use the sqlite file the path variable names
362
+ unset DOMAINS_DB_PATH # use the hosted store
363
+ HASNA_DOMAINS_ALLOW_CLOUD_WITH_LOCAL_PATH=1 # keep the hosted store with the variable present
368
364
  ```
369
365
 
370
366
  `domains doctor` names the store it resolved, in its `Store` section, before any other check
@@ -1 +1 @@
1
- {"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/domain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkEzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAg5B5D"}
1
+ {"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/domain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmEzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAi8B5D"}