@hasna/instructions 0.3.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/LICENSE +191 -0
- package/README.md +180 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +8080 -0
- package/dist/cli/output.test.d.ts +2 -0
- package/dist/cli/output.test.d.ts.map +1 -0
- package/dist/cli/session.test.d.ts +2 -0
- package/dist/cli/session.test.d.ts.map +1 -0
- package/dist/cli/storage.d.ts +3 -0
- package/dist/cli/storage.d.ts.map +1 -0
- package/dist/cli/storage.test.d.ts +2 -0
- package/dist/cli/storage.test.d.ts.map +1 -0
- package/dist/db/configs.d.ts +10 -0
- package/dist/db/configs.d.ts.map +1 -0
- package/dist/db/configs.test.d.ts +2 -0
- package/dist/db/configs.test.d.ts.map +1 -0
- package/dist/db/database.d.ts +7 -0
- package/dist/db/database.d.ts.map +1 -0
- package/dist/db/database.test.d.ts +2 -0
- package/dist/db/database.test.d.ts.map +1 -0
- package/dist/db/machines.d.ts +9 -0
- package/dist/db/machines.d.ts.map +1 -0
- package/dist/db/machines.test.d.ts +2 -0
- package/dist/db/machines.test.d.ts.map +1 -0
- package/dist/db/pg-migrations.d.ts +7 -0
- package/dist/db/pg-migrations.d.ts.map +1 -0
- package/dist/db/profiles.d.ts +14 -0
- package/dist/db/profiles.d.ts.map +1 -0
- package/dist/db/profiles.test.d.ts +2 -0
- package/dist/db/profiles.test.d.ts.map +1 -0
- package/dist/db/remote-storage.d.ts +13 -0
- package/dist/db/remote-storage.d.ts.map +1 -0
- package/dist/db/snapshots.d.ts +8 -0
- package/dist/db/snapshots.d.ts.map +1 -0
- package/dist/db/snapshots.test.d.ts +2 -0
- package/dist/db/snapshots.test.d.ts.map +1 -0
- package/dist/db/storage-sync.d.ts +53 -0
- package/dist/db/storage-sync.d.ts.map +1 -0
- package/dist/db/storage-sync.test.d.ts +2 -0
- package/dist/db/storage-sync.test.d.ts.map +1 -0
- package/dist/generated/storage-kit/health.d.ts +20 -0
- package/dist/generated/storage-kit/health.d.ts.map +1 -0
- package/dist/generated/storage-kit/index.d.ts +8 -0
- package/dist/generated/storage-kit/index.d.ts.map +1 -0
- package/dist/generated/storage-kit/migrations.d.ts +48 -0
- package/dist/generated/storage-kit/migrations.d.ts.map +1 -0
- 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 +34 -0
- package/dist/generated/storage-kit/pool.d.ts.map +1 -0
- package/dist/generated/storage-kit/query.d.ts +36 -0
- package/dist/generated/storage-kit/query.d.ts.map +1 -0
- package/dist/generated/storage-kit/tls.d.ts +26 -0
- package/dist/generated/storage-kit/tls.d.ts.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3749 -0
- package/dist/lib/apply-batch.test.d.ts +2 -0
- package/dist/lib/apply-batch.test.d.ts.map +1 -0
- package/dist/lib/apply.d.ts +16 -0
- package/dist/lib/apply.d.ts.map +1 -0
- package/dist/lib/apply.test.d.ts +2 -0
- package/dist/lib/apply.test.d.ts.map +1 -0
- package/dist/lib/compact-output.d.ts +78 -0
- package/dist/lib/compact-output.d.ts.map +1 -0
- package/dist/lib/compact-output.test.d.ts +2 -0
- package/dist/lib/compact-output.test.d.ts.map +1 -0
- package/dist/lib/export-import.test.d.ts +2 -0
- package/dist/lib/export-import.test.d.ts.map +1 -0
- package/dist/lib/export.d.ts +12 -0
- package/dist/lib/export.d.ts.map +1 -0
- package/dist/lib/import.d.ts +14 -0
- package/dist/lib/import.d.ts.map +1 -0
- package/dist/lib/machine.d.ts +21 -0
- package/dist/lib/machine.d.ts.map +1 -0
- package/dist/lib/machine.test.d.ts +2 -0
- package/dist/lib/machine.test.d.ts.map +1 -0
- package/dist/lib/package-version.d.ts +2 -0
- package/dist/lib/package-version.d.ts.map +1 -0
- package/dist/lib/platform-profiles.d.ts +5 -0
- package/dist/lib/platform-profiles.d.ts.map +1 -0
- package/dist/lib/project-dashboard-standard.d.ts +7 -0
- package/dist/lib/project-dashboard-standard.d.ts.map +1 -0
- package/dist/lib/project-dashboard-standard.test.d.ts +2 -0
- package/dist/lib/project-dashboard-standard.test.d.ts.map +1 -0
- package/dist/lib/redact.d.ts +29 -0
- package/dist/lib/redact.d.ts.map +1 -0
- package/dist/lib/redact.test.d.ts +2 -0
- package/dist/lib/redact.test.d.ts.map +1 -0
- package/dist/lib/session-apply.d.ts +48 -0
- package/dist/lib/session-apply.d.ts.map +1 -0
- package/dist/lib/session-apply.test.d.ts +2 -0
- package/dist/lib/session-apply.test.d.ts.map +1 -0
- package/dist/lib/session-render.d.ts +176 -0
- package/dist/lib/session-render.d.ts.map +1 -0
- package/dist/lib/session-render.test.d.ts +2 -0
- package/dist/lib/session-render.test.d.ts.map +1 -0
- package/dist/lib/sync-dir.d.ts +13 -0
- package/dist/lib/sync-dir.d.ts.map +1 -0
- package/dist/lib/sync-dir.test.d.ts +2 -0
- package/dist/lib/sync-dir.test.d.ts.map +1 -0
- package/dist/lib/sync-known.test.d.ts +2 -0
- package/dist/lib/sync-known.test.d.ts.map +1 -0
- package/dist/lib/sync.d.ts +54 -0
- package/dist/lib/sync.d.ts.map +1 -0
- package/dist/lib/sync.test.d.ts +2 -0
- package/dist/lib/sync.test.d.ts.map +1 -0
- package/dist/lib/template.d.ts +10 -0
- package/dist/lib/template.d.ts.map +1 -0
- package/dist/lib/template.test.d.ts +2 -0
- package/dist/lib/template.test.d.ts.map +1 -0
- package/dist/lib/transforms.d.ts +11 -0
- package/dist/lib/transforms.d.ts.map +1 -0
- package/dist/lib/transforms.test.d.ts +2 -0
- package/dist/lib/transforms.test.d.ts.map +1 -0
- package/dist/mcp/http.d.ts +28 -0
- package/dist/mcp/http.d.ts.map +1 -0
- package/dist/mcp/http.test.d.ts +2 -0
- package/dist/mcp/http.test.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +2591 -0
- package/dist/mcp/mcp.test.d.ts +2 -0
- package/dist/mcp/mcp.test.d.ts.map +1 -0
- package/dist/mcp/server.d.ts +4 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/server/cloud.d.ts +39 -0
- package/dist/server/cloud.d.ts.map +1 -0
- package/dist/server/index.d.ts +8 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +19062 -0
- package/dist/server/openapi.d.ts +578 -0
- package/dist/server/openapi.d.ts.map +1 -0
- package/dist/server/server.test.d.ts +2 -0
- package/dist/server/server.test.d.ts.map +1 -0
- package/dist/server/v1.d.ts +9 -0
- package/dist/server/v1.d.ts.map +1 -0
- package/dist/status.d.ts +56 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/status.test.d.ts +2 -0
- package/dist/status.test.d.ts.map +1 -0
- package/dist/storage/cloud-store.d.ts +17 -0
- package/dist/storage/cloud-store.d.ts.map +1 -0
- package/dist/storage/schema.d.ts +12 -0
- package/dist/storage/schema.d.ts.map +1 -0
- package/dist/storage.d.ts +5 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +537 -0
- package/dist/types/index.d.ts +189 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +96 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
export declare const CONFIG_KINDS: readonly ["file", "reference"];
|
|
2
|
+
export type ConfigKind = (typeof CONFIG_KINDS)[number];
|
|
3
|
+
export declare const CONFIG_CATEGORIES: readonly ["agent", "rules", "mcp", "shell", "secrets_schema", "workspace", "git", "tools"];
|
|
4
|
+
export type ConfigCategory = (typeof CONFIG_CATEGORIES)[number];
|
|
5
|
+
export declare const CONFIG_AGENTS: readonly ["claude", "codex", "gemini", "opencode", "cursor", "codewith", "aicopilot", "zsh", "git", "npm", "global"];
|
|
6
|
+
export type ConfigAgent = (typeof CONFIG_AGENTS)[number];
|
|
7
|
+
export declare const CONFIG_TRANSFORMS: readonly ["passthrough", "claude-passthrough", "codex-flat", "opencode-flat", "cursor-mdc", "skill-neutral"];
|
|
8
|
+
export type ConfigTransform = (typeof CONFIG_TRANSFORMS)[number];
|
|
9
|
+
export interface ConfigOutput {
|
|
10
|
+
agent: ConfigAgent;
|
|
11
|
+
target_path: string;
|
|
12
|
+
transform: ConfigTransform;
|
|
13
|
+
}
|
|
14
|
+
export declare const CONFIG_FORMATS: readonly ["text", "json", "toml", "yaml", "markdown", "ini"];
|
|
15
|
+
export type ConfigFormat = (typeof CONFIG_FORMATS)[number];
|
|
16
|
+
export interface Config {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
slug: string;
|
|
20
|
+
kind: ConfigKind;
|
|
21
|
+
category: ConfigCategory;
|
|
22
|
+
agent: ConfigAgent;
|
|
23
|
+
target_path: string | null;
|
|
24
|
+
outputs: ConfigOutput[];
|
|
25
|
+
format: ConfigFormat;
|
|
26
|
+
content: string;
|
|
27
|
+
description: string | null;
|
|
28
|
+
tags: string[];
|
|
29
|
+
is_template: boolean;
|
|
30
|
+
version: number;
|
|
31
|
+
created_at: string;
|
|
32
|
+
updated_at: string;
|
|
33
|
+
synced_at: string | null;
|
|
34
|
+
}
|
|
35
|
+
export interface ConfigRow {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
slug: string;
|
|
39
|
+
kind: string;
|
|
40
|
+
category: string;
|
|
41
|
+
agent: string;
|
|
42
|
+
target_path: string | null;
|
|
43
|
+
outputs: string;
|
|
44
|
+
format: string;
|
|
45
|
+
content: string;
|
|
46
|
+
description: string | null;
|
|
47
|
+
tags: string;
|
|
48
|
+
is_template: number;
|
|
49
|
+
version: number;
|
|
50
|
+
created_at: string;
|
|
51
|
+
updated_at: string;
|
|
52
|
+
synced_at: string | null;
|
|
53
|
+
}
|
|
54
|
+
export interface CreateConfigInput {
|
|
55
|
+
name: string;
|
|
56
|
+
kind?: ConfigKind;
|
|
57
|
+
category: ConfigCategory;
|
|
58
|
+
agent?: ConfigAgent;
|
|
59
|
+
target_path?: string | null;
|
|
60
|
+
outputs?: ConfigOutput[];
|
|
61
|
+
format?: ConfigFormat;
|
|
62
|
+
content: string;
|
|
63
|
+
description?: string;
|
|
64
|
+
tags?: string[];
|
|
65
|
+
is_template?: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface UpdateConfigInput {
|
|
68
|
+
name?: string;
|
|
69
|
+
kind?: ConfigKind;
|
|
70
|
+
category?: ConfigCategory;
|
|
71
|
+
agent?: ConfigAgent;
|
|
72
|
+
target_path?: string | null;
|
|
73
|
+
outputs?: ConfigOutput[];
|
|
74
|
+
format?: ConfigFormat;
|
|
75
|
+
content?: string;
|
|
76
|
+
description?: string;
|
|
77
|
+
tags?: string[];
|
|
78
|
+
is_template?: boolean;
|
|
79
|
+
synced_at?: string | null;
|
|
80
|
+
}
|
|
81
|
+
export interface ConfigFilter {
|
|
82
|
+
category?: ConfigCategory;
|
|
83
|
+
agent?: ConfigAgent;
|
|
84
|
+
kind?: ConfigKind;
|
|
85
|
+
tags?: string[];
|
|
86
|
+
search?: string;
|
|
87
|
+
is_template?: boolean;
|
|
88
|
+
}
|
|
89
|
+
export interface ConfigSnapshot {
|
|
90
|
+
id: string;
|
|
91
|
+
config_id: string;
|
|
92
|
+
content: string;
|
|
93
|
+
version: number;
|
|
94
|
+
created_at: string;
|
|
95
|
+
}
|
|
96
|
+
export interface Profile {
|
|
97
|
+
id: string;
|
|
98
|
+
name: string;
|
|
99
|
+
slug: string;
|
|
100
|
+
description: string | null;
|
|
101
|
+
selectors: ProfileSelector;
|
|
102
|
+
variables: ProfileVariables;
|
|
103
|
+
created_at: string;
|
|
104
|
+
updated_at: string;
|
|
105
|
+
}
|
|
106
|
+
export interface ProfileRow {
|
|
107
|
+
id: string;
|
|
108
|
+
name: string;
|
|
109
|
+
slug: string;
|
|
110
|
+
description: string | null;
|
|
111
|
+
selectors: string;
|
|
112
|
+
variables: string;
|
|
113
|
+
created_at: string;
|
|
114
|
+
updated_at: string;
|
|
115
|
+
}
|
|
116
|
+
export interface ProfileSelector {
|
|
117
|
+
os?: string[];
|
|
118
|
+
arch?: string[];
|
|
119
|
+
hostnames?: string[];
|
|
120
|
+
}
|
|
121
|
+
export type ProfileVariables = Record<string, string>;
|
|
122
|
+
export interface CreateProfileInput {
|
|
123
|
+
name: string;
|
|
124
|
+
description?: string;
|
|
125
|
+
selectors?: ProfileSelector;
|
|
126
|
+
variables?: ProfileVariables;
|
|
127
|
+
}
|
|
128
|
+
export interface UpdateProfileInput {
|
|
129
|
+
name?: string;
|
|
130
|
+
description?: string;
|
|
131
|
+
selectors?: ProfileSelector;
|
|
132
|
+
variables?: ProfileVariables;
|
|
133
|
+
}
|
|
134
|
+
export interface ProfileConfig {
|
|
135
|
+
profile_id: string;
|
|
136
|
+
config_id: string;
|
|
137
|
+
order: number;
|
|
138
|
+
}
|
|
139
|
+
export interface Machine {
|
|
140
|
+
id: string;
|
|
141
|
+
hostname: string;
|
|
142
|
+
os: string | null;
|
|
143
|
+
arch: string | null;
|
|
144
|
+
last_applied_at: string | null;
|
|
145
|
+
created_at: string;
|
|
146
|
+
}
|
|
147
|
+
export interface MachineContext extends Machine {
|
|
148
|
+
os_family: string;
|
|
149
|
+
home_dir: string;
|
|
150
|
+
workspace_root: string;
|
|
151
|
+
bun_bin_dir: string;
|
|
152
|
+
bun_path: string;
|
|
153
|
+
path_prefix: string;
|
|
154
|
+
}
|
|
155
|
+
export interface ApplyResult {
|
|
156
|
+
config_id: string;
|
|
157
|
+
path: string;
|
|
158
|
+
previous_content: string | null;
|
|
159
|
+
new_content: string;
|
|
160
|
+
dry_run: boolean;
|
|
161
|
+
changed: boolean;
|
|
162
|
+
agent?: ConfigAgent;
|
|
163
|
+
transform?: ConfigTransform;
|
|
164
|
+
outputs?: ApplyResult[];
|
|
165
|
+
}
|
|
166
|
+
export interface SyncResult {
|
|
167
|
+
added: number;
|
|
168
|
+
updated: number;
|
|
169
|
+
unchanged: number;
|
|
170
|
+
skipped: string[];
|
|
171
|
+
}
|
|
172
|
+
export interface ExportManifest {
|
|
173
|
+
version: string;
|
|
174
|
+
exported_at: string;
|
|
175
|
+
configs: Array<Omit<Config, "content">>;
|
|
176
|
+
}
|
|
177
|
+
export declare class ConfigNotFoundError extends Error {
|
|
178
|
+
constructor(id: string);
|
|
179
|
+
}
|
|
180
|
+
export declare class ProfileNotFoundError extends Error {
|
|
181
|
+
constructor(id: string);
|
|
182
|
+
}
|
|
183
|
+
export declare class ConfigApplyError extends Error {
|
|
184
|
+
constructor(message: string);
|
|
185
|
+
}
|
|
186
|
+
export declare class TemplateRenderError extends Error {
|
|
187
|
+
constructor(message: string);
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY,gCAAiC,CAAC;AAC3D,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAGvD,eAAO,MAAM,iBAAiB,4FASpB,CAAC;AACX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAGhE,eAAO,MAAM,aAAa,sHAYhB,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAGzD,eAAO,MAAM,iBAAiB,8GAOpB,CAAC;AACX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,eAAe,CAAC;CAC5B;AAGD,eAAO,MAAM,cAAc,8DAOjB,CAA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E,MAAM,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;CACzC;AAGD,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,EAAE,EAAE,MAAM;CAIvB;AAED,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,EAAE,EAAE,MAAM;CAIvB;AAED,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B"}
|
package/package.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hasna/instructions",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "AI coding agent instruction & configuration manager — store, version, apply, and share all your AI coding configs. CLI + MCP + HTTP API (instructions-serve) + generated SDK + Dashboard.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"instructions": "dist/cli/index.js",
|
|
10
|
+
"instructions-mcp": "dist/mcp/index.js",
|
|
11
|
+
"instructions-serve": "dist/server/index.js",
|
|
12
|
+
"configs-mcp": "dist/mcp/index.js"
|
|
13
|
+
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./storage": {
|
|
20
|
+
"types": "./dist/storage.d.ts",
|
|
21
|
+
"import": "./dist/storage.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist",
|
|
26
|
+
"dashboard/dist",
|
|
27
|
+
"LICENSE",
|
|
28
|
+
"README.md"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"clean": "rm -rf dist",
|
|
32
|
+
"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 src/storage.ts --outdir dist --target bun --external pg && tsc --emitDeclarationOnly --outDir dist",
|
|
33
|
+
"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 src/storage.ts --outdir dist --target bun --external pg",
|
|
34
|
+
"build:dashboard": "cd dashboard && bun run build",
|
|
35
|
+
"migrate": "bun run src/server/index.ts migrate",
|
|
36
|
+
"generate:sdk": "bun run scripts/generate-sdk.ts",
|
|
37
|
+
"kit:check": "bunx @hasna/contracts vendor-kit --check",
|
|
38
|
+
"typecheck": "tsc --noEmit",
|
|
39
|
+
"test": "bun test",
|
|
40
|
+
"dev:cli": "bun run src/cli/index.tsx",
|
|
41
|
+
"dev:mcp": "bun run src/mcp/index.ts",
|
|
42
|
+
"dev:serve": "bun run src/server/index.ts",
|
|
43
|
+
"seed": "bun run scripts/seed.ts",
|
|
44
|
+
"prepublishOnly": "bun run build",
|
|
45
|
+
"postinstall": "mkdir -p $HOME/.hasna/instructions $HOME/.hasna/instructions/backups 2>/dev/null || true"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"instructions",
|
|
49
|
+
"configs",
|
|
50
|
+
"dotfiles",
|
|
51
|
+
"agent-config",
|
|
52
|
+
"claude",
|
|
53
|
+
"codex",
|
|
54
|
+
"gemini",
|
|
55
|
+
"mcp",
|
|
56
|
+
"ai",
|
|
57
|
+
"coding-agent",
|
|
58
|
+
"cli",
|
|
59
|
+
"dashboard"
|
|
60
|
+
],
|
|
61
|
+
"publishConfig": {
|
|
62
|
+
"registry": "https://registry.npmjs.org",
|
|
63
|
+
"access": "public"
|
|
64
|
+
},
|
|
65
|
+
"repository": {
|
|
66
|
+
"type": "git",
|
|
67
|
+
"url": "git+https://github.com/hasna/instructions.git"
|
|
68
|
+
},
|
|
69
|
+
"homepage": "https://github.com/hasna/instructions",
|
|
70
|
+
"bugs": {
|
|
71
|
+
"url": "https://github.com/hasna/instructions/issues"
|
|
72
|
+
},
|
|
73
|
+
"engines": {
|
|
74
|
+
"bun": ">=1.0.0"
|
|
75
|
+
},
|
|
76
|
+
"author": "Andrei Hasna <andrei@hasna.com>",
|
|
77
|
+
"license": "Apache-2.0",
|
|
78
|
+
"dependencies": {
|
|
79
|
+
"@hasna/contracts": "^0.4.1",
|
|
80
|
+
"@hasna/events": "^0.1.6",
|
|
81
|
+
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
82
|
+
"chalk": "^5.4.1",
|
|
83
|
+
"commander": "^13.1.0",
|
|
84
|
+
"hono": "^4.7.4",
|
|
85
|
+
"ink": "^5.2.0",
|
|
86
|
+
"pg": "^8.13.3",
|
|
87
|
+
"react": "^18.3.1",
|
|
88
|
+
"zod": "^3.24.2"
|
|
89
|
+
},
|
|
90
|
+
"devDependencies": {
|
|
91
|
+
"@types/bun": "^1.2.4",
|
|
92
|
+
"@types/pg": "^8.11.11",
|
|
93
|
+
"@types/react": "^18.3.18",
|
|
94
|
+
"typescript": "^5.7.3"
|
|
95
|
+
}
|
|
96
|
+
}
|