@hasna/instructions 0.4.33 → 0.4.35
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 +6 -7
- package/dist/cli/index.js +682 -155
- 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/backend.d.ts +20 -0
- package/dist/generated/storage-kit/backend.d.ts.map +1 -0
- 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/own.d.ts +11 -0
- package/dist/generated/storage-kit/own.d.ts.map +1 -0
- package/dist/generated/storage-kit/pool.d.ts +7 -6
- package/dist/generated/storage-kit/pool.d.ts.map +1 -1
- package/dist/generated/storage-kit/tls.d.ts +30 -3
- 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 +39 -14
- package/dist/lib/retired-storage-mode.d.ts +8 -0
- package/dist/lib/retired-storage-mode.d.ts.map +1 -0
- package/dist/mcp/index.js +43 -14
- 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 +456 -271
- package/package.json +2 -1
- package/dist/generated/storage-kit/mode.d.ts +0 -48
- package/dist/generated/storage-kit/mode.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/instructions",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.35",
|
|
4
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 + Dashboard.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"@types/bun": "^1.2.4",
|
|
90
90
|
"@types/pg": "^8.11.11",
|
|
91
91
|
"@types/react": "^18.3.18",
|
|
92
|
+
"bun-types": "1.3.14",
|
|
92
93
|
"typescript": "^5.7.3"
|
|
93
94
|
}
|
|
94
95
|
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export declare const STORAGE_MODES: readonly ["local", "cloud"];
|
|
2
|
-
export type StorageMode = (typeof STORAGE_MODES)[number];
|
|
3
|
-
export declare const DEPRECATED_STORAGE_MODE_ALIASES: readonly ["remote", "hybrid", "self_hosted"];
|
|
4
|
-
export type Env = Record<string, string | undefined>;
|
|
5
|
-
export interface StorageModeNormalization {
|
|
6
|
-
mode: StorageMode;
|
|
7
|
-
/** The deprecated alias that was normalized to `cloud`, if any. */
|
|
8
|
-
deprecatedAlias: string | null;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Normalize a raw storage-mode string to the `local | cloud` runtime enum.
|
|
12
|
-
* Accepts deprecated aliases (`remote`, `hybrid`, `self_hosted`) and maps them
|
|
13
|
-
* to `cloud`. Throws on any other value.
|
|
14
|
-
*/
|
|
15
|
-
export declare function normalizeStorageMode(value: string): StorageModeNormalization;
|
|
16
|
-
/** Upper-snake env token for an app name, e.g. `todos` -> `TODOS`. */
|
|
17
|
-
export declare function envToken(name: string): string;
|
|
18
|
-
export interface StorageEnvKeys {
|
|
19
|
-
/** `HASNA_<NAME>_STORAGE_MODE` then the optional `<NAME>_STORAGE_MODE` alias. */
|
|
20
|
-
modeKeys: string[];
|
|
21
|
-
/** `HASNA_<NAME>_DATABASE_URL` then the optional `<NAME>_DATABASE_URL` alias. */
|
|
22
|
-
databaseUrlKeys: string[];
|
|
23
|
-
}
|
|
24
|
-
/** Resolve the canonical env-key spec for an app's storage config. */
|
|
25
|
-
export declare function storageEnvKeys(name: string): StorageEnvKeys;
|
|
26
|
-
export interface StorageModeResolution {
|
|
27
|
-
mode: StorageMode;
|
|
28
|
-
/** Env key the mode came from, or `"default"`. */
|
|
29
|
-
source: string;
|
|
30
|
-
deprecatedAlias: string | null;
|
|
31
|
-
databaseUrlPresent: boolean;
|
|
32
|
-
/** Env key the database URL came from, or `null`. */
|
|
33
|
-
databaseUrlSource: string | null;
|
|
34
|
-
warning: string | null;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Resolve an app's storage mode from the environment per the contract env spec.
|
|
38
|
-
* Precedence: `HASNA_<NAME>_STORAGE_MODE`, then `<NAME>_STORAGE_MODE`, else
|
|
39
|
-
* `local`. Never reads secret values — only detects DATABASE_URL presence.
|
|
40
|
-
*/
|
|
41
|
-
export declare function resolveStorageMode(name: string, env?: Env): StorageModeResolution;
|
|
42
|
-
/**
|
|
43
|
-
* Resolve the database URL value for an app, honoring the canonical then alias
|
|
44
|
-
* env keys. Returns `null` when unset. The caller is responsible for never
|
|
45
|
-
* logging the returned value.
|
|
46
|
-
*/
|
|
47
|
-
export declare function resolveDatabaseUrl(name: string, env?: Env): string | null;
|
|
48
|
-
//# sourceMappingURL=mode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mode.d.ts","sourceRoot":"","sources":["../../../src/generated/storage-kit/mode.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,aAAa,6BAA8B,CAAC;AACzD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,eAAO,MAAM,+BAA+B,8CAIlC,CAAC;AAEX,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAErD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,WAAW,CAAC;IAClB,mEAAmE;IACnE,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,G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