@hasna/instructions 0.4.35 → 0.4.36

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
@@ -62,7 +62,7 @@ envelope. Its top-level fields are `configs`, `profiles`, `drift`, `secrets`,
62
62
 
63
63
  `instructions package-manager-scan` blocks package-manager credential ingress without
64
64
  printing credential values. It scans repo `.npmrc` files, home `.npmrc`, Bun
65
- config, lockfiles, and shell profiles, then reports only path, line, rule,
65
+ config, lockfiles, and shell profiles, then reports only the path, line, rule,
66
66
  surface, and tracked status.
67
67
 
68
68
  Use it in CI or pre-commit hooks:
@@ -126,10 +126,10 @@ Surfaces:
126
126
  - `/v1/*` — versioned cloud API (configs, profiles, snapshots, stats).
127
127
  - `/api/*` — the local dashboard/REST surface.
128
128
 
129
- ### Server data backend (postgresql)
129
+ ### Cloud mode (self-hosted, Amendment A1 pure-remote)
130
130
 
131
131
  When `HASNA_INSTRUCTIONS_DATABASE_URL` is set the `/v1` API reads/writes the
132
- shared Postgres **directly** (no local sync/cache in the service) and every
132
+ shared cloud Postgres **directly** (no local sync/cache in the service) and every
133
133
  `/v1` request is authenticated with a `@hasna/contracts` API key
134
134
  (`x-api-key` or `Authorization: Bearer`). Reads need `instructions:read`, writes
135
135
  need `instructions:write` (an `instructions:*` key satisfies both).
@@ -153,19 +153,20 @@ and `API_KEY_SIGNING_SECRET` are also accepted). Client apps use
153
153
  `InstructionsV1Client` is generated from the serve OpenAPI document
154
154
  (`bun run generate:sdk`).
155
155
 
156
- ## Client transports
156
+ ## Storage Modes
157
157
 
158
158
  Every CLI command, MCP tool, and SDK method routes through a single `ConfigStore`
159
159
  abstraction with two transports:
160
160
 
161
161
  - **local** — on-box SQLite (`LocalConfigStore`), fully first-class. Used when no
162
162
  API env vars are set.
163
- - **api** — HTTP `/v1` + bearer key (`CloudConfigStore`).
163
+ - **api** (self_hosted / cloud) — HTTP `/v1` + bearer key (`CloudConfigStore`).
164
164
  Activated by setting **both** `HASNA_INSTRUCTIONS_API_URL` and
165
- `HASNA_INSTRUCTIONS_API_KEY`.
165
+ `HASNA_INSTRUCTIONS_API_KEY`. Identical client code; only the URL/key differ,
166
+ and the self_hosted/cloud distinction is enforced server-side by tenancy.
166
167
 
167
168
  Clients never hold a database DSN. The raw Postgres connection is a server-only
168
- concern (`instructions-serve`), selected by `HASNA_INSTRUCTIONS_DATABASE_URL`.
169
+ concern (`instructions-serve`).
169
170
 
170
171
  ## Data Directory
171
172