@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 +8 -7
- package/dist/cli/index.js +191 -699
- package/dist/data/config-store.d.ts +4 -4
- package/dist/data/config-store.d.ts.map +1 -1
- package/dist/db/database.d.ts.map +1 -1
- package/dist/generated/storage-kit/index.d.ts +2 -2
- package/dist/generated/storage-kit/index.d.ts.map +1 -1
- package/dist/generated/storage-kit/migrations.d.ts.map +1 -1
- package/dist/generated/storage-kit/mode.d.ts +48 -0
- package/dist/generated/storage-kit/mode.d.ts.map +1 -0
- package/dist/generated/storage-kit/pool.d.ts +6 -7
- package/dist/generated/storage-kit/pool.d.ts.map +1 -1
- package/dist/generated/storage-kit/tls.d.ts +3 -30
- package/dist/generated/storage-kit/tls.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +44 -55
- package/dist/lib/apply.d.ts.map +1 -1
- package/dist/lib/cursor-authority.d.ts +36 -3
- package/dist/lib/cursor-authority.d.ts.map +1 -1
- package/dist/mcp/index.js +73 -73
- package/dist/server/cloud.d.ts +2 -2
- package/dist/server/cloud.d.ts.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +271 -456
- package/package.json +1 -2
- package/dist/generated/storage-kit/backend.d.ts +0 -20
- package/dist/generated/storage-kit/backend.d.ts.map +0 -1
- package/dist/generated/storage-kit/own.d.ts +0 -11
- package/dist/generated/storage-kit/own.d.ts.map +0 -1
- package/dist/lib/retired-storage-mode.d.ts +0 -8
- package/dist/lib/retired-storage-mode.d.ts.map +0 -1
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
|
-
###
|
|
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
|
-
##
|
|
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`)
|
|
169
|
+
concern (`instructions-serve`).
|
|
169
170
|
|
|
170
171
|
## Data Directory
|
|
171
172
|
|