@hasna/instructions 0.6.0 → 0.7.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.
Files changed (265) hide show
  1. package/README.md +149 -8
  2. package/dist/chunks/apply-7svah2qm.js +25 -0
  3. package/dist/chunks/apply-jp13sa1e.js +25 -0
  4. package/dist/chunks/database-wstmr56z.js +23 -0
  5. package/dist/chunks/index-1cnyjnd7.js +623 -0
  6. package/dist/chunks/index-35z65jsa.js +198 -0
  7. package/dist/chunks/index-3djthcm6.js +117 -0
  8. package/dist/chunks/index-4pfq42t5.js +7300 -0
  9. package/dist/chunks/index-5d7zdftc.js +186 -0
  10. package/dist/chunks/index-7m4j8a33.js +12578 -0
  11. package/dist/chunks/index-8rb7ng2y.js +148 -0
  12. package/dist/chunks/index-arrrx0ed.js +344 -0
  13. package/dist/chunks/index-bsan4c16.js +48 -0
  14. package/dist/chunks/index-bzyxvwcd.js +625 -0
  15. package/dist/chunks/index-fpeyzn3n.js +186 -0
  16. package/dist/chunks/index-fwbs6tma.js +534 -0
  17. package/dist/chunks/index-ma2xmp6c.js +14 -0
  18. package/dist/chunks/index-n3fjspr0.js +119 -0
  19. package/dist/chunks/index-nnwp92tk.js +19 -0
  20. package/dist/chunks/index-z3ma4aqk.js +532 -0
  21. package/dist/chunks/legacy-store-migration-z2m5yzyk.js +322 -0
  22. package/dist/chunks/local-5wvv5xv3.js +694 -0
  23. package/dist/chunks/local-zxa5dpf4.js +518 -0
  24. package/dist/chunks/package-manager-guard-x70xrwk2.js +391 -0
  25. package/dist/chunks/redact-hnq4sc4r.js +16 -0
  26. package/dist/chunks/s3-backup-n2z4fwyh.js +240 -0
  27. package/dist/chunks/s3-config-hhght91k.js +14 -0
  28. package/dist/chunks/s3-object-store-90tgbh6k.js +14 -0
  29. package/dist/chunks/sync-2075deve.js +34 -0
  30. package/dist/chunks/sync-r8t7zsp3.js +34 -0
  31. package/dist/chunks/template-fsfxpe4p.js +16 -0
  32. package/dist/chunks/template-wgnzdn7h.js +16 -0
  33. package/dist/cli/index.js +1681 -15643
  34. package/dist/data/config-store.d.ts +2 -1
  35. package/dist/data/config-store.d.ts.map +1 -1
  36. package/dist/db/database.d.ts +3 -5
  37. package/dist/db/database.d.ts.map +1 -1
  38. package/dist/db/local.d.ts +38 -0
  39. package/dist/db/local.d.ts.map +1 -0
  40. package/dist/index.d.ts +1 -1
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +13809 -12998
  43. package/dist/lib/apply.d.ts +7 -0
  44. package/dist/lib/apply.d.ts.map +1 -1
  45. package/dist/lib/compact-output.d.ts +1 -0
  46. package/dist/lib/compact-output.d.ts.map +1 -1
  47. package/dist/lib/export.d.ts +22 -3
  48. package/dist/lib/export.d.ts.map +1 -1
  49. package/dist/lib/ids.d.ts +4 -0
  50. package/dist/lib/ids.d.ts.map +1 -0
  51. package/dist/lib/import.d.ts +18 -0
  52. package/dist/lib/import.d.ts.map +1 -1
  53. package/dist/lib/instruction-graph.d.ts.map +1 -1
  54. package/dist/lib/legacy-store-migration.d.ts +39 -0
  55. package/dist/lib/legacy-store-migration.d.ts.map +1 -0
  56. package/dist/lib/managed-skill-runtimes.d.ts +1 -0
  57. package/dist/lib/managed-skill-runtimes.d.ts.map +1 -1
  58. package/dist/lib/session-render.d.ts +3 -0
  59. package/dist/lib/session-render.d.ts.map +1 -1
  60. package/dist/lib/sync-dir.d.ts.map +1 -1
  61. package/dist/mcp/index.js +73 -9462
  62. package/dist/sdk/index.d.ts +2 -0
  63. package/dist/sdk/index.d.ts.map +1 -1
  64. package/dist/sdk/index.js +205 -10
  65. package/dist/sdk/resolve.d.ts +1 -1
  66. package/dist/sdk/resolve.d.ts.map +1 -1
  67. package/dist/sdk/v1-client.d.ts +57 -0
  68. package/dist/sdk/v1-client.d.ts.map +1 -0
  69. package/dist/sdk/v1.generated.d.ts +212 -21
  70. package/dist/sdk/v1.generated.d.ts.map +1 -1
  71. package/dist/server/cloud.d.ts.map +1 -1
  72. package/dist/server/index.d.ts +13 -5
  73. package/dist/server/index.d.ts.map +1 -1
  74. package/dist/server/index.js +8337 -7495
  75. package/dist/server/openapi.d.ts +1264 -92
  76. package/dist/server/openapi.d.ts.map +1 -1
  77. package/dist/server/v1.d.ts +25 -1
  78. package/dist/server/v1.d.ts.map +1 -1
  79. package/dist/status.d.ts +12 -2
  80. package/dist/status.d.ts.map +1 -1
  81. package/dist/storage/cloud-store.d.ts +57 -1
  82. package/dist/storage/cloud-store.d.ts.map +1 -1
  83. package/dist/storage/index.d.ts +7 -0
  84. package/dist/storage/index.d.ts.map +1 -0
  85. package/dist/storage/index.js +725 -0
  86. package/dist/storage/s3-backup.d.ts +76 -0
  87. package/dist/storage/s3-backup.d.ts.map +1 -0
  88. package/dist/storage/s3-config.d.ts +46 -0
  89. package/dist/storage/s3-config.d.ts.map +1 -0
  90. package/dist/storage/s3-object-store.d.ts +70 -0
  91. package/dist/storage/s3-object-store.d.ts.map +1 -0
  92. package/dist/types/index.d.ts +65 -3
  93. package/dist/types/index.d.ts.map +1 -1
  94. package/hasna.contract.json +110 -0
  95. package/migrations/0001_instructions.sql +63 -0
  96. package/migrations/0002_api_keys.sql +20 -0
  97. package/migrations/0003_idempotency_receipts.sql +24 -0
  98. package/package.json +29 -14
  99. package/assets/skills/inbox/SKILL.md +0 -86
  100. package/dist/cli/add-duplicate-target.test.d.ts +0 -2
  101. package/dist/cli/add-duplicate-target.test.d.ts.map +0 -1
  102. package/dist/cli/add-reference-update.test.d.ts +0 -2
  103. package/dist/cli/add-reference-update.test.d.ts.map +0 -1
  104. package/dist/cli/apply-unchanged-snapshot-bloat.test.d.ts +0 -2
  105. package/dist/cli/apply-unchanged-snapshot-bloat.test.d.ts.map +0 -1
  106. package/dist/cli/doctor-reference-duplicates.test.d.ts +0 -2
  107. package/dist/cli/doctor-reference-duplicates.test.d.ts.map +0 -1
  108. package/dist/cli/fail-closed-no-env.test.d.ts +0 -2
  109. package/dist/cli/fail-closed-no-env.test.d.ts.map +0 -1
  110. package/dist/cli/output.test.d.ts +0 -2
  111. package/dist/cli/output.test.d.ts.map +0 -1
  112. package/dist/cli/profile-binding.test.d.ts +0 -2
  113. package/dist/cli/profile-binding.test.d.ts.map +0 -1
  114. package/dist/cli/profile-reads.test.d.ts +0 -2
  115. package/dist/cli/profile-reads.test.d.ts.map +0 -1
  116. package/dist/cli/profile-update.test.d.ts +0 -2
  117. package/dist/cli/profile-update.test.d.ts.map +0 -1
  118. package/dist/cli/project-context.test.d.ts +0 -2
  119. package/dist/cli/project-context.test.d.ts.map +0 -1
  120. package/dist/cli/raw-store-root.test.d.ts +0 -2
  121. package/dist/cli/raw-store-root.test.d.ts.map +0 -1
  122. package/dist/cli/session-apply-managed-input-bound.test.d.ts +0 -2
  123. package/dist/cli/session-apply-managed-input-bound.test.d.ts.map +0 -1
  124. package/dist/cli/session.test.d.ts +0 -2
  125. package/dist/cli/session.test.d.ts.map +0 -1
  126. package/dist/cli/station-profile.test.d.ts +0 -2
  127. package/dist/cli/station-profile.test.d.ts.map +0 -1
  128. package/dist/data/config-store.test.d.ts +0 -2
  129. package/dist/data/config-store.test.d.ts.map +0 -1
  130. package/dist/db/configs.test.d.ts +0 -2
  131. package/dist/db/configs.test.d.ts.map +0 -1
  132. package/dist/db/database.test.d.ts +0 -2
  133. package/dist/db/database.test.d.ts.map +0 -1
  134. package/dist/db/machines.test.d.ts +0 -2
  135. package/dist/db/machines.test.d.ts.map +0 -1
  136. package/dist/db/profile-assets.test.d.ts +0 -2
  137. package/dist/db/profile-assets.test.d.ts.map +0 -1
  138. package/dist/db/profile-config-bindings.test.d.ts +0 -2
  139. package/dist/db/profile-config-bindings.test.d.ts.map +0 -1
  140. package/dist/db/profiles.test.d.ts +0 -2
  141. package/dist/db/profiles.test.d.ts.map +0 -1
  142. package/dist/db/snapshots.test.d.ts +0 -2
  143. package/dist/db/snapshots.test.d.ts.map +0 -1
  144. package/dist/lib/app-home.test.d.ts +0 -2
  145. package/dist/lib/app-home.test.d.ts.map +0 -1
  146. package/dist/lib/apply-batch.test.d.ts +0 -2
  147. package/dist/lib/apply-batch.test.d.ts.map +0 -1
  148. package/dist/lib/apply-dry-run-verdict.test.d.ts +0 -2
  149. package/dist/lib/apply-dry-run-verdict.test.d.ts.map +0 -1
  150. package/dist/lib/apply-secret-placeholder-guard.test.d.ts +0 -2
  151. package/dist/lib/apply-secret-placeholder-guard.test.d.ts.map +0 -1
  152. package/dist/lib/apply-text-format-credential-guard.test.d.ts +0 -2
  153. package/dist/lib/apply-text-format-credential-guard.test.d.ts.map +0 -1
  154. package/dist/lib/apply.test.d.ts +0 -2
  155. package/dist/lib/apply.test.d.ts.map +0 -1
  156. package/dist/lib/asset-plan.test.d.ts +0 -2
  157. package/dist/lib/asset-plan.test.d.ts.map +0 -1
  158. package/dist/lib/client-types.test.d.ts +0 -2
  159. package/dist/lib/client-types.test.d.ts.map +0 -1
  160. package/dist/lib/codewith-shared-todos-storage-standard.test.d.ts +0 -2
  161. package/dist/lib/codewith-shared-todos-storage-standard.test.d.ts.map +0 -1
  162. package/dist/lib/compact-output.test.d.ts +0 -2
  163. package/dist/lib/compact-output.test.d.ts.map +0 -1
  164. package/dist/lib/config-target-identity.test.d.ts +0 -2
  165. package/dist/lib/config-target-identity.test.d.ts.map +0 -1
  166. package/dist/lib/cursor-authority.test.d.ts +0 -2
  167. package/dist/lib/cursor-authority.test.d.ts.map +0 -1
  168. package/dist/lib/dangerous-operation-guard-standard.test.d.ts +0 -2
  169. package/dist/lib/dangerous-operation-guard-standard.test.d.ts.map +0 -1
  170. package/dist/lib/diff-redaction.test.d.ts +0 -2
  171. package/dist/lib/diff-redaction.test.d.ts.map +0 -1
  172. package/dist/lib/export-import.test.d.ts +0 -2
  173. package/dist/lib/export-import.test.d.ts.map +0 -1
  174. package/dist/lib/global-agent-rules-render-integration.test.d.ts +0 -2
  175. package/dist/lib/global-agent-rules-render-integration.test.d.ts.map +0 -1
  176. package/dist/lib/global-agent-rules-standard.test.d.ts +0 -2
  177. package/dist/lib/global-agent-rules-standard.test.d.ts.map +0 -1
  178. package/dist/lib/global-agent-rules-stored-content.test.d.ts +0 -2
  179. package/dist/lib/global-agent-rules-stored-content.test.d.ts.map +0 -1
  180. package/dist/lib/global-source-coverage.test.d.ts +0 -2
  181. package/dist/lib/global-source-coverage.test.d.ts.map +0 -1
  182. package/dist/lib/instruction-graph-apply.test.d.ts +0 -2
  183. package/dist/lib/instruction-graph-apply.test.d.ts.map +0 -1
  184. package/dist/lib/instruction-graph.test.d.ts +0 -2
  185. package/dist/lib/instruction-graph.test.d.ts.map +0 -1
  186. package/dist/lib/machine.test.d.ts +0 -2
  187. package/dist/lib/machine.test.d.ts.map +0 -1
  188. package/dist/lib/managed-skill-runtimes.test.d.ts +0 -2
  189. package/dist/lib/managed-skill-runtimes.test.d.ts.map +0 -1
  190. package/dist/lib/package-manager-guard.test.d.ts +0 -2
  191. package/dist/lib/package-manager-guard.test.d.ts.map +0 -1
  192. package/dist/lib/project-context-prepared-file.test.d.ts +0 -2
  193. package/dist/lib/project-context-prepared-file.test.d.ts.map +0 -1
  194. package/dist/lib/project-context.test.d.ts +0 -2
  195. package/dist/lib/project-context.test.d.ts.map +0 -1
  196. package/dist/lib/project-dashboard-standard.test.d.ts +0 -2
  197. package/dist/lib/project-dashboard-standard.test.d.ts.map +0 -1
  198. package/dist/lib/provider-assets-adapters.test.d.ts +0 -2
  199. package/dist/lib/provider-assets-adapters.test.d.ts.map +0 -1
  200. package/dist/lib/provider-context.test.d.ts +0 -2
  201. package/dist/lib/provider-context.test.d.ts.map +0 -1
  202. package/dist/lib/provider-version-adapters.test.d.ts +0 -2
  203. package/dist/lib/provider-version-adapters.test.d.ts.map +0 -1
  204. package/dist/lib/redact.test.d.ts +0 -2
  205. package/dist/lib/redact.test.d.ts.map +0 -1
  206. package/dist/lib/session-apply.test.d.ts +0 -2
  207. package/dist/lib/session-apply.test.d.ts.map +0 -1
  208. package/dist/lib/session-authority.test.d.ts +0 -2
  209. package/dist/lib/session-authority.test.d.ts.map +0 -1
  210. package/dist/lib/session-render-managed-output-bound.test.d.ts +0 -2
  211. package/dist/lib/session-render-managed-output-bound.test.d.ts.map +0 -1
  212. package/dist/lib/session-render-ownership.test.d.ts +0 -2
  213. package/dist/lib/session-render-ownership.test.d.ts.map +0 -1
  214. package/dist/lib/session-render-rule-currency-floor.test.d.ts +0 -2
  215. package/dist/lib/session-render-rule-currency-floor.test.d.ts.map +0 -1
  216. package/dist/lib/session-render-silent-source-drop.test.d.ts +0 -2
  217. package/dist/lib/session-render-silent-source-drop.test.d.ts.map +0 -1
  218. package/dist/lib/session-render-state-hermeticity.test.d.ts +0 -2
  219. package/dist/lib/session-render-state-hermeticity.test.d.ts.map +0 -1
  220. package/dist/lib/session-render-state.test.d.ts +0 -2
  221. package/dist/lib/session-render-state.test.d.ts.map +0 -1
  222. package/dist/lib/session-render.test.d.ts +0 -2
  223. package/dist/lib/session-render.test.d.ts.map +0 -1
  224. package/dist/lib/station-profile.test.d.ts +0 -2
  225. package/dist/lib/station-profile.test.d.ts.map +0 -1
  226. package/dist/lib/sync-dir.test.d.ts +0 -2
  227. package/dist/lib/sync-dir.test.d.ts.map +0 -1
  228. package/dist/lib/sync-dry-run-unchanged.test.d.ts +0 -2
  229. package/dist/lib/sync-dry-run-unchanged.test.d.ts.map +0 -1
  230. package/dist/lib/sync-known.test.d.ts +0 -2
  231. package/dist/lib/sync-known.test.d.ts.map +0 -1
  232. package/dist/lib/sync.test.d.ts +0 -2
  233. package/dist/lib/sync.test.d.ts.map +0 -1
  234. package/dist/lib/template.test.d.ts +0 -2
  235. package/dist/lib/template.test.d.ts.map +0 -1
  236. package/dist/lib/transforms.test.d.ts +0 -2
  237. package/dist/lib/transforms.test.d.ts.map +0 -1
  238. package/dist/lib/transport-resolver.test.d.ts +0 -2
  239. package/dist/lib/transport-resolver.test.d.ts.map +0 -1
  240. package/dist/mcp/create-config-target-guard.test.d.ts +0 -2
  241. package/dist/mcp/create-config-target-guard.test.d.ts.map +0 -1
  242. package/dist/mcp/early-args.test.d.ts +0 -2
  243. package/dist/mcp/early-args.test.d.ts.map +0 -1
  244. package/dist/mcp/http.test.d.ts +0 -2
  245. package/dist/mcp/http.test.d.ts.map +0 -1
  246. package/dist/mcp/mcp.test.d.ts +0 -2
  247. package/dist/mcp/mcp.test.d.ts.map +0 -1
  248. package/dist/sdk/resolve.test.d.ts +0 -2
  249. package/dist/sdk/resolve.test.d.ts.map +0 -1
  250. package/dist/sdk/sdk-bundle-self-contained.test.d.ts +0 -2
  251. package/dist/sdk/sdk-bundle-self-contained.test.d.ts.map +0 -1
  252. package/dist/server/cloud-auth.test.d.ts +0 -2
  253. package/dist/server/cloud-auth.test.d.ts.map +0 -1
  254. package/dist/server/cloud.test.d.ts +0 -2
  255. package/dist/server/cloud.test.d.ts.map +0 -1
  256. package/dist/server/early-args.test.d.ts +0 -2
  257. package/dist/server/early-args.test.d.ts.map +0 -1
  258. package/dist/server/profile-contract.test.d.ts +0 -2
  259. package/dist/server/profile-contract.test.d.ts.map +0 -1
  260. package/dist/status.test.d.ts +0 -2
  261. package/dist/status.test.d.ts.map +0 -1
  262. package/dist/storage/cloud-store.test.d.ts +0 -2
  263. package/dist/storage/cloud-store.test.d.ts.map +0 -1
  264. package/dist/test-support/preload-state-home.d.ts +0 -2
  265. package/dist/test-support/preload-state-home.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hasna/instructions",
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.",
3
+ "version": "0.7.0",
4
+ "description": "AI coding agent instruction and configuration manager with fail-closed hosted clients, explicit local SQLite, native S3 backups, CLI, MCP, HTTP API, and generated SDK.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -20,31 +20,41 @@
20
20
  "./sdk": {
21
21
  "types": "./dist/sdk/index.d.ts",
22
22
  "import": "./dist/sdk/index.js"
23
+ },
24
+ "./storage": {
25
+ "types": "./dist/storage/index.d.ts",
26
+ "import": "./dist/storage/index.js"
23
27
  }
24
28
  },
25
29
  "files": [
26
30
  "dist",
27
- "assets/skills/inbox/SKILL.md",
28
31
  "LICENSE",
29
- "README.md"
32
+ "README.md",
33
+ "!dist/**/*.test.d.ts",
34
+ "!dist/**/*.test.d.ts.map",
35
+ "!dist/test-support/**",
36
+ "migrations",
37
+ "hasna.contract.json"
30
38
  ],
31
39
  "scripts": {
32
40
  "clean": "rm -rf dist",
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",
41
+ "build": "bun run clean && bun build src/cli/index.tsx --outdir dist --root src --target bun --splitting --chunk-naming \"chunks/[name]-[hash].[ext]\" --external ink --external react --external chalk --external pg --external @modelcontextprotocol/sdk && bun build src/mcp/index.ts --outdir dist --root src --target bun --splitting --chunk-naming \"chunks/[name]-[hash].[ext]\" --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/storage/index.ts --outdir dist/storage --target bun && bun build src/sdk/index.ts --outdir dist/sdk --target bun && tsc --emitDeclarationOnly --outDir dist",
42
+ "build:server": "bun run clean && bun build src/cli/index.tsx --outdir dist --root src --target bun --splitting --chunk-naming \"chunks/[name]-[hash].[ext]\" --external ink --external react --external chalk --external pg --external @modelcontextprotocol/sdk && bun build src/mcp/index.ts --outdir dist --root src --target bun --splitting --chunk-naming \"chunks/[name]-[hash].[ext]\" --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/storage/index.ts --outdir dist/storage --target bun && bun build src/sdk/index.ts --outdir dist/sdk --target bun",
35
43
  "migrate": "bun run src/server/index.ts migrate",
36
44
  "generate:sdk": "bun run scripts/generate-sdk.ts",
37
45
  "kit:check": "bunx @hasna/contracts vendor-kit --check",
38
46
  "typecheck": "tsc --noEmit",
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",
47
+ "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 --timeout 120000",
40
48
  "check:package-secrets": "bun run src/cli/index.tsx package-manager-scan --fail-on-findings .",
41
49
  "dev:cli": "bun run src/cli/index.tsx",
42
50
  "dev:mcp": "bun run src/mcp/index.ts",
43
51
  "dev:serve": "bun run src/server/index.ts",
44
52
  "seed": "bun run scripts/seed.ts",
45
- "prepublishOnly": "bun run scripts/check-publish-hold.ts && bun run build",
53
+ "prepublishOnly": "bun run scripts/check-publish-hold.ts && bun run typecheck && bun run test && bun run build && bun run scan:artifact",
46
54
  "postinstall": "node -e \"const fs=require('node:fs'),path=require('node:path'),os=require('node:os');const home=process.env.HOME||process.env.USERPROFILE||os.homedir();const exact=process.env.HASNA_CONFIGS_HOME;const configHome=process.env.HASNA_CONFIG_HOME;const root=exact&&exact.trim()?path.resolve(exact.trim()):(configHome&&configHome.trim()?path.join(configHome.trim(),'configs'):path.join(home,'.hasna','instructions'));try{fs.mkdirSync(root,{recursive:true,mode:0o700});fs.mkdirSync(path.join(root,'backups'),{recursive:true,mode:0o700});}catch{}\"",
47
- "prepack": "bun run build"
55
+ "prepack": "bun run build && bun run scan:artifact",
56
+ "test:postgres": "bun scripts/live-postgres-test.ts",
57
+ "scan:artifact": "bun scripts/scan-artifact.ts"
48
58
  },
49
59
  "keywords": [
50
60
  "instructions",
@@ -65,11 +75,12 @@
65
75
  },
66
76
  "repository": {
67
77
  "type": "git",
68
- "url": "git+https://github.com/hasna/instructions.git"
78
+ "url": "git+https://github.com/hasna/apps.git",
79
+ "directory": "apps/instructions"
69
80
  },
70
- "homepage": "https://github.com/hasna/instructions",
81
+ "homepage": "https://github.com/hasna/apps/tree/main/apps/instructions",
71
82
  "bugs": {
72
- "url": "https://github.com/hasna/instructions/issues"
83
+ "url": "https://github.com/hasna/apps/issues"
73
84
  },
74
85
  "engines": {
75
86
  "bun": ">=1.0.0"
@@ -81,12 +92,15 @@
81
92
  "@modelcontextprotocol/sdk": "^1.12.1",
82
93
  "chalk": "^5.4.1",
83
94
  "commander": "^13.1.0",
84
- "hono": "4.13.3",
95
+ "hono": "4.13.7",
85
96
  "ink": "^5.2.0",
86
97
  "pg": "^8.13.3",
87
98
  "react": "^18.3.1",
88
99
  "zod": "^3.24.2"
89
100
  },
101
+ "overrides": {
102
+ "hono": "4.13.7"
103
+ },
90
104
  "devDependencies": {
91
105
  "@hasna/contracts": "1.0.2",
92
106
  "@types/bun": "1.3.14",
@@ -94,5 +108,6 @@
94
108
  "@types/react": "^18.3.18",
95
109
  "bun-types": "1.3.14",
96
110
  "typescript": "^5.7.3"
97
- }
111
+ },
112
+ "packageManager": "bun@1.3.14"
98
113
  }
@@ -1,86 +0,0 @@
1
- ---
2
- name: inbox
3
- description: Arm and verify the package-owned Conversations watcher for direct messages and subscribed channels.
4
- ---
5
-
6
- # Inbox
7
-
8
- Use the maintained `@hasna/conversations` surfaces. There is no separate
9
- `inbox` executable to install or copy.
10
-
11
- ## Prepare the subscriptions
12
-
13
- Subscribe the session identity to every channel that can change its work:
14
-
15
- ```bash
16
- conversations channel subscribe <channel> --from <agent> --preview-chars 320
17
- ```
18
-
19
- Read the subscriptions back before arming:
20
-
21
- ```bash
22
- conversations channel subscriptions --from <agent> --json
23
- ```
24
-
25
- The readback must contain the intended, non-empty channel set. Each row must
26
- carry a seeded `since_message_id`, so the first watch cycle starts from the
27
- subscription baseline instead of replaying history.
28
-
29
- ## Arm the watcher
30
-
31
- First prove the hosted heartbeat path works:
32
-
33
- ```bash
34
- conversations agents heartbeat --from <agent> --json
35
- ```
36
-
37
- Only after that command succeeds, arm:
38
-
39
- ```bash
40
- conversations watch --from <agent> --all --interval 60000 --full-content
41
- ```
42
-
43
- `--all` watches direct messages plus every subscribed channel. Several
44
- comma-separated identities may be supplied to `--from`; reads are the union
45
- and the first identity is primary for writes.
46
-
47
- The watcher reports repeated poll failures as `DEGRADED` and announces
48
- `RECOVERED` after a successful poll. Treat those lines as visibility state,
49
- not as message content.
50
-
51
- ## Manual fallback when hosted watch is degraded
52
-
53
- If the heartbeat command fails, do not claim the watcher is armed. Keep the
54
- subscription baseline and use bounded manual reads until the hosted path is
55
- healthy:
56
-
57
- ```bash
58
- conversations digest <channel> --since <ISO8601> --json
59
- conversations digest --to <agent> --since <ISO8601> --json
60
- conversations blockers --from <agent> --json
61
- ```
62
-
63
- Page every digest through `has_more` and `next_cursor`. Preserve the newest
64
- successfully read timestamp or cursor between coordination passes. A manual
65
- read is degraded service: say so explicitly, schedule the next bounded pass,
66
- and do not describe it as a live monitor.
67
-
68
- ## Verify delivery, not just process lifetime
69
-
70
- Have a different agent send one uniquely labelled canary to a subscribed
71
- channel and one direct message. The watcher must surface both within one poll
72
- interval. A running process, successful subscription write, or quiet first
73
- poll alone does not prove delivery.
74
-
75
- After both canaries arrive, record the local runtime gate:
76
-
77
- ```bash
78
- instructions managed-skills status --from <agent> --delivery-verified --json
79
- ```
80
-
81
- `--delivery-verified` is an evidence assertion, not a probe. Use it only in the
82
- same acceptance pass that observed both canaries.
83
-
84
- `conversations watch` does not monitor Todos assignments. If the session also
85
- needs task-assignment awareness, keep that as a separate bounded Todos read;
86
- do not add another Conversations wrapper or executable.
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=add-duplicate-target.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-duplicate-target.test.d.ts","sourceRoot":"","sources":["../../src/cli/add-duplicate-target.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=add-reference-update.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add-reference-update.test.d.ts","sourceRoot":"","sources":["../../src/cli/add-reference-update.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=apply-unchanged-snapshot-bloat.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apply-unchanged-snapshot-bloat.test.d.ts","sourceRoot":"","sources":["../../src/cli/apply-unchanged-snapshot-bloat.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=doctor-reference-duplicates.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"doctor-reference-duplicates.test.d.ts","sourceRoot":"","sources":["../../src/cli/doctor-reference-duplicates.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=fail-closed-no-env.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fail-closed-no-env.test.d.ts","sourceRoot":"","sources":["../../src/cli/fail-closed-no-env.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=output.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"output.test.d.ts","sourceRoot":"","sources":["../../src/cli/output.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=profile-binding.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile-binding.test.d.ts","sourceRoot":"","sources":["../../src/cli/profile-binding.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=profile-reads.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile-reads.test.d.ts","sourceRoot":"","sources":["../../src/cli/profile-reads.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=profile-update.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile-update.test.d.ts","sourceRoot":"","sources":["../../src/cli/profile-update.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=project-context.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"project-context.test.d.ts","sourceRoot":"","sources":["../../src/cli/project-context.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=raw-store-root.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"raw-store-root.test.d.ts","sourceRoot":"","sources":["../../src/cli/raw-store-root.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=session-apply-managed-input-bound.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"session-apply-managed-input-bound.test.d.ts","sourceRoot":"","sources":["../../src/cli/session-apply-managed-input-bound.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=session.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"session.test.d.ts","sourceRoot":"","sources":["../../src/cli/session.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=station-profile.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"station-profile.test.d.ts","sourceRoot":"","sources":["../../src/cli/station-profile.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=config-store.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config-store.test.d.ts","sourceRoot":"","sources":["../../src/data/config-store.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=configs.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configs.test.d.ts","sourceRoot":"","sources":["../../src/db/configs.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=database.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"database.test.d.ts","sourceRoot":"","sources":["../../src/db/database.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=machines.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"machines.test.d.ts","sourceRoot":"","sources":["../../src/db/machines.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=profile-assets.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile-assets.test.d.ts","sourceRoot":"","sources":["../../src/db/profile-assets.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=profile-config-bindings.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile-config-bindings.test.d.ts","sourceRoot":"","sources":["../../src/db/profile-config-bindings.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=profiles.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"profiles.test.d.ts","sourceRoot":"","sources":["../../src/db/profiles.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=snapshots.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"snapshots.test.d.ts","sourceRoot":"","sources":["../../src/db/snapshots.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=app-home.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-home.test.d.ts","sourceRoot":"","sources":["../../src/lib/app-home.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=apply-batch.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apply-batch.test.d.ts","sourceRoot":"","sources":["../../src/lib/apply-batch.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=apply-dry-run-verdict.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apply-dry-run-verdict.test.d.ts","sourceRoot":"","sources":["../../src/lib/apply-dry-run-verdict.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=apply-secret-placeholder-guard.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apply-secret-placeholder-guard.test.d.ts","sourceRoot":"","sources":["../../src/lib/apply-secret-placeholder-guard.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=apply-text-format-credential-guard.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apply-text-format-credential-guard.test.d.ts","sourceRoot":"","sources":["../../src/lib/apply-text-format-credential-guard.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=apply.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apply.test.d.ts","sourceRoot":"","sources":["../../src/lib/apply.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=asset-plan.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"asset-plan.test.d.ts","sourceRoot":"","sources":["../../src/lib/asset-plan.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=client-types.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client-types.test.d.ts","sourceRoot":"","sources":["../../src/lib/client-types.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=codewith-shared-todos-storage-standard.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codewith-shared-todos-storage-standard.test.d.ts","sourceRoot":"","sources":["../../src/lib/codewith-shared-todos-storage-standard.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=compact-output.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compact-output.test.d.ts","sourceRoot":"","sources":["../../src/lib/compact-output.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=config-target-identity.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config-target-identity.test.d.ts","sourceRoot":"","sources":["../../src/lib/config-target-identity.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=cursor-authority.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cursor-authority.test.d.ts","sourceRoot":"","sources":["../../src/lib/cursor-authority.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=dangerous-operation-guard-standard.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dangerous-operation-guard-standard.test.d.ts","sourceRoot":"","sources":["../../src/lib/dangerous-operation-guard-standard.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=diff-redaction.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"diff-redaction.test.d.ts","sourceRoot":"","sources":["../../src/lib/diff-redaction.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=export-import.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"export-import.test.d.ts","sourceRoot":"","sources":["../../src/lib/export-import.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=global-agent-rules-render-integration.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"global-agent-rules-render-integration.test.d.ts","sourceRoot":"","sources":["../../src/lib/global-agent-rules-render-integration.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=global-agent-rules-standard.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"global-agent-rules-standard.test.d.ts","sourceRoot":"","sources":["../../src/lib/global-agent-rules-standard.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=global-agent-rules-stored-content.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"global-agent-rules-stored-content.test.d.ts","sourceRoot":"","sources":["../../src/lib/global-agent-rules-stored-content.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=global-source-coverage.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"global-source-coverage.test.d.ts","sourceRoot":"","sources":["../../src/lib/global-source-coverage.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=instruction-graph-apply.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"instruction-graph-apply.test.d.ts","sourceRoot":"","sources":["../../src/lib/instruction-graph-apply.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=instruction-graph.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"instruction-graph.test.d.ts","sourceRoot":"","sources":["../../src/lib/instruction-graph.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=machine.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"machine.test.d.ts","sourceRoot":"","sources":["../../src/lib/machine.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=managed-skill-runtimes.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"managed-skill-runtimes.test.d.ts","sourceRoot":"","sources":["../../src/lib/managed-skill-runtimes.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=package-manager-guard.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"package-manager-guard.test.d.ts","sourceRoot":"","sources":["../../src/lib/package-manager-guard.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=project-context-prepared-file.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"project-context-prepared-file.test.d.ts","sourceRoot":"","sources":["../../src/lib/project-context-prepared-file.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=project-context.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"project-context.test.d.ts","sourceRoot":"","sources":["../../src/lib/project-context.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=project-dashboard-standard.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"project-dashboard-standard.test.d.ts","sourceRoot":"","sources":["../../src/lib/project-dashboard-standard.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=provider-assets-adapters.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"provider-assets-adapters.test.d.ts","sourceRoot":"","sources":["../../src/lib/provider-assets-adapters.test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=provider-context.test.d.ts.map