@hasna/instructions 0.5.5 → 0.6.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/README.md +64 -20
- package/dist/cli/fail-closed-no-env.test.d.ts +2 -0
- package/dist/cli/fail-closed-no-env.test.d.ts.map +1 -0
- package/dist/cli/index.js +1910 -561
- package/dist/data/config-store.d.ts +62 -33
- package/dist/data/config-store.d.ts.map +1 -1
- package/dist/db/database.d.ts.map +1 -1
- package/dist/generated/storage-kit/backend.d.ts +4 -4
- package/dist/generated/storage-kit/backend.d.ts.map +1 -1
- package/dist/generated/storage-kit/index.d.ts +1 -1
- package/dist/generated/storage-kit/index.d.ts.map +1 -1
- package/dist/generated/storage-kit/migrations.d.ts +21 -0
- package/dist/generated/storage-kit/migrations.d.ts.map +1 -1
- package/dist/generated/storage-kit/pool.d.ts +2 -5
- package/dist/generated/storage-kit/pool.d.ts.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2702 -547
- package/dist/lib/app-home.d.ts +9 -0
- package/dist/lib/app-home.d.ts.map +1 -1
- package/dist/lib/client-types.d.ts +130 -0
- package/dist/lib/client-types.d.ts.map +1 -0
- package/dist/lib/client-types.test.d.ts +2 -0
- package/dist/lib/client-types.test.d.ts.map +1 -0
- package/dist/lib/local-opt-in.d.ts +82 -0
- package/dist/lib/local-opt-in.d.ts.map +1 -0
- package/dist/lib/project-context.d.ts +14 -14
- package/dist/lib/project-context.d.ts.map +1 -1
- package/dist/lib/project-dashboard-standard.d.ts +1 -1
- package/dist/lib/project-dashboard-standard.d.ts.map +1 -1
- package/dist/lib/session-apply.d.ts.map +1 -1
- package/dist/lib/session-render-state-hermeticity.test.d.ts +2 -0
- package/dist/lib/session-render-state-hermeticity.test.d.ts.map +1 -0
- package/dist/lib/session-render-state.d.ts +57 -0
- package/dist/lib/session-render-state.d.ts.map +1 -0
- package/dist/lib/session-render-state.test.d.ts +2 -0
- package/dist/lib/session-render-state.test.d.ts.map +1 -0
- package/dist/lib/transport-resolver.d.ts +80 -0
- package/dist/lib/transport-resolver.d.ts.map +1 -0
- package/dist/lib/transport-resolver.test.d.ts +2 -0
- package/dist/lib/transport-resolver.test.d.ts.map +1 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1442 -192
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/sdk/index.d.ts +22 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js +1042 -0
- package/dist/sdk/resolve.d.ts +82 -0
- package/dist/sdk/resolve.d.ts.map +1 -0
- package/dist/sdk/resolve.test.d.ts +2 -0
- package/dist/sdk/resolve.test.d.ts.map +1 -0
- package/dist/sdk/sdk-bundle-self-contained.test.d.ts +2 -0
- package/dist/sdk/sdk-bundle-self-contained.test.d.ts.map +1 -0
- package/dist/sdk/v1.generated.d.ts +288 -0
- package/dist/sdk/v1.generated.d.ts.map +1 -0
- package/dist/server/cloud.d.ts.map +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +55 -64
- package/dist/test-support/preload-state-home.d.ts +2 -0
- package/dist/test-support/preload-state-home.d.ts.map +1 -0
- package/package.json +12 -12
- package/dashboard/README.md +0 -37
- package/dist/lib/retired-storage-mode.d.ts +0 -8
- package/dist/lib/retired-storage-mode.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/instructions",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "AI coding agent instruction & configuration manager
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "AI coding agent instruction & configuration manager \u2014 store, version, apply, and share all your AI coding configs. CLI + MCP + HTTP API (instructions-serve) + generated SDK.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -16,25 +16,27 @@
|
|
|
16
16
|
".": {
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"import": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./sdk": {
|
|
21
|
+
"types": "./dist/sdk/index.d.ts",
|
|
22
|
+
"import": "./dist/sdk/index.js"
|
|
19
23
|
}
|
|
20
24
|
},
|
|
21
25
|
"files": [
|
|
22
26
|
"dist",
|
|
23
27
|
"assets/skills/inbox/SKILL.md",
|
|
24
|
-
"dashboard/dist",
|
|
25
28
|
"LICENSE",
|
|
26
29
|
"README.md"
|
|
27
30
|
],
|
|
28
31
|
"scripts": {
|
|
29
32
|
"clean": "rm -rf dist",
|
|
30
|
-
"build": "bun run clean && bun build src/cli/index.tsx --outdir dist/cli --target bun --external ink --external react --external chalk --external pg --external @modelcontextprotocol/sdk && bun build src/mcp/index.ts --outdir dist/mcp --target bun --external pg --external @modelcontextprotocol/sdk && bun build src/server/index.ts --outdir dist/server --target bun --external pg && bun build src/index.ts --outdir dist --target bun --external pg && tsc --emitDeclarationOnly --outDir dist",
|
|
31
|
-
"build:server": "bun run clean && bun build src/cli/index.tsx --outdir dist/cli --target bun --external ink --external react --external chalk --external pg --external @modelcontextprotocol/sdk && bun build src/mcp/index.ts --outdir dist/mcp --target bun --external pg --external @modelcontextprotocol/sdk && bun build src/server/index.ts --outdir dist/server --target bun --external pg && bun build src/index.ts --outdir dist --target bun --external pg",
|
|
32
|
-
"build:dashboard": "cd dashboard && bun run build",
|
|
33
|
+
"build": "bun run clean && bun build src/cli/index.tsx --outdir dist/cli --target bun --external ink --external react --external chalk --external pg --external @modelcontextprotocol/sdk && bun build src/mcp/index.ts --outdir dist/mcp --target bun --external pg --external @modelcontextprotocol/sdk && bun build src/server/index.ts --outdir dist/server --target bun --external pg && bun build src/index.ts --outdir dist --target bun --external pg && bun build src/sdk/index.ts --outdir dist/sdk --target bun && tsc --emitDeclarationOnly --outDir dist",
|
|
34
|
+
"build:server": "bun run clean && bun build src/cli/index.tsx --outdir dist/cli --target bun --external ink --external react --external chalk --external pg --external @modelcontextprotocol/sdk && bun build src/mcp/index.ts --outdir dist/mcp --target bun --external pg --external @modelcontextprotocol/sdk && bun build src/server/index.ts --outdir dist/server --target bun --external pg && bun build src/index.ts --outdir dist --target bun --external pg && bun build src/sdk/index.ts --outdir dist/sdk --target bun",
|
|
33
35
|
"migrate": "bun run src/server/index.ts migrate",
|
|
34
36
|
"generate:sdk": "bun run scripts/generate-sdk.ts",
|
|
35
37
|
"kit:check": "bunx @hasna/contracts vendor-kit --check",
|
|
36
38
|
"typecheck": "tsc --noEmit",
|
|
37
|
-
"test": "env -u HASNA_INSTRUCTIONS_API_URL -u HASNA_INSTRUCTIONS_API_KEY bun test",
|
|
39
|
+
"test": "env -u HASNA_INSTRUCTIONS_API_URL -u HASNA_INSTRUCTIONS_API_KEY -u INSTRUCTIONS_API_URL -u INSTRUCTIONS_API_KEY -u HASNA_INSTRUCTIONS_API_KEY_OVERRIDE -u HASNA_INSTRUCTIONS_API_KEY_REF -u HASNA_PROFILE HASNA_STATE_HOME=$(mktemp -d) bun test",
|
|
38
40
|
"check:package-secrets": "bun run src/cli/index.tsx package-manager-scan --fail-on-findings .",
|
|
39
41
|
"dev:cli": "bun run src/cli/index.tsx",
|
|
40
42
|
"dev:mcp": "bun run src/mcp/index.ts",
|
|
@@ -55,8 +57,7 @@
|
|
|
55
57
|
"mcp",
|
|
56
58
|
"ai",
|
|
57
59
|
"coding-agent",
|
|
58
|
-
"cli"
|
|
59
|
-
"dashboard"
|
|
60
|
+
"cli"
|
|
60
61
|
],
|
|
61
62
|
"publishConfig": {
|
|
62
63
|
"registry": "https://registry.npmjs.org",
|
|
@@ -76,9 +77,7 @@
|
|
|
76
77
|
"author": "Andrei Hasna <andrei@hasna.com>",
|
|
77
78
|
"license": "Apache-2.0",
|
|
78
79
|
"dependencies": {
|
|
79
|
-
"@hasna/contracts": "0.14.1",
|
|
80
80
|
"@hasna/events": "^0.1.16",
|
|
81
|
-
"@hasna/paths": "0.1.0",
|
|
82
81
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
83
82
|
"chalk": "^5.4.1",
|
|
84
83
|
"commander": "^13.1.0",
|
|
@@ -89,7 +88,8 @@
|
|
|
89
88
|
"zod": "^3.24.2"
|
|
90
89
|
},
|
|
91
90
|
"devDependencies": {
|
|
92
|
-
"@
|
|
91
|
+
"@hasna/contracts": "1.0.2",
|
|
92
|
+
"@types/bun": "1.3.14",
|
|
93
93
|
"@types/pg": "^8.11.11",
|
|
94
94
|
"@types/react": "^18.3.18",
|
|
95
95
|
"bun-types": "1.3.14",
|
package/dashboard/README.md
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Instructions dashboard (legacy API client)
|
|
2
|
-
|
|
3
|
-
This directory contains a React/Vite dashboard with pages for configs,
|
|
4
|
-
profiles, apply/sync, snapshots, and machines. Its checked-in API client uses
|
|
5
|
-
the former unauthenticated local `/api/*` routes at
|
|
6
|
-
`http://localhost:3457`.
|
|
7
|
-
|
|
8
|
-
Current `instructions-serve` exposes authenticated `/v1/*` and deliberately
|
|
9
|
-
does not mount `/api/*`. As a result, this dashboard is not operational against
|
|
10
|
-
the current server until its client, response shapes, and authentication are
|
|
11
|
-
migrated to `/v1`. The server may still serve `dashboard/dist` as static files
|
|
12
|
-
when a build is present; serving the assets does not restore the old API.
|
|
13
|
-
|
|
14
|
-
## Source layout
|
|
15
|
-
|
|
16
|
-
- `src/api.ts` — fixed-base legacy `/api` client.
|
|
17
|
-
- `src/pages/ConfigsPage.tsx` — search, inspect, and edit config content.
|
|
18
|
-
- `src/pages/ProfilesPage.tsx` — create, inspect, preview, and apply profiles.
|
|
19
|
-
- `src/pages/ApplyPage.tsx` — preview/apply configs and legacy directory sync.
|
|
20
|
-
- `src/pages/HistoryPage.tsx` — inspect config snapshots.
|
|
21
|
-
- `src/pages/MachinesPage.tsx` — machine and category statistics.
|
|
22
|
-
|
|
23
|
-
## Development
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
bun install
|
|
27
|
-
bun run dev
|
|
28
|
-
bun run lint
|
|
29
|
-
bun run build
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
The Vite dev server alone does not provide API endpoints. For UI work before
|
|
33
|
-
the `/v1` migration, use a purpose-built mock or a compatible legacy server;
|
|
34
|
-
do not expose an unauthenticated `/api` shim in production.
|
|
35
|
-
|
|
36
|
-
See the repository's [HTTP API reference](../docs/http-api.md) for the current
|
|
37
|
-
server contract.
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Throw when a retired storage-mode variable is set. Naming the retired var
|
|
3
|
-
* and the supported switches makes the error actionable without accepting the
|
|
4
|
-
* value. Safe to call from any entry (client store resolution, db guard,
|
|
5
|
-
* server backend resolution) — it is a no-op when no legacy key is set.
|
|
6
|
-
*/
|
|
7
|
-
export declare function assertNoLegacyStorageMode(env?: NodeJS.ProcessEnv): void;
|
|
8
|
-
//# sourceMappingURL=retired-storage-mode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"retired-storage-mode.d.ts","sourceRoot":"","sources":["../../src/lib/retired-storage-mode.ts"],"names":[],"mappings":"AAwBA;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,IAAI,CAUpF"}
|