@hraness/ghostget 0.17.2

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 (500) hide show
  1. package/CHANGELOG.md +458 -0
  2. package/LICENSE +21 -0
  3. package/README.md +1359 -0
  4. package/bunfig.toml +2 -0
  5. package/dist/apple-photos-client.js +704 -0
  6. package/dist/beeper-client.js +4602 -0
  7. package/dist/client.js +1605 -0
  8. package/dist/index-26yq8q16.js +31 -0
  9. package/dist/index-9t13b4k7.js +508 -0
  10. package/dist/index-axwm9b3v.js +5 -0
  11. package/dist/index-gwk7rbyj.js +30 -0
  12. package/dist/index.js +701 -0
  13. package/dist/messaging.js +1130 -0
  14. package/dist/omni-client.js +1406 -0
  15. package/dist/whatsapp-client.js +355 -0
  16. package/docs/imessage-direct-provider.md +106 -0
  17. package/docs/rental-listings.md +94 -0
  18. package/package.json +600 -0
  19. package/skills/ghostget/SKILL.md +251 -0
  20. package/skills/ghostget/agents/openai.yaml +4 -0
  21. package/skills/ghostget/references/adapter-contract.md +181 -0
  22. package/skills/ghostget/references/apple-photos.md +115 -0
  23. package/skills/ghostget/references/article-drafts.md +235 -0
  24. package/skills/ghostget/references/code-owned-provider-scaffold.md +134 -0
  25. package/skills/ghostget/references/cross-posting-video.md +139 -0
  26. package/skills/ghostget/references/cross-posting.md +82 -0
  27. package/skills/ghostget/references/derivation.md +390 -0
  28. package/skills/ghostget/references/hraness-social-profile-stats.json +269 -0
  29. package/skills/ghostget/references/install.md +66 -0
  30. package/skills/ghostget/references/linkedin-adapter.md +442 -0
  31. package/skills/ghostget/references/messaging.md +168 -0
  32. package/skills/ghostget/references/meta-comet-contract.md +153 -0
  33. package/skills/ghostget/references/platform-patterns.md +122 -0
  34. package/skills/ghostget/references/provider-plugins.md +496 -0
  35. package/skills/ghostget/references/reddit-flair.md +78 -0
  36. package/skills/ghostget/references/safety-and-state.md +214 -0
  37. package/skills/ghostget/references/settlement-and-duplicate-cleanup.md +79 -0
  38. package/skills/ghostget/references/social-platform-routing.md +66 -0
  39. package/skills/ghostget/references/social-profile-stats.md +195 -0
  40. package/skills/ghostget/references/social-video-platform-routing.md +89 -0
  41. package/skills/ghostget/references/whatsapp-adapter.md +101 -0
  42. package/skills/ghostget/references/x-adapter.md +332 -0
  43. package/skills/ghostget/references/x-ai-disclosure.md +71 -0
  44. package/src/apple-photos-cli.ts +639 -0
  45. package/src/apple-photos-client-types.ts +168 -0
  46. package/src/apple-photos-client.ts +201 -0
  47. package/src/apple-photos-contact-evidence.ts +838 -0
  48. package/src/apple-photos-local-source.ts +1131 -0
  49. package/src/args.ts +2053 -0
  50. package/src/article-draft-document.ts +417 -0
  51. package/src/article-draft-embeds.ts +123 -0
  52. package/src/article-draft-images.ts +214 -0
  53. package/src/assets/adapter-template/wrench-adapter.json +40 -0
  54. package/src/assets/adapters/beeper/wrench-web-adapter.json +1500 -0
  55. package/src/assets/adapters/beeper/wrench-web-adapter.v1.0.0.json +129 -0
  56. package/src/assets/adapters/beeper/wrench-web-adapter.v1.1.0.json +207 -0
  57. package/src/assets/adapters/beeper/wrench-web-adapter.v2.0.0.json +1463 -0
  58. package/src/assets/adapters/beeper/wrench-web-adapter.v2.1.0.json +1463 -0
  59. package/src/assets/adapters/beeper/wrench-web-adapter.v2.2.0.json +1475 -0
  60. package/src/assets/adapters/beeper/wrench-web-adapter.v2.3.0.json +1488 -0
  61. package/src/assets/adapters/bluesky/wrench-web-adapter.json +684 -0
  62. package/src/assets/adapters/bluesky/wrench-web-adapter.v1.0.0.json +581 -0
  63. package/src/assets/adapters/bluesky/wrench-web-adapter.v1.1.0.json +581 -0
  64. package/src/assets/adapters/bluesky/wrench-web-adapter.v1.2.0.json +581 -0
  65. package/src/assets/adapters/bluesky/wrench-web-adapter.v1.3.0.json +615 -0
  66. package/src/assets/adapters/bluesky/wrench-web-adapter.v1.4.0.json +684 -0
  67. package/src/assets/adapters/bluesky/wrench-web-adapter.v1.5.0.json +684 -0
  68. package/src/assets/adapters/bluesky/wrench-web-adapter.v1.6.0.json +684 -0
  69. package/src/assets/adapters/clasificados/wrench-web-adapter.json +54 -0
  70. package/src/assets/adapters/facebook/wrench-web-adapter.json +750 -0
  71. package/src/assets/adapters/facebook/wrench-web-adapter.v1.0.0.json +706 -0
  72. package/src/assets/adapters/facebook/wrench-web-adapter.v1.1.0.json +703 -0
  73. package/src/assets/adapters/facebook/wrench-web-adapter.v1.2.0.json +750 -0
  74. package/src/assets/adapters/facebook-group/wrench-web-adapter.json +682 -0
  75. package/src/assets/adapters/facebook-group/wrench-web-adapter.v1.0.0.json +583 -0
  76. package/src/assets/adapters/facebook-group/wrench-web-adapter.v1.1.0.json +682 -0
  77. package/src/assets/adapters/facebook-marketplace/wrench-web-adapter.json +437 -0
  78. package/src/assets/adapters/facebook-marketplace/wrench-web-adapter.v1.0.0.json +383 -0
  79. package/src/assets/adapters/facebook-marketplace/wrench-web-adapter.v1.1.0.json +437 -0
  80. package/src/assets/adapters/facebook-marketplace/wrench-web-adapter.v1.1.1.json +437 -0
  81. package/src/assets/adapters/facebook-page/wrench-web-adapter.json +880 -0
  82. package/src/assets/adapters/facebook-page/wrench-web-adapter.v1.0.0.json +740 -0
  83. package/src/assets/adapters/facebook-page/wrench-web-adapter.v1.1.0.json +880 -0
  84. package/src/assets/adapters/github/wrench-web-adapter.json +69 -0
  85. package/src/assets/adapters/github/wrench-web-adapter.v1.0.0.json +42 -0
  86. package/src/assets/adapters/github/wrench-web-adapter.v1.1.0.json +69 -0
  87. package/src/assets/adapters/gmail/wrench-adapter.json +161 -0
  88. package/src/assets/adapters/gmail/wrench-adapter.v1.2.0.json +157 -0
  89. package/src/assets/adapters/hacker-news/wrench-web-adapter.json +315 -0
  90. package/src/assets/adapters/hacker-news/wrench-web-adapter.v1.0.0.json +315 -0
  91. package/src/assets/adapters/imessage/wrench-web-adapter.json +236 -0
  92. package/src/assets/adapters/instagram/wrench-web-adapter.json +719 -0
  93. package/src/assets/adapters/instagram/wrench-web-adapter.v1.0.0.json +627 -0
  94. package/src/assets/adapters/instagram/wrench-web-adapter.v1.1.0.json +609 -0
  95. package/src/assets/adapters/instagram/wrench-web-adapter.v1.2.0.json +640 -0
  96. package/src/assets/adapters/instagram/wrench-web-adapter.v1.3.0.json +671 -0
  97. package/src/assets/adapters/instagram/wrench-web-adapter.v1.4.0.json +710 -0
  98. package/src/assets/adapters/instagram/wrench-web-adapter.v1.5.0.json +710 -0
  99. package/src/assets/adapters/instagram/wrench-web-adapter.v1.6.0.json +719 -0
  100. package/src/assets/adapters/instagram/wrench-web-adapter.v1.7.0.json +719 -0
  101. package/src/assets/adapters/linkedin/wrench-adapter.json +442 -0
  102. package/src/assets/adapters/linkedin/wrench-adapter.v0.4.0.json +124 -0
  103. package/src/assets/adapters/linkedin/wrench-adapter.v1.0.0.json +411 -0
  104. package/src/assets/adapters/linkedin/wrench-web-adapter.json +914 -0
  105. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.0.0.json +604 -0
  106. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.1.0.json +604 -0
  107. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.10.0.json +809 -0
  108. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.11.0.json +809 -0
  109. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.12.0.json +820 -0
  110. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.13.0.json +819 -0
  111. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.14.0.json +819 -0
  112. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.15.0.json +819 -0
  113. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.16.0.json +874 -0
  114. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.17.0.json +874 -0
  115. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.18.0.json +874 -0
  116. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.19.0.json +874 -0
  117. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.2.0.json +731 -0
  118. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.3.0.json +768 -0
  119. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.4.0.json +808 -0
  120. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.5.0.json +808 -0
  121. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.6.0.json +808 -0
  122. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.7.0.json +825 -0
  123. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.8.0.json +792 -0
  124. package/src/assets/adapters/linkedin/wrench-web-adapter.v1.9.0.json +809 -0
  125. package/src/assets/adapters/reddit/wrench-web-adapter.json +855 -0
  126. package/src/assets/adapters/reddit/wrench-web-adapter.v1.0.0.json +577 -0
  127. package/src/assets/adapters/reddit/wrench-web-adapter.v1.1.0.json +604 -0
  128. package/src/assets/adapters/reddit/wrench-web-adapter.v1.10.0.json +712 -0
  129. package/src/assets/adapters/reddit/wrench-web-adapter.v1.11.0.json +712 -0
  130. package/src/assets/adapters/reddit/wrench-web-adapter.v1.12.0.json +712 -0
  131. package/src/assets/adapters/reddit/wrench-web-adapter.v1.2.0.json +653 -0
  132. package/src/assets/adapters/reddit/wrench-web-adapter.v1.3.0.json +712 -0
  133. package/src/assets/adapters/reddit/wrench-web-adapter.v1.4.0.json +713 -0
  134. package/src/assets/adapters/reddit/wrench-web-adapter.v1.5.0.json +712 -0
  135. package/src/assets/adapters/reddit/wrench-web-adapter.v1.6.0.json +713 -0
  136. package/src/assets/adapters/reddit/wrench-web-adapter.v1.7.0.json +713 -0
  137. package/src/assets/adapters/reddit/wrench-web-adapter.v1.8.0.json +713 -0
  138. package/src/assets/adapters/reddit/wrench-web-adapter.v1.9.0.json +713 -0
  139. package/src/assets/adapters/substack/wrench-web-adapter.json +936 -0
  140. package/src/assets/adapters/substack/wrench-web-adapter.v1.0.0.json +817 -0
  141. package/src/assets/adapters/substack/wrench-web-adapter.v1.1.0.json +812 -0
  142. package/src/assets/adapters/substack/wrench-web-adapter.v1.2.0.json +812 -0
  143. package/src/assets/adapters/substack/wrench-web-adapter.v1.3.0.json +902 -0
  144. package/src/assets/adapters/substack/wrench-web-adapter.v1.4.0.json +936 -0
  145. package/src/assets/adapters/substack/wrench-web-adapter.v1.5.0.json +936 -0
  146. package/src/assets/adapters/substack/wrench-web-adapter.v1.6.0.json +936 -0
  147. package/src/assets/adapters/threads/wrench-web-adapter.json +692 -0
  148. package/src/assets/adapters/threads/wrench-web-adapter.v1.0.0.json +629 -0
  149. package/src/assets/adapters/threads/wrench-web-adapter.v1.1.0.json +623 -0
  150. package/src/assets/adapters/threads/wrench-web-adapter.v1.2.0.json +622 -0
  151. package/src/assets/adapters/threads/wrench-web-adapter.v1.3.0.json +622 -0
  152. package/src/assets/adapters/threads/wrench-web-adapter.v1.4.0.json +622 -0
  153. package/src/assets/adapters/threads/wrench-web-adapter.v1.5.0.json +699 -0
  154. package/src/assets/adapters/threads/wrench-web-adapter.v1.6.0.json +693 -0
  155. package/src/assets/adapters/threads/wrench-web-adapter.v1.7.0.json +692 -0
  156. package/src/assets/adapters/tiktok/wrench-web-adapter.json +762 -0
  157. package/src/assets/adapters/tiktok/wrench-web-adapter.v1.0.0.json +681 -0
  158. package/src/assets/adapters/tiktok/wrench-web-adapter.v1.1.0.json +708 -0
  159. package/src/assets/adapters/tiktok/wrench-web-adapter.v1.2.0.json +762 -0
  160. package/src/assets/adapters/tiktok/wrench-web-adapter.v1.3.0.json +762 -0
  161. package/src/assets/adapters/twitch/wrench-web-adapter.json +42 -0
  162. package/src/assets/adapters/twitch/wrench-web-adapter.v1.0.0.json +42 -0
  163. package/src/assets/adapters/whatsapp/wrench-web-adapter.json +400 -0
  164. package/src/assets/adapters/whatsapp/wrench-web-adapter.v1.0.0.json +355 -0
  165. package/src/assets/adapters/whatsapp/wrench-web-adapter.v1.1.0.json +386 -0
  166. package/src/assets/adapters/whatsapp/wrench-web-adapter.v1.2.0.json +386 -0
  167. package/src/assets/adapters/whatsapp/wrench-web-adapter.v1.3.0.json +400 -0
  168. package/src/assets/adapters/x/wrench-adapter.json +749 -0
  169. package/src/assets/adapters/x/wrench-adapter.v1.0.0.json +700 -0
  170. package/src/assets/adapters/x/wrench-adapter.v1.1.0.json +707 -0
  171. package/src/assets/adapters/x/wrench-web-adapter.json +712 -0
  172. package/src/assets/adapters/x/wrench-web-adapter.v1.1.0.json +579 -0
  173. package/src/assets/adapters/x/wrench-web-adapter.v1.10.0.json +685 -0
  174. package/src/assets/adapters/x/wrench-web-adapter.v1.11.0.json +712 -0
  175. package/src/assets/adapters/x/wrench-web-adapter.v1.12.0.json +712 -0
  176. package/src/assets/adapters/x/wrench-web-adapter.v1.13.0.json +712 -0
  177. package/src/assets/adapters/x/wrench-web-adapter.v1.2.0.json +578 -0
  178. package/src/assets/adapters/x/wrench-web-adapter.v1.3.0.json +610 -0
  179. package/src/assets/adapters/x/wrench-web-adapter.v1.4.0.json +617 -0
  180. package/src/assets/adapters/x/wrench-web-adapter.v1.5.0.json +634 -0
  181. package/src/assets/adapters/x/wrench-web-adapter.v1.6.0.json +632 -0
  182. package/src/assets/adapters/x/wrench-web-adapter.v1.7.0.json +649 -0
  183. package/src/assets/adapters/x/wrench-web-adapter.v1.8.0.json +649 -0
  184. package/src/assets/adapters/x/wrench-web-adapter.v1.9.0.json +683 -0
  185. package/src/assets/adapters/youtube/wrench-web-adapter.json +561 -0
  186. package/src/assets/adapters/youtube/wrench-web-adapter.v1.0.0.json +465 -0
  187. package/src/assets/adapters/youtube/wrench-web-adapter.v1.1.0.json +519 -0
  188. package/src/assets/adapters/youtube/wrench-web-adapter.v1.2.0.json +561 -0
  189. package/src/assets/adapters/youtube/wrench-web-adapter.v1.3.0.json +561 -0
  190. package/src/assets/code-owned-provider-template/plugin.test.ts.template +54 -0
  191. package/src/assets/code-owned-provider-template/plugin.ts.template +102 -0
  192. package/src/assets/code-owned-provider-template/runtime.internal.test.ts.template +44 -0
  193. package/src/assets/code-owned-provider-template/runtime.ts.template +59 -0
  194. package/src/assets/code-owned-provider-template/wrench-adapter.json.template +33 -0
  195. package/src/assets/fonts/nebula-sans/LICENSE.txt +96 -0
  196. package/src/assets/fonts/nebula-sans/NebulaSans-Book.woff2 +0 -0
  197. package/src/assets/fonts/nebula-sans/PROVENANCE.md +14 -0
  198. package/src/assets.d.ts +4 -0
  199. package/src/auth.ts +1157 -0
  200. package/src/beeper-client-types.ts +169 -0
  201. package/src/beeper-client.ts +250 -0
  202. package/src/beeper-contact-interactions-cli.ts +180 -0
  203. package/src/beeper-contact-interactions.ts +1612 -0
  204. package/src/beeper-message-bundle-v1.ts +257 -0
  205. package/src/beeper-message-like-me-cli.ts +84 -0
  206. package/src/beeper-message-like-me-export.ts +2274 -0
  207. package/src/beeper-message-like-me-recovery.ts +931 -0
  208. package/src/beeper-message-like-me-source.ts +4034 -0
  209. package/src/browser-admission.ts +928 -0
  210. package/src/browser-snapshots.ts +260 -0
  211. package/src/browser.ts +3873 -0
  212. package/src/canonical-json.ts +60 -0
  213. package/src/catalog-cli.ts +638 -0
  214. package/src/cli.ts +208 -0
  215. package/src/client-types.ts +301 -0
  216. package/src/client.ts +2726 -0
  217. package/src/confirmed-write-failure.ts +44 -0
  218. package/src/confirmed-write-model.ts +72 -0
  219. package/src/confirmed-write-platform.ts +1055 -0
  220. package/src/confirmed-write-program.ts +224 -0
  221. package/src/confirmed-write-runtime.ts +16 -0
  222. package/src/cursor-token.ts +228 -0
  223. package/src/derivation-dnr-readiness.ts +367 -0
  224. package/src/derivation-file-chooser.ts +384 -0
  225. package/src/derivation-network-boundary.ts +835 -0
  226. package/src/derivation-network-guard.ts +782 -0
  227. package/src/derivation-network-proxy-helper.ts +440 -0
  228. package/src/derivation-network-proxy.ts +385 -0
  229. package/src/derive-command-helper.ts +693 -0
  230. package/src/derive-fixtures.ts +343 -0
  231. package/src/derive-review.ts +980 -0
  232. package/src/derive.ts +4754 -0
  233. package/src/fixtures/beeper-message-like-me-v1/accounts.ndjson +2 -0
  234. package/src/fixtures/beeper-message-like-me-v1/conversations.ndjson +1 -0
  235. package/src/fixtures/beeper-message-like-me-v1/manifest.json +1 -0
  236. package/src/fixtures/beeper-message-like-me-v1/messages.ndjson +2 -0
  237. package/src/fixtures/beeper-message-like-me-v1/participants.ndjson +3 -0
  238. package/src/fixtures/beeper-message-like-me-v1/reactions.ndjson +1 -0
  239. package/src/fixtures/beeper-message-like-me-v1/tombstones.ndjson +1 -0
  240. package/src/ghostget.ts +3672 -0
  241. package/src/gmail-capture.ts +1244 -0
  242. package/src/har-internal.ts +1242 -0
  243. package/src/har.ts +743 -0
  244. package/src/index.ts +218 -0
  245. package/src/invocation-read-platform.ts +55 -0
  246. package/src/invocation-read-program.ts +93 -0
  247. package/src/invocation-read-runtime.ts +11 -0
  248. package/src/linked-device-lifecycle-admission.ts +450 -0
  249. package/src/linked-device-lifecycle-journal.ts +1560 -0
  250. package/src/linked-device-lifecycle-runtime.ts +1602 -0
  251. package/src/local-cli-admission.ts +135 -0
  252. package/src/local-cli-contracts.ts +271 -0
  253. package/src/local-cli-execution.ts +98 -0
  254. package/src/local-cli-surface-contract.ts +1510 -0
  255. package/src/local-cli-tool-identity.ts +336 -0
  256. package/src/media/archive.ts +2325 -0
  257. package/src/media/args.ts +303 -0
  258. package/src/media/cli.ts +287 -0
  259. package/src/media/doctor.ts +475 -0
  260. package/src/media/ffmpeg.ts +1330 -0
  261. package/src/media/http-capture.ts +711 -0
  262. package/src/media/http-probe.ts +593 -0
  263. package/src/media/http.ts +387 -0
  264. package/src/media/index.ts +10 -0
  265. package/src/media/local-transcription.ts +613 -0
  266. package/src/media/lock.ts +321 -0
  267. package/src/media/manifest.ts +1712 -0
  268. package/src/media/metadata.ts +906 -0
  269. package/src/media/process.ts +723 -0
  270. package/src/media/revision.ts +166 -0
  271. package/src/media/runtime-closure.ts +1063 -0
  272. package/src/media/source-router.ts +187 -0
  273. package/src/media/transcriber-config.ts +1122 -0
  274. package/src/media/transcript-persistence-model.ts +15 -0
  275. package/src/media/transcript-persistence-platform.ts +89 -0
  276. package/src/media/transcript-persistence-program.ts +39 -0
  277. package/src/media/transcript-persistence-runtime.ts +24 -0
  278. package/src/media/transcript.ts +616 -0
  279. package/src/media/utf8-order.ts +30 -0
  280. package/src/media/whisper-cpp.ts +464 -0
  281. package/src/media/whisper-language.ts +58 -0
  282. package/src/media/yt-dlp.ts +439 -0
  283. package/src/message-like-me-agentic-messaging.ts +882 -0
  284. package/src/messaging-action-store.ts +793 -0
  285. package/src/messaging-runtime.ts +2136 -0
  286. package/src/messaging-store.ts +539 -0
  287. package/src/messaging-types.ts +1663 -0
  288. package/src/messaging.ts +334 -0
  289. package/src/model.ts +2671 -0
  290. package/src/oauth-google.ts +888 -0
  291. package/src/omni-client-types.ts +306 -0
  292. package/src/omni-client.ts +2225 -0
  293. package/src/omni-limits.ts +34 -0
  294. package/src/omni-model.ts +1614 -0
  295. package/src/omni-request.ts +379 -0
  296. package/src/omni-runtime.ts +1632 -0
  297. package/src/operation-deadline.ts +189 -0
  298. package/src/path-helper.ts +1656 -0
  299. package/src/pinned-https.ts +194 -0
  300. package/src/plan-assets.ts +832 -0
  301. package/src/platform-catalog.ts +1832 -0
  302. package/src/plugins/beeper-linked-device/plugin.ts +310 -0
  303. package/src/plugins/bluesky-web/plugin.ts +178 -0
  304. package/src/plugins/clasificados-web/plugin.ts +66 -0
  305. package/src/plugins/github-web/plugin.ts +80 -0
  306. package/src/plugins/gmail-official/plugin.ts +110 -0
  307. package/src/plugins/hacker-news-web/plugin.ts +52 -0
  308. package/src/plugins/imessage-direct/plugin.ts +195 -0
  309. package/src/plugins/imessage-direct/vendor/0001-fix-keep-AppleScript-send-payloads-out-of-child-argv.patch +1430 -0
  310. package/src/plugins/imessage-direct/vendor/0002-feat-rpc-add-exact-chat-lookup.patch +225 -0
  311. package/src/plugins/imessage-direct/vendor/provenance.json +80 -0
  312. package/src/plugins/linkedin-official/plugin.ts +84 -0
  313. package/src/plugins/linkedin-web/plugin.ts +412 -0
  314. package/src/plugins/meta-web/plugin.ts +317 -0
  315. package/src/plugins/reddit-web/flair.ts +492 -0
  316. package/src/plugins/reddit-web/plugin.ts +477 -0
  317. package/src/plugins/substack-web/plugin.ts +124 -0
  318. package/src/plugins/tiktok-web/plugin.ts +67 -0
  319. package/src/plugins/twitch-web/plugin.ts +54 -0
  320. package/src/plugins/whatsapp-linked-device/plugin.ts +105 -0
  321. package/src/plugins/x-official/plugin.ts +64 -0
  322. package/src/plugins/x-web/plugin.ts +488 -0
  323. package/src/plugins/youtube-web/plugin.ts +101 -0
  324. package/src/portable-run-recovery.ts +466 -0
  325. package/src/process-identity.ts +501 -0
  326. package/src/profile-clone-helper.ts +104 -0
  327. package/src/provider-catalog-views.ts +51 -0
  328. package/src/provider-context.ts +69 -0
  329. package/src/provider-contract-definitions-x.ts +45 -0
  330. package/src/provider-contract-definitions.ts +948 -0
  331. package/src/provider-contract-input-gmail.ts +176 -0
  332. package/src/provider-contract-input-linkedin.ts +77 -0
  333. package/src/provider-contract-input-x.ts +304 -0
  334. package/src/provider-contract-planning.ts +23 -0
  335. package/src/provider-contract-semantic-identity.ts +54 -0
  336. package/src/provider-contracts.ts +251 -0
  337. package/src/provider-http.ts +723 -0
  338. package/src/provider-plugin-auth.ts +36 -0
  339. package/src/provider-plugin-builtins.ts +229 -0
  340. package/src/provider-plugin-cleanup-barrier.ts +229 -0
  341. package/src/provider-plugin-cleanup-execution.ts +79 -0
  342. package/src/provider-plugin-cleanup-resource.ts +470 -0
  343. package/src/provider-plugin-contract-identity.ts +707 -0
  344. package/src/provider-plugin-host.ts +1972 -0
  345. package/src/provider-plugin-identifiers.ts +60 -0
  346. package/src/provider-plugin-invocation-lease.ts +889 -0
  347. package/src/provider-plugin-lifecycle-kernel.ts +566 -0
  348. package/src/provider-plugin-lifecycle.ts +1455 -0
  349. package/src/provider-plugin-module-analysis.ts +336 -0
  350. package/src/provider-plugin-package.ts +2530 -0
  351. package/src/provider-plugin-portable-authority.ts +106 -0
  352. package/src/provider-plugin-portable-catalog.ts +94 -0
  353. package/src/provider-plugin-portable-identity.ts +315 -0
  354. package/src/provider-plugin-portable-runtime.ts +2057 -0
  355. package/src/provider-plugin-protocol.ts +1625 -0
  356. package/src/provider-plugin-registry.ts +3342 -0
  357. package/src/provider-plugin-store.ts +2155 -0
  358. package/src/provider-plugin-test-fixture.ts +5 -0
  359. package/src/provider-plugin.ts +4907 -0
  360. package/src/provider-plugins.generated.ts +43 -0
  361. package/src/provider-plugins.ts +8 -0
  362. package/src/provider-subject.ts +41 -0
  363. package/src/provider.ts +315 -0
  364. package/src/providers/beeper-local-runtime.ts +5426 -0
  365. package/src/providers/beeper-local.ts +2739 -0
  366. package/src/providers/beeper-messaging.ts +462 -0
  367. package/src/providers/beeper-omni.ts +1159 -0
  368. package/src/providers/bluesky-web-runtime.ts +2895 -0
  369. package/src/providers/bluesky-web.ts +1614 -0
  370. package/src/providers/clasificados-web-runtime.ts +255 -0
  371. package/src/providers/clasificados-web.ts +503 -0
  372. package/src/providers/contact-projection.ts +301 -0
  373. package/src/providers/github-read-model.ts +94 -0
  374. package/src/providers/github-read-platform.ts +165 -0
  375. package/src/providers/github-read-program.ts +97 -0
  376. package/src/providers/github-web-runtime.ts +320 -0
  377. package/src/providers/github-web.ts +403 -0
  378. package/src/providers/gmail-api.ts +2834 -0
  379. package/src/providers/gmail-omni.ts +830 -0
  380. package/src/providers/gmail.ts +1130 -0
  381. package/src/providers/hacker-news-web-runtime.ts +220 -0
  382. package/src/providers/hacker-news-web.ts +809 -0
  383. package/src/providers/imessage-direct-install.ts +354 -0
  384. package/src/providers/imessage-direct-messaging.ts +532 -0
  385. package/src/providers/imessage-direct-omni.ts +400 -0
  386. package/src/providers/imessage-direct-runtime.ts +1498 -0
  387. package/src/providers/imessage-direct.ts +351 -0
  388. package/src/providers/instagram-video-foundations.ts +913 -0
  389. package/src/providers/instagram-web-profile-browser.ts +600 -0
  390. package/src/providers/iso-bmff.ts +338 -0
  391. package/src/providers/linkedin-company-platform.ts +42 -0
  392. package/src/providers/linkedin-company-program.ts +88 -0
  393. package/src/providers/linkedin-contact-failure.ts +84 -0
  394. package/src/providers/linkedin-contact-platform.ts +45 -0
  395. package/src/providers/linkedin-contact-program.ts +91 -0
  396. package/src/providers/linkedin-profile-activity-failure.ts +76 -0
  397. package/src/providers/linkedin-profile-activity-platform.ts +41 -0
  398. package/src/providers/linkedin-profile-activity-program.ts +67 -0
  399. package/src/providers/linkedin-read-failure.ts +52 -0
  400. package/src/providers/linkedin-self-platform.ts +53 -0
  401. package/src/providers/linkedin-self-program.ts +122 -0
  402. package/src/providers/linkedin-web-article-browser.ts +794 -0
  403. package/src/providers/linkedin-web-bootstrap.ts +146 -0
  404. package/src/providers/linkedin-web-contact.ts +830 -0
  405. package/src/providers/linkedin-web-feed-browser.ts +832 -0
  406. package/src/providers/linkedin-web-feed.ts +864 -0
  407. package/src/providers/linkedin-web-post-browser.ts +653 -0
  408. package/src/providers/linkedin-web-profile-browser.ts +683 -0
  409. package/src/providers/linkedin-web-runtime.ts +2388 -0
  410. package/src/providers/linkedin-web.ts +3305 -0
  411. package/src/providers/linkedin.ts +1885 -0
  412. package/src/providers/meta-bootstrap.ts +1043 -0
  413. package/src/providers/meta-facebook-group.ts +690 -0
  414. package/src/providers/meta-marketplace-relay.ts +747 -0
  415. package/src/providers/meta-omni.ts +373 -0
  416. package/src/providers/meta-relay-bundle.ts +1049 -0
  417. package/src/providers/meta-web-descriptors.ts +1740 -0
  418. package/src/providers/meta-web-runtime.ts +3388 -0
  419. package/src/providers/meta-web.ts +2931 -0
  420. package/src/providers/read-failure.ts +139 -0
  421. package/src/providers/reddit-omni.ts +462 -0
  422. package/src/providers/reddit-web-runtime.ts +1929 -0
  423. package/src/providers/reddit-web.ts +1611 -0
  424. package/src/providers/rental-listings.ts +460 -0
  425. package/src/providers/substack-omni.ts +406 -0
  426. package/src/providers/substack-video-mp4.ts +33 -0
  427. package/src/providers/substack-web-runtime.ts +2812 -0
  428. package/src/providers/substack-web.ts +1502 -0
  429. package/src/providers/tiktok-video-mp4.ts +33 -0
  430. package/src/providers/tiktok-web-runtime.ts +770 -0
  431. package/src/providers/tiktok-web.ts +2786 -0
  432. package/src/providers/twitch-web-runtime.ts +226 -0
  433. package/src/providers/twitch-web.ts +274 -0
  434. package/src/providers/whatsapp-account-identity.ts +55 -0
  435. package/src/providers/whatsapp-contact-projection-helper.ts +874 -0
  436. package/src/providers/whatsapp-contact-projection-protocol.ts +403 -0
  437. package/src/providers/whatsapp-interaction-projection-helper.ts +1452 -0
  438. package/src/providers/whatsapp-interaction-projection-protocol.ts +462 -0
  439. package/src/providers/whatsapp-message-export-projection-protocol.ts +532 -0
  440. package/src/providers/whatsapp-messaging.ts +132 -0
  441. package/src/providers/whatsapp-omni.ts +586 -0
  442. package/src/providers/whatsapp-web-runtime.ts +3108 -0
  443. package/src/providers/whatsapp-web.ts +1037 -0
  444. package/src/providers/x-image-provenance.ts +523 -0
  445. package/src/providers/x-made-with-ai.ts +106 -0
  446. package/src/providers/x-transaction-id.ts +413 -0
  447. package/src/providers/x-web-runtime.ts +3485 -0
  448. package/src/providers/x-web.ts +2332 -0
  449. package/src/providers/x.ts +1889 -0
  450. package/src/providers/youtube-web-runtime.ts +1400 -0
  451. package/src/providers/youtube-web.ts +1221 -0
  452. package/src/read-admission-runtime.ts +91 -0
  453. package/src/read-client.ts +521 -0
  454. package/src/read-effect-platform.ts +7 -0
  455. package/src/read-effect-runtime.ts +14 -0
  456. package/src/read-effect.ts +52 -0
  457. package/src/read-projection-admission.ts +866 -0
  458. package/src/read-projections.ts +3151 -0
  459. package/src/recovery.ts +1492 -0
  460. package/src/reviewed-template.ts +146 -0
  461. package/src/run-journal.ts +1272 -0
  462. package/src/runtime.ts +5116 -0
  463. package/src/scripts/generate-provider-plugin-catalog.ts +121 -0
  464. package/src/scripts/install-whatsapp-protocol.sh +232 -0
  465. package/src/scripts/recover-install-stages.ts +1491 -0
  466. package/src/scripts/resolve-state-home.ts +30 -0
  467. package/src/scripts/scaffold-web-provider.ts +973 -0
  468. package/src/scripts/sync-bundled-adapters.ts +695 -0
  469. package/src/session-secrets.ts +1183 -0
  470. package/src/state-helper.bunfig.toml +2 -0
  471. package/src/state-helper.ts +2914 -0
  472. package/src/storage.ts +3842 -0
  473. package/src/transport-policy.ts +2 -0
  474. package/src/usage.ts +182 -0
  475. package/src/version.ts +2 -0
  476. package/src/web-session-authentication-policy.ts +136 -0
  477. package/src/web-session-cleanup-admission.ts +2344 -0
  478. package/src/web-session-cleanup-join.ts +99 -0
  479. package/src/web-session-client.ts +996 -0
  480. package/src/web-session-contract-definitions.ts +820 -0
  481. package/src/web-session-contract-planning.ts +42 -0
  482. package/src/web-session-contracts.ts +228 -0
  483. package/src/web-session-cookies.ts +500 -0
  484. package/src/web-session-execution.ts +385 -0
  485. package/src/web-session-http.ts +373 -0
  486. package/src/web-session-read-errors.ts +19 -0
  487. package/src/web-session-read-runtime.ts +124 -0
  488. package/src/web-session-recovery.ts +818 -0
  489. package/src/web-session-sites.ts +58 -0
  490. package/src/web-session-template.ts +994 -0
  491. package/src/web-session.ts +93 -0
  492. package/src/whatsapp-client-binding.ts +21 -0
  493. package/src/whatsapp-client-types.ts +75 -0
  494. package/src/whatsapp-client.ts +395 -0
  495. package/src/whatsapp-export-coordinate.ts +17 -0
  496. package/src/whatsapp-message-bundle-v2.ts +195 -0
  497. package/src/whatsapp-message-like-me-cli.ts +195 -0
  498. package/src/whatsapp-message-like-me-export.ts +1072 -0
  499. package/src/whatsapp-message-like-me-source.ts +1012 -0
  500. package/tsconfig.json +67 -0
@@ -0,0 +1,251 @@
1
+ ---
2
+ name: ghostget
3
+ description: >-
4
+ Use Ghostget to give a bring-your-own coding agent bounded, local-first web
5
+ capabilities: capture or scrape public and signed-in web pages into Markdown;
6
+ archive authorized audio, video, and transcripts with verification; query
7
+ encrypted cached email, contacts, inbox, and messaging views; resolve a live
8
+ conversation, read fresh context, preview ordered message bubbles, and
9
+ execute an exactly authorized turn through one provider route; publish and
10
+ reconcile text, image, and video posts through observed installed social
11
+ capabilities; inspect or develop bounded provider contracts for X, LinkedIn,
12
+ Bluesky, Substack Notes, Threads, TikTok, Instagram, and YouTube Shorts; save
13
+ private native article drafts; operate reviewed Beeper messaging actions
14
+ across the pinned official CLI and fixed Desktop loopback operations; and build or run typed provider plugins
15
+ from recorded browser-session APIs or versioned provider CLIs. Trigger for web capture,
16
+ URL clipping, authenticated sites, social media posting or cross-posting,
17
+ media download or archiving, transcription, email and messaging integrations,
18
+ HAR-to-API workflows, browser-session API automation, semantic operations,
19
+ and safe provider mutations when raw HTTP, DOM control, cookies, and
20
+ credentials must stay outside the agent.
21
+ ---
22
+
23
+ # Ghostget
24
+
25
+ Ghostget supplies bounded CLI and SDK capabilities, not an agent runtime or application. Use it from the caller's own agent loop.
26
+
27
+ ## Install or verify Ghostget
28
+
29
+ Start with `ghostget --help`. If the command is unavailable, read
30
+ [installation and diagnostics](references/install.md) and install the pinned
31
+ CLI before continuing when the user's request includes installing or using
32
+ Ghostget. Never guess a source-tree command or substitute general browser
33
+ automation.
34
+
35
+ ## Choose the smallest path
36
+
37
+ - Capture a URL: `ghostget <url>` or `ghostget clip <url>`.
38
+ - Read without persistence: `ghostget read <url>`.
39
+ - Archive media: `ghostget archive <url>` or `ghostget audio|video|transcript <url>`.
40
+ - Discover supported article embeds through the provider's bounded semantic media read, then archive each exact returned finite item separately. Do not treat a collection page as one media item or scrape its DOM to manufacture asset routes.
41
+ - Inspect support: `ghostget plugin list`, `ghostget plugin show <id>`, and `ghostget capabilities [adapter]`.
42
+ - Read Reddit post or community user flair choices: follow [Reddit flair](references/reddit-flair.md), including installed capability, same-account evidence, and the separate selection boundary.
43
+ - Search public Puerto Rico rentals: `ghostget clasificados-web listings.search --input '{"location":"San Juan, PR","beds_min":2,"max_price":5500}' --json`. Keep `location` to the reviewed San Juan tokens. Neighborhood comes from street, ZIP, known address, or list-card coordinates, never from broker copy. Zillow-group and Puerto Rico MLS public search are not installed.
44
+ - Operate Beeper: inspect `ghostget capabilities beeper-local --json`, then use
45
+ only its typed read or action operation with the bound local Desktop realm.
46
+ - Export an existing WhatsApp local projection for Message Like Me: follow
47
+ [WhatsApp local Message Like Me export](references/whatsapp-adapter.md).
48
+ This route does not pair, sync, or send, and its seven-file output is private.
49
+ - Export exact local Apple Photos contact evidence: follow
50
+ [Apple Photos contact evidence](references/apple-photos.md). This source has
51
+ no auth or network authority. Its cluster identifiers and counts are private
52
+ biometric-derived metadata. It does not open, copy, or ask Photos to
53
+ materialize referenced photo or video asset files. Its transient `VACUUM
54
+ INTO` copies are full private SQLite databases that can include unselected
55
+ columns and raw blobs; the exclusions apply only to the returned JSON.
56
+ - Read or act on a live conversation: follow
57
+ [agentic messaging](references/messaging.md). Keep one exact provider route,
58
+ use private artifacts for prose and capability references, and never expose a
59
+ provider CLI or API beside Ghostget as a second action path.
60
+ - Diagnose state: `ghostget operator doctor --json`.
61
+ - Invoke a supported semantic operation: `ghostget invoke <adapter> <operation>` or its printed shorthand.
62
+ - Collect exact daily social-account statistics into a checked consumer snapshot: follow [social profile statistics](references/social-profile-stats.md).
63
+ - Export the signed-in X account's bookmarks as a bounded JSON page keyed by `post_id`: follow [X authenticated web API adapter](references/x-adapter.md#export-bookmarks).
64
+ - Read a previously validated exact query without a provider roundtrip: repeat the subject-bound R1 invocation with `--cache-only`; omit that flag to revalidate it explicitly.
65
+ - Read a normalized cross-provider inbox without a provider roundtrip: `ghostget omni read --input <json|@file|-> --cache-only --json`; use `--from-exact-cache` to rebuild from exact ciphertext or omit the mode to revalidate supported sources.
66
+ - Save one private native article draft, including supported plan-bound covers, inline images, and destination-safe source-post references: inspect `articles.draft.save`, then follow [native article drafts](references/article-drafts.md). Keep a provider cover outside the body document; on an exact LinkedIn replacement, omit it only to preserve the independently read existing banner. Never substitute `articles.publish`.
67
+ - Cross-post one exact text and optional ordered-image package: inspect every installed target schema, then follow [social cross-posting](references/cross-posting.md).
68
+ - Cross-post one exact video package: require an observed video-capable operation for every selected target, then follow [video social cross-posting](references/cross-posting-video.md).
69
+ - When a cross-post package uses user-supplied copy, never mark it as AI-generated. Follow [X AI disclosure](references/x-ai-disclosure.md): leave official `x` `made_with_ai` unset or `false`, prefer a Ghostget transport over the X composer, and treat a live sparkle Made with AI label as a failed publish. An explicitly authorized AI-media label outside that workflow remains a separate provider input choice.
70
+ - Add a provider without changing Ghostget source: author a portable plugin.
71
+ - Derive a reviewed first-party contract from authorized HAR evidence: follow [the derivation guide](references/derivation.md).
72
+
73
+ Do not expose raw requests, endpoints, GraphQL, Rest.li, JavaScript, selectors, cookies, headers, storage, arbitrary paths, or unrestricted file transfer. A capability is a bounded semantic operation with an exact transport, origin, account binding, input schema, risk, side effect, and response projection.
74
+ For a native provider CLI, do not expose argv, a shell, ambient environment,
75
+ package-manager channels, target defaults, or plugin installation. Require an
76
+ exact source-plugin-owned executable identity and fixed operation templates.
77
+
78
+ Ghostget admits at most two locally owned fresh or profile-backed page-capture
79
+ browsers across processes sharing its state home. Let capture wait for the
80
+ lesser of its remaining timeout and the 30-second admission polling budget;
81
+ queueing consumes that timeout. A bounded state helper may settle after the
82
+ polling budget, but the browser cannot launch after deadline revalidation. Do
83
+ not bypass the gate by spawning agent-browser directly. Explicit CDP and
84
+ browser-live attachment skip admission because Ghostget does not own those
85
+ browser processes. Managed provider/bootstrap and derivation sessions remain
86
+ outside this first cap. Before parallel first use of a new state home, run
87
+ `ghostget runs list --json` once serially. Malformed, unverifiable, and same-boot
88
+ dead-owner claims remain occupied until their exact resources are recovered.
89
+ Run `ghostget doctor --json`; it acquires a durable recovery lease before any
90
+ effect and acts only when the exact private session, daemon start identity,
91
+ launch identity, CDP endpoint, and private-root generation still match. It
92
+ persists quiescence before journaled root removal so a crash can resume without
93
+ weakening those proofs. Never delete a claim, kill a browser tree, or edit
94
+ Ghostget state to bypass this fence. If any proof is missing or changes, retain
95
+ the claim and inspect the reported category rather than treating a reboot as a
96
+ recovery procedure.
97
+ LinkedIn profile and organization reads and Instagram profile reads whose
98
+ browser daemon exits naturally during finalization can settle inline without
99
+ repeating the read or signaling the dead owner. That path still requires the
100
+ exact pinned owner to be dead, two exact inactive session envelopes, unchanged
101
+ private-root generations, three refused CDP connections, and a final owner,
102
+ session, and root reproof. Unknown liveness, malformed lifecycle output,
103
+ identity drift, root replacement, an available or indeterminate CDP endpoint,
104
+ and durable-claim drift remain cleanup-required.
105
+
106
+ ## Author a portable provider
107
+
108
+ Read [provider plugins](references/provider-plugins.md), [the adapter contract](references/adapter-contract.md), and [safety and state](references/safety-and-state.md). Then create an inert package:
109
+
110
+ ```sh
111
+ ghostget plugin init example-web \
112
+ --display-name "Example" \
113
+ --surface example \
114
+ --origin https://www.example.com \
115
+ --operation feeds.read \
116
+ --output /absolute/private/example-web
117
+ ```
118
+
119
+ `init` writes a strict `ghostget-plugin.json`, one self-contained Bun runtime, secret-free fixtures, and package-local agent guidance. Its operation starts `capture-required` and network-inert. Keep it that way until authorized evidence proves:
120
+
121
+ 1. the exact HTTPS origin and route;
122
+ 2. the current-account probe and stable subject binding;
123
+ 3. the bounded request and credential sinks;
124
+ 4. accepted status, content type, response projection, and pagination;
125
+ 5. actor, target, side effect, idempotency, and uncertainty behavior;
126
+ 6. drift and negative cases without a DOM or transport fallback.
127
+
128
+ Verify the package in order:
129
+
130
+ ```sh
131
+ ghostget plugin check /absolute/private/example-web --json
132
+ ghostget plugin test /absolute/private/example-web --trust-code --json
133
+ ghostget plugin pack /absolute/private/example-web \
134
+ --output /absolute/private/example-web.wrenchplugin --json
135
+ ghostget plugin install /absolute/private/example-web.wrenchplugin \
136
+ --trust-code --json
137
+ ghostget capabilities example-web --json
138
+ ```
139
+
140
+ `check` is static. `test --trust-code` and `install --trust-code` explicitly authorize execution of the exact verified bundle. Process separation contains ordinary failures but is not a hostile-code sandbox: plugin code still runs as the user's OS account. Never execute an unverified authoring directory or import portable code into the host.
141
+
142
+ For updates, bind the transition to the installed digest:
143
+
144
+ ```sh
145
+ ghostget plugin show example-web --json
146
+ ghostget plugin install /absolute/private/example-web.wrenchplugin \
147
+ --trust-code --expected-current <bundle-sha256> --json
148
+ ```
149
+
150
+ Ghostget refuses update, disable, or removal while a live invocation, preview, claim, journal, recovery capsule, or linked-device lifecycle owns the bundle. Inspect blockers with `ghostget plugin doctor`, `ghostget plans list`, and `ghostget runs list`.
151
+
152
+ ## Configure one stable auth realm
153
+
154
+ Store a locator, not copied secrets:
155
+
156
+ ```sh
157
+ ghostget auth add example-main --cookie-source arc --cookie-profile "Profile 1"
158
+ ghostget auth bind example-main --site example
159
+ ghostget auth list --json
160
+ ```
161
+
162
+ Use OAuth only for a reviewed `provider-api` plugin. Use browser cookies or a private profile only for a reviewed `web-session-api` plugin. Use a linked-device store locator for the reviewed Beeper `local-cli` binding; that locator selects the already-authorized Desktop realm, not arbitrary process authority. Never silently switch transports. A profile snapshot requires the source browser to be closed and may require `--browser-executable` plus explicit `--trust-profile-egress` because a path-backed browser has no domain-containment boundary.
163
+
164
+ For Gmail/Google Contacts, prefer managed native OAuth:
165
+
166
+ ```sh
167
+ ghostget auth login gmail-main --client-file /absolute/path/to/google-desktop-client.json
168
+ ```
169
+
170
+ Ghostget opens the system browser, uses PKCE plus a loopback callback, verifies
171
+ the Gmail subject, stores the refresh credential and Desktop client fields in
172
+ a mode-restricted local JSON file, and renews access tokens. This is not an OS
173
+ keychain or encrypted-at-rest store. The user—not browser automation—handles
174
+ Google sign-in, account choice, warnings, and consent. Tell them that
175
+ `gmail.readonly` is a Google restricted mailbox-read grant even though the
176
+ relationship contract fetches metadata only. Never ask the user to paste a
177
+ token. Confirm `accountSubject` with a one-row live `contacts.list` read before
178
+ syncing. Use `contacts.list` with collection
179
+ `contacts`, `other-contacts`, or `interactions`; the last requires one fixed
180
+ whole-second `before` cutoff, accepts the prior cutoff as an optional inclusive
181
+ `after` bound for incremental reads, and exposes message-count/timestamp
182
+ completeness plus first-page send-as aliases for self-address exclusion without
183
+ reading bodies.
184
+
185
+ Treat each auth ID as one stable provider account. Probe and bind the current account before private reads or writes; reject missing, ambiguous, changed, or mismatched identities. Keep tokens, cookies, HAR content, profile state, messages, and attachment paths out of output, logs, receipts, and Git.
186
+
187
+ ## Invoke with the risk boundary intact
188
+
189
+ Inspect the capability first:
190
+
191
+ ```sh
192
+ ghostget capabilities example-web --json
193
+ ghostget example-web feeds.read --input '{"limit":20}' --auth example-main --json
194
+ ghostget example-web feeds.read --input '{"limit":20}' --auth example-main --cache-only --json
195
+ ```
196
+
197
+ - `capture-required` performs no request.
198
+ - `R1` is a reviewed read with no intended remote mutation.
199
+ - `R2` is one bounded, normally reversible change.
200
+ - `R3` is externally visible or consequential.
201
+ - `R4` is blocked.
202
+
203
+ Successful subject-bound R1 reads publish an encrypted exact-query snapshot.
204
+ `--cache-only` returns that snapshot and its data revision, validation time,
205
+ age, and freshness without opening a browser or provider connection. A normal
206
+ R1 invocation is the explicit revalidation path. Do not rewrite cursors,
207
+ limits, folders, or targets to manufacture a cache hit, and do not assume that
208
+ revalidating a local linked-device projection performs a remote sync.
209
+
210
+ For an omni request, list each exact `messaging.list` or `messaging.read`
211
+ source with its adapter, auth ID, and input. Treat its shared Conversation,
212
+ Message, and Notification union as a derivative, never as replacement evidence
213
+ for the exact provider snapshot. Inspect every per-source normalization state.
214
+ `retained-after-drift` means the provider's newest exact bytes failed its
215
+ provider-owned materializer and the returned entities are deliberately the
216
+ last good derivative. Do not hide or coerce that status. Public reasons are
217
+ categorical; detailed drift diagnostics stay encrypted. During SWR, treat an
218
+ `omni-merged` current view as cached data paired with the unresolved live source
219
+ statuses that remain authoritative for display. Provider cursors stay private;
220
+ use only the authenticated local view cursor returned by Ghostget.
221
+ Omni v1 has no write-tag invalidation surface. Auth-incarnation, materializer,
222
+ and plugin implementation identity changes strand prior derivatives. Exact
223
+ query freshness advances only through explicit R1 revalidation.
224
+
225
+ R2/R3 produce an exact five-minute preview. Review adapter, operation,
226
+ transport, account, scalar input, attachment hashes and order, side effect,
227
+ contract hash, and dispatch schedule, then run the printed `ghostget confirm
228
+ <digest>`. A messaging turn uses its stricter private preview and same-turn
229
+ authorization procedure in [agentic messaging](references/messaging.md).
230
+ Never retry `pending`, `partial`, or `indeterminate` work. Reconcile from
231
+ independently observed, secret-free evidence only when the installed exact
232
+ contract advertises reconciliation; image-upload draft contracts deliberately
233
+ do not. Reconciliation never repeats the original mutation.
234
+
235
+ ## Derive only when a contract is missing
236
+
237
+ Use a managed derivation to capture the minimum authorized first-party exchange. Seal and inspect the HAR through `ghostget derive review`, finish into a private directory, and scaffold one inert operation with `ghostget plugin scaffold`. Generic derivation output is evidence, not an executable client. Implement and promote only the exact reviewed contract; never fall back to DOM clicking. See [derivation](references/derivation.md) and [the code-owned scaffold](references/code-owned-provider-scaffold.md).
238
+
239
+ ## Finish with evidence
240
+
241
+ - Freeze built-in provider source and tests before updating durable contract
242
+ semantic identities. Follow [provider plugins](references/provider-plugins.md)
243
+ to review the semantic digest once; Ghostget derives and revalidates the exact
244
+ source/dependency closure automatically and has no manual hash-approval step.
245
+ - Re-run `ghostget plugin check` and secret-free fixtures.
246
+ - Prove exact origin, method, path, input bounds, response variants, identity binding, redirects, drift, and redaction.
247
+ - Exercise only authorized observed operations.
248
+ - Verify a `capture-required` operation performs no request.
249
+ - Inspect receipts and confirm credentials and payload text are absent.
250
+ - Remove managed HARs, profile snapshots, bootstrap state, and plan assets when their lifecycle is complete.
251
+ - Forward-test material skill changes with a fresh agent given only this skill and an installed `ghostget` command.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Ghostget"
3
+ short_description: "Capture, archive, and run bounded provider operations"
4
+ default_prompt: "Use $ghostget to capture or archive this source, work with a bounded signed-in provider, inspect or act on an exact live conversation through private messaging artifacts, cross-post social media, query cached inbox data, or author a provider plugin."
@@ -0,0 +1,181 @@
1
+ # Adapter contract
2
+
3
+ Use a strict, secret-free manifest to select a code-owned semantic operation.
4
+ For a signed-in site capability, prefer schema-v4 `webSession`. Use
5
+ schema-v6 `localCli` only for an exact source-plugin-owned provider executable.
6
+ A manifest never contains a captured request or command line.
7
+
8
+ ## Contents
9
+
10
+ - [Transport versions](#transport-versions)
11
+ - [Manifest identity](#manifest-identity)
12
+ - [Semantic operation and input](#semantic-operation-and-input)
13
+ - [Schema-v6 local CLI selector](#schema-v6-local-cli-selector)
14
+ - [Schema-v4 selector](#schema-v4-selector)
15
+ - [Code-owned request template](#code-owned-request-template)
16
+ - [Dynamic token boundary](#dynamic-token-boundary)
17
+ - [Response and identity binding](#response-and-identity-binding)
18
+ - [Risk and dispatch](#risk-and-dispatch)
19
+ - [Promotion and drift](#promotion-and-drift)
20
+
21
+ ## Transport versions
22
+
23
+ - Schema version 6 selects one exact, source-plugin-owned `local-cli` contract.
24
+ Its binding pins the reviewed executable artifacts independently from the
25
+ operation's semantic `contractVersion`. It never exposes argv or a shell.
26
+ - Schema version 5 reserves generic-site derivation work only. Version-1 `reviewedTemplate` operations must remain `capture-required`; manifest validation rejects `reviewed`, and neither state supplies an executable request. A future contract version 2 must add a current-account identity preflight and response-scope binding before generic execution can be considered.
27
+ - Schema version 4 selects one reviewed first-party authenticated web contract and uses `web-session-api` at runtime.
28
+ - Schema version 3 selects one reviewed official `provider-api` contract with OAuth auth.
29
+ - Schema version 2 is a retired semantic browser-recipe grammar retained only to diagnose old files. Any schema-v1/v2 DOM operation is install- and runtime-inert: adapter validation, installation, planning, execution, and the direct recipe executor fail closed for every origin. A supported operation must use schema 6, schema 4, or an appropriate schema-3 provider contract.
30
+ - Schema version 1 exists only for the exact archived LinkedIn migration fixture.
31
+
32
+ Never retry or fall back across these transports. A browser may help schema 4 acquire session state or current dynamic material, but it does not execute the semantic action by clicking the site.
33
+
34
+ ## Manifest identity
35
+
36
+ - Use a lowercase kebab-case `id`, semantic `version`, and short `displayName`.
37
+ - Bind a catalogued site with the exact `surfaceId`.
38
+ - Declare only exact HTTPS `origins`; reject paths, embedded credentials, local/private hosts, and runtime-discovered origins.
39
+ - Keep `browserDomains` limited to hosts needed for capture or bootstrap. It does not authorize an API endpoint.
40
+ - Keep cookies, tokens, captured authorization, account-private IDs, messages, HAR values, request templates, and local paths out of the manifest.
41
+
42
+ ## Semantic operation and input
43
+
44
+ Use canonical outcome names such as:
45
+
46
+ ```text
47
+ feeds.read
48
+ messaging.list
49
+ messaging.read
50
+ messaging.send
51
+ posts.publish
52
+ posts.repost
53
+ reactions.set
54
+ threads.publish
55
+ ```
56
+
57
+ Do not expose `graphql.call`, `voyager.request`, `restli.post`, `selector.click`, or another transport-shaped operation.
58
+
59
+ Declare bounded typed inputs. Apply exact enums and realistic length, number, array, file-size, and media-type limits. Require every field used by the owned request contract. Keep provider identifiers opaque but syntactically bounded; do not accept an arbitrary URL when a conversation, post, user, or list ID is the actual target.
60
+
61
+ Bind ordered thread items and attachment bytes into the encrypted plan before preview. The preview may show content hashes, sizes, and detected media types rather than mutable paths.
62
+
63
+ ## Schema-v6 local CLI selector
64
+
65
+ Each operation selects one installed semantic contract:
66
+
67
+ ```json
68
+ {
69
+ "localCli": {
70
+ "surface": "beeper",
71
+ "action": "messaging.send",
72
+ "contractVersion": 1,
73
+ "timeoutMs": 60000,
74
+ "maxOutputBytes": 10485760
75
+ }
76
+ }
77
+ ```
78
+
79
+ Require `surface` to match `surfaceId`, `action` to match the operation ID, and
80
+ risk/input schema to match the code-owned registry. The source-plugin binding,
81
+ not the manifest, owns the exact tool identity and fixed command template. The
82
+ contract hash binds both, so changing reviewed executable bytes invalidates an
83
+ old preview without pretending that an unchanged semantic projection needs a
84
+ new `contractVersion`.
85
+
86
+ Never put an executable path, argument array, environment variable, account
87
+ default, target URL, or output path in the manifest. See
88
+ [provider plugins](provider-plugins.md) for the source runtime boundary.
89
+
90
+ ## Schema-v4 selector
91
+
92
+ Each operation contains one selector with no request surface:
93
+
94
+ ```json
95
+ {
96
+ "webSession": {
97
+ "site": "x",
98
+ "action": "posts.publish",
99
+ "contractVersion": 1,
100
+ "timeoutMs": 60000,
101
+ "maxOutputBytes": 2097152
102
+ }
103
+ }
104
+ ```
105
+
106
+ Require `site` to match `surfaceId`, `action` to match the operation ID, and risk/input schema to match the code-owned registry. Store the contract hash in previews and receipts. Reject a stale confirmation after any contract change.
107
+
108
+ The registry uses two public states:
109
+
110
+ - `observed`: reviewed evidence and an installed runtime contract exist for the exact version.
111
+ - `capture-required`: the semantic operation is reserved, but one or more exact exchange facts are missing or stale. Perform no request and expose no browser fallback.
112
+
113
+ Do not treat `capture-required` as degraded support.
114
+
115
+ ## Code-owned request template
116
+
117
+ Keep the first-party exchange in owned TypeScript or another reviewed executable module. Bind:
118
+
119
+ - one exact HTTPS origin;
120
+ - one fixed method from the reviewed set;
121
+ - an origin-relative path made from fixed segments and individually encoded typed inputs;
122
+ - fixed query names and scalar/JSON encodings;
123
+ - a fixed JSON, form, or empty body structure;
124
+ - fixed non-credential headers;
125
+ - cookie acquisition through the auth layer;
126
+ - explicitly allowed dynamic credential sources and sinks;
127
+ - one bounded response contract.
128
+
129
+ Reject redirects rather than inheriting credentials across locations. Reject unknown methods, origins, paths, query parameters, body fields, headers, or response variants. Never add an arbitrary request, header, raw GraphQL, or templated URL escape hatch.
130
+
131
+ ## Dynamic token boundary
132
+
133
+ Resolve a current value only when the contract names its source and sink:
134
+
135
+ - CSRF/XSRF may come from one exact cookie, meta field, or local/session-storage key and terminate only in one fixed CSRF/XSRF header.
136
+ - Authorization may come from one exact storage key or a captured authorization header and terminate only in `authorization`.
137
+ - Registered-query revisions may be discovered from current first-party assets or capture metadata by exact operation prefix; require one unique bounded match.
138
+
139
+ Keep values in memory and out of plans, receipts, logs, URLs, bodies, and normalized output. Reject literals in credential-bearing headers. Reject source/sink mismatch, duplicate cookie values, malformed encoding, missing browser bootstrap, and ambiguous revisions.
140
+
141
+ ## Response and identity binding
142
+
143
+ Declare exact successful status and content-type pairs. Bound response bytes before parsing. For JSON, project only named, typed paths and reject required-path or type drift.
144
+
145
+ Add strict response bindings for every field needed to prevent confused-deputy behavior:
146
+
147
+ - requested conversation, post, comment, user, list, or article identity;
148
+ - requested desired state or created content identity;
149
+ - actor identity for a mutation;
150
+ - created parent/root relationships for replies, reposts, or threads.
151
+
152
+ Bind the auth realm separately to the current provider account. Resolve a stable viewer/account ID through a reviewed first-party request, compare it with the realm's expected binding, and fail before private reads or dispatch when missing, ambiguous, or mismatched. Do not infer account identity from a profile path or cookie filename.
153
+
154
+ ## Risk and dispatch
155
+
156
+ | Risk | Meaning | Execution |
157
+ | --- | --- | --- |
158
+ | `R1` | Reviewed read with no intended mutation | Direct |
159
+ | `R2` | Bounded, normally reversible mutation | Exact preview and digest confirmation |
160
+ | `R3` | Externally visible or consequential mutation | Exact preview and digest confirmation |
161
+ | `R4` | Sensitive/high-authority action outside this boundary | Blocked |
162
+
163
+ For R1, use `sideEffect: "none"`, `idempotency: "none"`, and `dedupeWindowMs: 0`. Permit only read methods and explicitly deny observed presence, seen, delivery, read-receipt, badge, and acknowledgement requests.
164
+
165
+ For R2/R3, describe the remote effect, use `local-at-most-once`, and choose a 60-second-to-30-day dedupe window. Bind the complete dispatch schedule before confirmation. Messages, comments, replies, posts, reposts, quotes, and threads are R3. Likes, bookmarks, reversible reactions, and follows may be R2 when the exact create/delete desired-state contract is captured. One exact authored-item deletion may be R3 only on a reviewed surface that binds current-account ownership, an immutable target/revision, a single delete request, and independent exact absence readback. Credential, access-control, financial, bulk/untargeted deletion, account deletion, and administration actions remain R4.
166
+
167
+ Mark dispatch durable immediately before the request leaves. Mark verification only after an exact response variant and target/account bindings pass. A timeout or binding failure after dispatch is `indeterminate`; a stopped multi-request schedule after verified earlier effects is `partial`. Never auto-resume either state.
168
+
169
+ ## Promotion and drift
170
+
171
+ Promote a contract only after:
172
+
173
+ 1. inert HAR evidence identifies the exact first-party exchange;
174
+ 2. deterministic tests reject all undeclared request and response variations;
175
+ 3. account, actor, target, and parent bindings are explicit;
176
+ 4. secrets can reach only their reviewed header sinks;
177
+ 5. one authorized low-stakes live fixture passes through the public CLI;
178
+ 6. duplicate refusal and uncertain-result behavior pass;
179
+ 7. logs, plans, receipts, and temporary state pass a secret scan.
180
+
181
+ On path, query revision, feature set, token source, request field, status, content type, projection, or binding drift, return `capture-required`. Re-capture and review a new contract version. Do not patch the request from arbitrary live traffic and do not click the DOM instead.
@@ -0,0 +1,115 @@
1
+ # Apple Photos contact evidence
2
+
3
+ Use this workflow when a local application needs exact evidence that one
4
+ Apple Photos person cluster is linked to one Apple Contacts record. It is a
5
+ local-source export, not a provider capability, Photos API, contact search, or
6
+ media reader.
7
+
8
+ ## Run the bounded export
9
+
10
+ The default source is the conventional current-account Photos library path,
11
+ `~/Pictures/Photos Library.photoslibrary`. It does not discover or claim the
12
+ library that Photos currently designates as the System Photo Library:
13
+
14
+ ```sh
15
+ umask 077
16
+ ghostget apple-photos export-contact-evidence --json \
17
+ > /absolute/private/apple-photos-contact-evidence.json
18
+ ```
19
+
20
+ Select a different library only by its normalized absolute
21
+ `.photoslibrary` directory:
22
+
23
+ ```sh
24
+ ghostget apple-photos export-contact-evidence \
25
+ --library /absolute/private/Family.photoslibrary --json
26
+ ```
27
+
28
+ There is no database-file, Contacts-root, SQL, query, output-path, network, or
29
+ media option. The command discovers the current Apple Contacts stores from the
30
+ fixed account root. It does not authenticate, connect, sync, download, modify,
31
+ or ask Photos to materialize an asset.
32
+
33
+ ## Exact evidence boundary
34
+
35
+ Ghostget accepts only owned real directories and owned single-link regular
36
+ SQLite files within reviewed byte and count bounds. It opens each source
37
+ read-only with trusted schemas disabled and uses SQLite `VACUUM INTO` to create
38
+ one mode-`0600` database in a mode-`0700` operation-owned temporary directory.
39
+ The source's device, inode, birth time, owner, type, link count, and permission
40
+ mode must agree before and after capture. Live size and modification-time churn
41
+ is allowed. Apple Contacts databases use the same boundary. Ghostget runs
42
+ `quick_check`, then opens only the captured databases read-only and query-only.
43
+
44
+ Relevant Core Data tables and columns have a strict schema fingerprint. Schema
45
+ drift, SQLite integrity failure, a symlink, hardlink, owner or physical-identity
46
+ mismatch, or size overrun fails closed. Ordinary success and handled failure
47
+ remove the temporary captures before returning. Forced termination or a crash
48
+ can leave an exact leased capture for a later recovery pass.
49
+
50
+ The CLI serializes private local exports before inspecting a source. Its
51
+ operation-owned snapshot directory has a process-owned,
52
+ filesystem-identity-bound recovery lease before database bytes are copied. A
53
+ later export reclaims only an exact directory whose owner is dead; live or
54
+ uninspectable owners remain untouched and stop the run.
55
+
56
+ The exact relationship is:
57
+
58
+ ```text
59
+ ZPERSON.ZPERSONURI = ZABCDRECORD.ZUNIQUEID
60
+ ```
61
+
62
+ Ghostget does not parse `ZCONTACTMATCHINGDICTIONARY` or infer a match from a
63
+ name. Unmatched Photos people are excluded.
64
+
65
+ ## Output and completeness
66
+
67
+ Stdout contains one strict `{ "receipt": ..., "output": ... }` JSON value.
68
+ The schema-1 output format is `wrench.apple-photos-contact-evidence`. Each
69
+ sorted evidence row contains:
70
+
71
+ - `photosPersonId`;
72
+ - `appleContactId`;
73
+ - `linkedFaceCount`;
74
+ - `linkedAssetCount`, the number of distinct `ZASSET` rows linked through the
75
+ detected faces;
76
+ - `firstAssetAt` and `lastAssetAt`, or two null values when no linked asset has
77
+ a date.
78
+
79
+ The output and receipt declare a path-free realm digest for the physical Photos
80
+ library, the source generation, relevant Photos and Contacts schema digests,
81
+ bounds, counts, privacy exclusions, component capture intervals, and canonical
82
+ SHA-256 integrity. Each captured database is internally consistent within its
83
+ interval. The export does not claim an atomic instant across Photos and
84
+ Contacts or completed iCloud and Contacts synchronization. Absence is not
85
+ deletion evidence.
86
+
87
+ Ghostget does not open, copy, or ask Photos to materialize referenced photo or
88
+ video asset files. A `VACUUM INTO` capture is nevertheless a full private
89
+ Photos or Contacts SQLite database copy and can include unselected columns and
90
+ raw blobs. The privacy exclusions apply only to the returned JSON: names,
91
+ paths, images, encoded media, thumbnails, locations, raw blobs, credentials,
92
+ faceprint templates, face crops, and unmatched clusters are not selected or
93
+ projected. The returned cluster identifiers and counts
94
+ are private biometric-derived metadata as well as relationship evidence. Keep
95
+ the artifact outside Git and shared output paths.
96
+
97
+ ## Typed client
98
+
99
+ Local Bun applications can invoke the installed Ghostget boundary without
100
+ duplicating SQLite custody:
101
+
102
+ ```ts
103
+ import {
104
+ exportApplePhotosContactEvidenceSync,
105
+ parseApplePhotosContactEvidenceExportResult,
106
+ } from "@hraness/ghostget/apple-photos"
107
+
108
+ const result = exportApplePhotosContactEvidenceSync()
109
+ const checked = parseApplePhotosContactEvidenceExportResult(result)
110
+ ```
111
+
112
+ Consumers should map these exact source coordinates into their own person
113
+ model and retain the receipt. They must not read Photos or Contacts databases
114
+ again, infer names, expose biometric-derived counts, or advance a deletion
115
+ state from an absent relationship.