@hasna/configs 0.2.37 → 0.2.39

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 (46) hide show
  1. package/README.md +28 -5
  2. package/dist/cli/index.js +6518 -10195
  3. package/dist/cli/output.test.d.ts +2 -0
  4. package/dist/cli/output.test.d.ts.map +1 -0
  5. package/dist/cli/storage.d.ts +3 -0
  6. package/dist/cli/storage.d.ts.map +1 -0
  7. package/dist/cli/storage.test.d.ts +2 -0
  8. package/dist/cli/storage.test.d.ts.map +1 -0
  9. package/dist/db/configs.d.ts.map +1 -1
  10. package/dist/db/database.d.ts.map +1 -1
  11. package/dist/db/pg-migrations.d.ts +1 -1
  12. package/dist/db/pg-migrations.d.ts.map +1 -1
  13. package/dist/db/remote-storage.d.ts +10 -0
  14. package/dist/db/remote-storage.d.ts.map +1 -0
  15. package/dist/db/storage-sync.d.ts +53 -0
  16. package/dist/db/storage-sync.d.ts.map +1 -0
  17. package/dist/db/storage-sync.test.d.ts +2 -0
  18. package/dist/db/storage-sync.test.d.ts.map +1 -0
  19. package/dist/index.d.ts +5 -0
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +1088 -5078
  22. package/dist/lib/apply.d.ts +3 -0
  23. package/dist/lib/apply.d.ts.map +1 -1
  24. package/dist/lib/compact-output.d.ts +78 -0
  25. package/dist/lib/compact-output.d.ts.map +1 -0
  26. package/dist/lib/compact-output.test.d.ts +2 -0
  27. package/dist/lib/compact-output.test.d.ts.map +1 -0
  28. package/dist/lib/import.d.ts.map +1 -1
  29. package/dist/lib/sync.d.ts +8 -2
  30. package/dist/lib/sync.d.ts.map +1 -1
  31. package/dist/lib/transforms.d.ts +11 -0
  32. package/dist/lib/transforms.d.ts.map +1 -0
  33. package/dist/lib/transforms.test.d.ts +2 -0
  34. package/dist/lib/transforms.test.d.ts.map +1 -0
  35. package/dist/mcp/index.js +16423 -10567
  36. package/dist/mcp/server.d.ts.map +1 -1
  37. package/dist/server/index.d.ts.map +1 -1
  38. package/dist/server/index.js +28689 -22952
  39. package/dist/status.d.ts.map +1 -1
  40. package/dist/storage.d.ts +5 -0
  41. package/dist/storage.d.ts.map +1 -0
  42. package/dist/storage.js +5417 -0
  43. package/dist/types/index.d.ts +15 -1
  44. package/dist/types/index.d.ts.map +1 -1
  45. package/package.json +9 -2
  46. package/dashboard/README.md +0 -73
package/README.md CHANGED
@@ -15,16 +15,35 @@ npm install -g @hasna/configs
15
15
 
16
16
  ```bash
17
17
  configs --help
18
+ configs list # compact, paged summary
19
+ configs list --verbose # expanded metadata, still paged
20
+ configs list --json # full machine-readable records
21
+ configs show <slug> # full metadata + content
22
+ configs inspect <slug> # alias for show
18
23
  configs profile resolve
19
24
  configs profile apply --auto
20
25
  ```
21
26
 
27
+ Collection commands are compact by default to keep agent terminals and context
28
+ small. Human output is capped at 20 rows unless you pass `--limit`; use
29
+ `--cursor` to continue from the next page. Detail is explicit:
30
+
31
+ - `--verbose` expands list rows with descriptions, tags, and paths.
32
+ - `--json` preserves full machine-readable records for automation.
33
+ - `show`/`inspect` and `snapshot show` print full config or snapshot content.
34
+
22
35
  ## MCP Server
23
36
 
24
37
  ```bash
25
38
  configs-mcp
26
39
  ```
27
40
 
41
+ Agent-facing MCP tools follow the same gradual disclosure model. `list_configs`
42
+ and `list_profiles` return paged compact envelopes by default and accept
43
+ `limit`, `cursor`, and `verbose`. `apply_config` and `apply_profile` omit
44
+ `previous_content` and `new_content` unless `verbose: true` is passed. Use
45
+ `get_config` when full config content is needed.
46
+
28
47
  ## HTTP mode
29
48
 
30
49
  ```bash
@@ -40,16 +59,20 @@ Health: `GET http://127.0.0.1:8807/health`. MCP is also mounted on `configs-serv
40
59
  configs-serve
41
60
  ```
42
61
 
43
- ## Cloud Sync
62
+ ## Storage Sync
44
63
 
45
- This package supports cloud sync via `@hasna/cloud`:
64
+ This package supports optional remote storage sync through a package-local Postgres connection:
46
65
 
47
66
  ```bash
48
- cloud setup
49
- cloud sync push --service configs
50
- cloud sync pull --service configs
67
+ export HASNA_CONFIGS_DATABASE_URL=postgres://...
68
+ configs storage status
69
+ configs storage push
70
+ configs storage pull
71
+ configs storage sync
51
72
  ```
52
73
 
74
+ The MCP server also exposes `storage_status`, `storage_push`, `storage_pull`, and `storage_sync`.
75
+
53
76
  ## Data Directory
54
77
 
55
78
  Data is stored in `~/.hasna/configs/`.