jfl 0.4.4 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (533) hide show
  1. package/dist/commands/context-hub.d.ts +1 -0
  2. package/dist/commands/context-hub.d.ts.map +1 -1
  3. package/dist/commands/context-hub.js +1064 -41
  4. package/dist/commands/context-hub.js.map +1 -1
  5. package/dist/commands/eval.d.ts +1 -1
  6. package/dist/commands/eval.d.ts.map +1 -1
  7. package/dist/commands/eval.js +192 -1
  8. package/dist/commands/eval.js.map +1 -1
  9. package/dist/commands/findings.d.ts +6 -0
  10. package/dist/commands/findings.d.ts.map +1 -0
  11. package/dist/commands/findings.js +203 -0
  12. package/dist/commands/findings.js.map +1 -0
  13. package/dist/commands/hud.d.ts.map +1 -1
  14. package/dist/commands/hud.js +47 -9
  15. package/dist/commands/hud.js.map +1 -1
  16. package/dist/commands/ide.d.ts +27 -0
  17. package/dist/commands/ide.d.ts.map +1 -0
  18. package/dist/commands/ide.js +546 -0
  19. package/dist/commands/ide.js.map +1 -0
  20. package/dist/commands/onboard.d.ts.map +1 -1
  21. package/dist/commands/onboard.js +212 -2
  22. package/dist/commands/onboard.js.map +1 -1
  23. package/dist/commands/openclaw.d.ts +3 -0
  24. package/dist/commands/openclaw.d.ts.map +1 -1
  25. package/dist/commands/openclaw.js +76 -2
  26. package/dist/commands/openclaw.js.map +1 -1
  27. package/dist/commands/peter.d.ts +3 -0
  28. package/dist/commands/peter.d.ts.map +1 -1
  29. package/dist/commands/peter.js +1168 -58
  30. package/dist/commands/peter.js.map +1 -1
  31. package/dist/commands/pi-fleet.d.ts +18 -0
  32. package/dist/commands/pi-fleet.d.ts.map +1 -0
  33. package/dist/commands/pi-fleet.js +382 -0
  34. package/dist/commands/pi-fleet.js.map +1 -0
  35. package/dist/commands/pi.d.ts.map +1 -1
  36. package/dist/commands/pi.js +18 -3
  37. package/dist/commands/pi.js.map +1 -1
  38. package/dist/commands/scope.d.ts.map +1 -1
  39. package/dist/commands/scope.js +90 -1
  40. package/dist/commands/scope.js.map +1 -1
  41. package/dist/commands/services.d.ts.map +1 -1
  42. package/dist/commands/services.js +18 -0
  43. package/dist/commands/services.js.map +1 -1
  44. package/dist/commands/setup.d.ts +12 -0
  45. package/dist/commands/setup.d.ts.map +1 -0
  46. package/dist/commands/setup.js +322 -0
  47. package/dist/commands/setup.js.map +1 -0
  48. package/dist/commands/status.d.ts.map +1 -1
  49. package/dist/commands/status.js +22 -4
  50. package/dist/commands/status.js.map +1 -1
  51. package/dist/commands/train.d.ts +33 -0
  52. package/dist/commands/train.d.ts.map +1 -0
  53. package/dist/commands/train.js +510 -0
  54. package/dist/commands/train.js.map +1 -0
  55. package/dist/commands/verify.d.ts +14 -0
  56. package/dist/commands/verify.d.ts.map +1 -0
  57. package/dist/commands/verify.js +276 -0
  58. package/dist/commands/verify.js.map +1 -0
  59. package/dist/commands/viz.d.ts.map +1 -1
  60. package/dist/commands/viz.js +417 -0
  61. package/dist/commands/viz.js.map +1 -1
  62. package/dist/dashboard-static/assets/index-CW9ZxqX8.css +1 -0
  63. package/dist/dashboard-static/assets/index-DNN__p4K.js +121 -0
  64. package/dist/dashboard-static/index.html +2 -2
  65. package/dist/index.js +324 -64
  66. package/dist/index.js.map +1 -1
  67. package/dist/lib/agent-config.d.ts +52 -0
  68. package/dist/lib/agent-config.d.ts.map +1 -0
  69. package/dist/lib/agent-config.js +231 -0
  70. package/dist/lib/agent-config.js.map +1 -0
  71. package/dist/lib/agent-generator.d.ts +10 -0
  72. package/dist/lib/agent-generator.d.ts.map +1 -1
  73. package/dist/lib/agent-generator.js +64 -10
  74. package/dist/lib/agent-generator.js.map +1 -1
  75. package/dist/lib/agent-session.d.ts +104 -0
  76. package/dist/lib/agent-session.d.ts.map +1 -0
  77. package/dist/lib/agent-session.js +635 -0
  78. package/dist/lib/agent-session.js.map +1 -0
  79. package/dist/lib/eval-snapshot.d.ts +47 -0
  80. package/dist/lib/eval-snapshot.d.ts.map +1 -0
  81. package/dist/lib/eval-snapshot.js +315 -0
  82. package/dist/lib/eval-snapshot.js.map +1 -0
  83. package/dist/lib/eval-store.d.ts +5 -0
  84. package/dist/lib/eval-store.d.ts.map +1 -1
  85. package/dist/lib/eval-store.js +33 -3
  86. package/dist/lib/eval-store.js.map +1 -1
  87. package/dist/lib/findings-engine.d.ts +51 -0
  88. package/dist/lib/findings-engine.d.ts.map +1 -0
  89. package/dist/lib/findings-engine.js +338 -0
  90. package/dist/lib/findings-engine.js.map +1 -0
  91. package/dist/lib/flow-engine.d.ts +8 -0
  92. package/dist/lib/flow-engine.d.ts.map +1 -1
  93. package/dist/lib/flow-engine.js +84 -2
  94. package/dist/lib/flow-engine.js.map +1 -1
  95. package/dist/lib/hub-client.d.ts +1 -0
  96. package/dist/lib/hub-client.d.ts.map +1 -1
  97. package/dist/lib/hub-client.js +33 -6
  98. package/dist/lib/hub-client.js.map +1 -1
  99. package/dist/lib/ide-panes.d.ts +58 -0
  100. package/dist/lib/ide-panes.d.ts.map +1 -0
  101. package/dist/lib/ide-panes.js +508 -0
  102. package/dist/lib/ide-panes.js.map +1 -0
  103. package/dist/lib/memory-db.js +4 -4
  104. package/dist/lib/memory-db.js.map +1 -1
  105. package/dist/lib/memory-indexer.d.ts.map +1 -1
  106. package/dist/lib/memory-indexer.js +3 -0
  107. package/dist/lib/memory-indexer.js.map +1 -1
  108. package/dist/lib/memory-search.d.ts +148 -4
  109. package/dist/lib/memory-search.d.ts.map +1 -1
  110. package/dist/lib/memory-search.js +496 -58
  111. package/dist/lib/memory-search.js.map +1 -1
  112. package/dist/lib/meta-orchestrator.d.ts +104 -0
  113. package/dist/lib/meta-orchestrator.d.ts.map +1 -0
  114. package/dist/lib/meta-orchestrator.js +373 -0
  115. package/dist/lib/meta-orchestrator.js.map +1 -0
  116. package/dist/lib/peer-agent-generator.d.ts.map +1 -1
  117. package/dist/lib/peer-agent-generator.js +43 -19
  118. package/dist/lib/peer-agent-generator.js.map +1 -1
  119. package/dist/lib/pi-sky/bridge.d.ts +55 -0
  120. package/dist/lib/pi-sky/bridge.d.ts.map +1 -0
  121. package/dist/lib/pi-sky/bridge.js +264 -0
  122. package/dist/lib/pi-sky/bridge.js.map +1 -0
  123. package/dist/lib/pi-sky/cost-monitor.d.ts +21 -0
  124. package/dist/lib/pi-sky/cost-monitor.d.ts.map +1 -0
  125. package/dist/lib/pi-sky/cost-monitor.js +126 -0
  126. package/dist/lib/pi-sky/cost-monitor.js.map +1 -0
  127. package/dist/lib/pi-sky/eval-sweep.d.ts +27 -0
  128. package/dist/lib/pi-sky/eval-sweep.d.ts.map +1 -0
  129. package/dist/lib/pi-sky/eval-sweep.js +141 -0
  130. package/dist/lib/pi-sky/eval-sweep.js.map +1 -0
  131. package/dist/lib/pi-sky/event-router.d.ts +32 -0
  132. package/dist/lib/pi-sky/event-router.d.ts.map +1 -0
  133. package/dist/lib/pi-sky/event-router.js +176 -0
  134. package/dist/lib/pi-sky/event-router.js.map +1 -0
  135. package/dist/lib/pi-sky/experiment.d.ts +9 -0
  136. package/dist/lib/pi-sky/experiment.d.ts.map +1 -0
  137. package/dist/lib/pi-sky/experiment.js +83 -0
  138. package/dist/lib/pi-sky/experiment.js.map +1 -0
  139. package/dist/lib/pi-sky/index.d.ts +16 -0
  140. package/dist/lib/pi-sky/index.d.ts.map +1 -0
  141. package/dist/lib/pi-sky/index.js +16 -0
  142. package/dist/lib/pi-sky/index.js.map +1 -0
  143. package/dist/lib/pi-sky/stratus-gate.d.ts +28 -0
  144. package/dist/lib/pi-sky/stratus-gate.d.ts.map +1 -0
  145. package/dist/lib/pi-sky/stratus-gate.js +61 -0
  146. package/dist/lib/pi-sky/stratus-gate.js.map +1 -0
  147. package/dist/lib/pi-sky/swarm.d.ts +28 -0
  148. package/dist/lib/pi-sky/swarm.d.ts.map +1 -0
  149. package/dist/lib/pi-sky/swarm.js +208 -0
  150. package/dist/lib/pi-sky/swarm.js.map +1 -0
  151. package/dist/lib/pi-sky/types.d.ts +139 -0
  152. package/dist/lib/pi-sky/types.d.ts.map +1 -0
  153. package/dist/lib/pi-sky/types.js +2 -0
  154. package/dist/lib/pi-sky/types.js.map +1 -0
  155. package/dist/lib/pi-sky/voice-bridge.d.ts +20 -0
  156. package/dist/lib/pi-sky/voice-bridge.d.ts.map +1 -0
  157. package/dist/lib/pi-sky/voice-bridge.js +91 -0
  158. package/dist/lib/pi-sky/voice-bridge.js.map +1 -0
  159. package/dist/lib/policy-head.d.ts +40 -0
  160. package/dist/lib/policy-head.d.ts.map +1 -0
  161. package/dist/lib/policy-head.js +234 -0
  162. package/dist/lib/policy-head.js.map +1 -0
  163. package/dist/lib/predictor.d.ts +10 -0
  164. package/dist/lib/predictor.d.ts.map +1 -1
  165. package/dist/lib/predictor.js +46 -7
  166. package/dist/lib/predictor.js.map +1 -1
  167. package/dist/lib/replay-buffer.d.ts +93 -0
  168. package/dist/lib/replay-buffer.d.ts.map +1 -0
  169. package/dist/lib/replay-buffer.js +302 -0
  170. package/dist/lib/replay-buffer.js.map +1 -0
  171. package/dist/lib/sentinel-rl.d.ts +97 -0
  172. package/dist/lib/sentinel-rl.d.ts.map +1 -0
  173. package/dist/lib/sentinel-rl.js +430 -0
  174. package/dist/lib/sentinel-rl.js.map +1 -0
  175. package/dist/lib/session-lock.d.ts +61 -0
  176. package/dist/lib/session-lock.d.ts.map +1 -0
  177. package/dist/lib/session-lock.js +438 -0
  178. package/dist/lib/session-lock.js.map +1 -0
  179. package/dist/lib/setup/agent-generator.d.ts +18 -0
  180. package/dist/lib/setup/agent-generator.d.ts.map +1 -0
  181. package/dist/lib/setup/agent-generator.js +114 -0
  182. package/dist/lib/setup/agent-generator.js.map +1 -0
  183. package/dist/lib/setup/context-analyzer.d.ts +16 -0
  184. package/dist/lib/setup/context-analyzer.d.ts.map +1 -0
  185. package/dist/lib/setup/context-analyzer.js +112 -0
  186. package/dist/lib/setup/context-analyzer.js.map +1 -0
  187. package/dist/lib/setup/doc-auditor.d.ts +54 -0
  188. package/dist/lib/setup/doc-auditor.d.ts.map +1 -0
  189. package/dist/lib/setup/doc-auditor.js +629 -0
  190. package/dist/lib/setup/doc-auditor.js.map +1 -0
  191. package/dist/lib/setup/domain-generator.d.ts +7 -0
  192. package/dist/lib/setup/domain-generator.d.ts.map +1 -0
  193. package/dist/lib/setup/domain-generator.js +58 -0
  194. package/dist/lib/setup/domain-generator.js.map +1 -0
  195. package/dist/lib/setup/smart-eval-generator.d.ts +38 -0
  196. package/dist/lib/setup/smart-eval-generator.d.ts.map +1 -0
  197. package/dist/lib/setup/smart-eval-generator.js +378 -0
  198. package/dist/lib/setup/smart-eval-generator.js.map +1 -0
  199. package/dist/lib/setup/smart-recommender.d.ts +63 -0
  200. package/dist/lib/setup/smart-recommender.d.ts.map +1 -0
  201. package/dist/lib/setup/smart-recommender.js +329 -0
  202. package/dist/lib/setup/smart-recommender.js.map +1 -0
  203. package/dist/lib/setup/spec-generator.d.ts +63 -0
  204. package/dist/lib/setup/spec-generator.d.ts.map +1 -0
  205. package/dist/lib/setup/spec-generator.js +310 -0
  206. package/dist/lib/setup/spec-generator.js.map +1 -0
  207. package/dist/lib/setup/violation-agent-generator.d.ts +32 -0
  208. package/dist/lib/setup/violation-agent-generator.d.ts.map +1 -0
  209. package/dist/lib/setup/violation-agent-generator.js +255 -0
  210. package/dist/lib/setup/violation-agent-generator.js.map +1 -0
  211. package/dist/lib/stratus-client.d.ts +1 -0
  212. package/dist/lib/stratus-client.d.ts.map +1 -1
  213. package/dist/lib/stratus-client.js +24 -2
  214. package/dist/lib/stratus-client.js.map +1 -1
  215. package/dist/lib/telemetry-agent-v2.d.ts +128 -0
  216. package/dist/lib/telemetry-agent-v2.d.ts.map +1 -0
  217. package/dist/lib/telemetry-agent-v2.js +1042 -0
  218. package/dist/lib/telemetry-agent-v2.js.map +1 -0
  219. package/dist/lib/telemetry-agent.d.ts.map +1 -1
  220. package/dist/lib/telemetry-agent.js +27 -6
  221. package/dist/lib/telemetry-agent.js.map +1 -1
  222. package/dist/lib/telemetry-digest.d.ts.map +1 -1
  223. package/dist/lib/telemetry-digest.js +27 -5
  224. package/dist/lib/telemetry-digest.js.map +1 -1
  225. package/dist/lib/telemetry.d.ts.map +1 -1
  226. package/dist/lib/telemetry.js +29 -4
  227. package/dist/lib/telemetry.js.map +1 -1
  228. package/dist/lib/text-preprocessing.d.ts +83 -0
  229. package/dist/lib/text-preprocessing.d.ts.map +1 -0
  230. package/dist/lib/text-preprocessing.js +261 -0
  231. package/dist/lib/text-preprocessing.js.map +1 -0
  232. package/dist/lib/training-buffer.d.ts +86 -0
  233. package/dist/lib/training-buffer.d.ts.map +1 -0
  234. package/dist/lib/training-buffer.js +139 -0
  235. package/dist/lib/training-buffer.js.map +1 -0
  236. package/dist/lib/tuple-miner.d.ts +30 -0
  237. package/dist/lib/tuple-miner.d.ts.map +1 -0
  238. package/dist/lib/tuple-miner.js +427 -0
  239. package/dist/lib/tuple-miner.js.map +1 -0
  240. package/dist/lib/vm-backend.d.ts +72 -0
  241. package/dist/lib/vm-backend.d.ts.map +1 -0
  242. package/dist/lib/vm-backend.js +175 -0
  243. package/dist/lib/vm-backend.js.map +1 -0
  244. package/dist/lib/workspace/backend.d.ts +53 -0
  245. package/dist/lib/workspace/backend.d.ts.map +1 -0
  246. package/dist/lib/workspace/backend.js +37 -0
  247. package/dist/lib/workspace/backend.js.map +1 -0
  248. package/dist/lib/workspace/cmux-adapter.d.ts +46 -0
  249. package/dist/lib/workspace/cmux-adapter.d.ts.map +1 -0
  250. package/dist/lib/workspace/cmux-adapter.js +261 -0
  251. package/dist/lib/workspace/cmux-adapter.js.map +1 -0
  252. package/dist/lib/workspace/data-pipeline.d.ts +35 -0
  253. package/dist/lib/workspace/data-pipeline.d.ts.map +1 -0
  254. package/dist/lib/workspace/data-pipeline.js +463 -0
  255. package/dist/lib/workspace/data-pipeline.js.map +1 -0
  256. package/dist/lib/workspace/engine.d.ts +64 -0
  257. package/dist/lib/workspace/engine.d.ts.map +1 -0
  258. package/dist/lib/workspace/engine.js +397 -0
  259. package/dist/lib/workspace/engine.js.map +1 -0
  260. package/dist/lib/workspace/notifications.d.ts +14 -0
  261. package/dist/lib/workspace/notifications.d.ts.map +1 -0
  262. package/dist/lib/workspace/notifications.js +41 -0
  263. package/dist/lib/workspace/notifications.js.map +1 -0
  264. package/dist/lib/workspace/surface-registry.d.ts +49 -0
  265. package/dist/lib/workspace/surface-registry.d.ts.map +1 -0
  266. package/dist/lib/workspace/surface-registry.js +217 -0
  267. package/dist/lib/workspace/surface-registry.js.map +1 -0
  268. package/dist/lib/workspace/surface-type.d.ts +153 -0
  269. package/dist/lib/workspace/surface-type.d.ts.map +1 -0
  270. package/dist/lib/workspace/surface-type.js +9 -0
  271. package/dist/lib/workspace/surface-type.js.map +1 -0
  272. package/dist/lib/workspace/surfaces/agent-overview.d.ts +16 -0
  273. package/dist/lib/workspace/surfaces/agent-overview.d.ts.map +1 -0
  274. package/dist/lib/workspace/surfaces/agent-overview.js +116 -0
  275. package/dist/lib/workspace/surfaces/agent-overview.js.map +1 -0
  276. package/dist/lib/workspace/surfaces/agent.d.ts +16 -0
  277. package/dist/lib/workspace/surfaces/agent.d.ts.map +1 -0
  278. package/dist/lib/workspace/surfaces/agent.js +112 -0
  279. package/dist/lib/workspace/surfaces/agent.js.map +1 -0
  280. package/dist/lib/workspace/surfaces/claude.d.ts +15 -0
  281. package/dist/lib/workspace/surfaces/claude.d.ts.map +1 -0
  282. package/dist/lib/workspace/surfaces/claude.js +23 -0
  283. package/dist/lib/workspace/surfaces/claude.js.map +1 -0
  284. package/dist/lib/workspace/surfaces/dashboard.d.ts +21 -0
  285. package/dist/lib/workspace/surfaces/dashboard.d.ts.map +1 -0
  286. package/dist/lib/workspace/surfaces/dashboard.js +32 -0
  287. package/dist/lib/workspace/surfaces/dashboard.js.map +1 -0
  288. package/dist/lib/workspace/surfaces/eval.d.ts +15 -0
  289. package/dist/lib/workspace/surfaces/eval.d.ts.map +1 -0
  290. package/dist/lib/workspace/surfaces/eval.js +42 -0
  291. package/dist/lib/workspace/surfaces/eval.js.map +1 -0
  292. package/dist/lib/workspace/surfaces/event-stream.d.ts +16 -0
  293. package/dist/lib/workspace/surfaces/event-stream.d.ts.map +1 -0
  294. package/dist/lib/workspace/surfaces/event-stream.js +40 -0
  295. package/dist/lib/workspace/surfaces/event-stream.js.map +1 -0
  296. package/dist/lib/workspace/surfaces/flow.d.ts +16 -0
  297. package/dist/lib/workspace/surfaces/flow.d.ts.map +1 -0
  298. package/dist/lib/workspace/surfaces/flow.js +49 -0
  299. package/dist/lib/workspace/surfaces/flow.js.map +1 -0
  300. package/dist/lib/workspace/surfaces/index.d.ts +16 -0
  301. package/dist/lib/workspace/surfaces/index.d.ts.map +1 -0
  302. package/dist/lib/workspace/surfaces/index.js +16 -0
  303. package/dist/lib/workspace/surfaces/index.js.map +1 -0
  304. package/dist/lib/workspace/surfaces/portfolio.d.ts +16 -0
  305. package/dist/lib/workspace/surfaces/portfolio.d.ts.map +1 -0
  306. package/dist/lib/workspace/surfaces/portfolio.js +102 -0
  307. package/dist/lib/workspace/surfaces/portfolio.js.map +1 -0
  308. package/dist/lib/workspace/surfaces/service.d.ts +16 -0
  309. package/dist/lib/workspace/surfaces/service.d.ts.map +1 -0
  310. package/dist/lib/workspace/surfaces/service.js +45 -0
  311. package/dist/lib/workspace/surfaces/service.js.map +1 -0
  312. package/dist/lib/workspace/surfaces/shell.d.ts +15 -0
  313. package/dist/lib/workspace/surfaces/shell.d.ts.map +1 -0
  314. package/dist/lib/workspace/surfaces/shell.js +19 -0
  315. package/dist/lib/workspace/surfaces/shell.js.map +1 -0
  316. package/dist/lib/workspace/surfaces/telemetry.d.ts +16 -0
  317. package/dist/lib/workspace/surfaces/telemetry.d.ts.map +1 -0
  318. package/dist/lib/workspace/surfaces/telemetry.js +48 -0
  319. package/dist/lib/workspace/surfaces/telemetry.js.map +1 -0
  320. package/dist/lib/workspace/surfaces/topology.d.ts +15 -0
  321. package/dist/lib/workspace/surfaces/topology.d.ts.map +1 -0
  322. package/dist/lib/workspace/surfaces/topology.js +19 -0
  323. package/dist/lib/workspace/surfaces/topology.js.map +1 -0
  324. package/dist/lib/workspace/surfaces/training.d.ts +16 -0
  325. package/dist/lib/workspace/surfaces/training.d.ts.map +1 -0
  326. package/dist/lib/workspace/surfaces/training.js +22 -0
  327. package/dist/lib/workspace/surfaces/training.js.map +1 -0
  328. package/dist/lib/workspace/tmux-adapter.d.ts +27 -0
  329. package/dist/lib/workspace/tmux-adapter.d.ts.map +1 -0
  330. package/dist/lib/workspace/tmux-adapter.js +106 -0
  331. package/dist/lib/workspace/tmux-adapter.js.map +1 -0
  332. package/dist/mcp/context-hub-mcp.js +7 -24
  333. package/dist/mcp/context-hub-mcp.js.map +1 -1
  334. package/dist/types/flows.d.ts +2 -0
  335. package/dist/types/flows.d.ts.map +1 -1
  336. package/dist/types/ide.d.ts +49 -0
  337. package/dist/types/ide.d.ts.map +1 -0
  338. package/dist/types/ide.js +5 -0
  339. package/dist/types/ide.js.map +1 -0
  340. package/dist/types/platform-digest.d.ts +228 -0
  341. package/dist/types/platform-digest.d.ts.map +1 -0
  342. package/dist/types/platform-digest.js +5 -0
  343. package/dist/types/platform-digest.js.map +1 -0
  344. package/dist/types/telemetry-digest.d.ts +2 -0
  345. package/dist/types/telemetry-digest.d.ts.map +1 -1
  346. package/dist/utils/ensure-project.d.ts +1 -0
  347. package/dist/utils/ensure-project.d.ts.map +1 -1
  348. package/dist/utils/ensure-project.js +19 -7
  349. package/dist/utils/ensure-project.js.map +1 -1
  350. package/dist/utils/jfl-config.d.ts +1 -0
  351. package/dist/utils/jfl-config.d.ts.map +1 -1
  352. package/dist/utils/jfl-config.js +19 -1
  353. package/dist/utils/jfl-config.js.map +1 -1
  354. package/dist/utils/jfl-paths.d.ts +5 -0
  355. package/dist/utils/jfl-paths.d.ts.map +1 -1
  356. package/dist/utils/jfl-paths.js +25 -3
  357. package/dist/utils/jfl-paths.js.map +1 -1
  358. package/package.json +3 -2
  359. package/packages/pi/AGENTS.md +112 -0
  360. package/packages/pi/extensions/agent-grid.ts +191 -0
  361. package/packages/pi/extensions/agent-names.ts +178 -0
  362. package/packages/pi/extensions/autoresearch.ts +427 -0
  363. package/packages/pi/extensions/bookmarks.ts +85 -0
  364. package/packages/pi/extensions/context.ts +184 -0
  365. package/packages/pi/extensions/crm-tool.ts +61 -0
  366. package/packages/pi/extensions/eval-tool.ts +224 -0
  367. package/packages/pi/extensions/eval.ts +60 -0
  368. package/packages/pi/extensions/footer.ts +239 -0
  369. package/packages/pi/extensions/hub-resolver.ts +63 -0
  370. package/packages/pi/extensions/hud-tool.ts +145 -0
  371. package/packages/pi/extensions/index.ts +405 -0
  372. package/packages/pi/extensions/journal.ts +224 -0
  373. package/packages/pi/extensions/map-bridge.ts +178 -0
  374. package/packages/pi/extensions/memory-tool.ts +73 -0
  375. package/packages/pi/extensions/notifications.ts +73 -0
  376. package/packages/pi/extensions/peter-parker.ts +202 -0
  377. package/packages/pi/extensions/policy-head-tool.ts +276 -0
  378. package/packages/pi/extensions/portfolio-bridge.ts +90 -0
  379. package/packages/pi/extensions/session.ts +142 -0
  380. package/packages/pi/extensions/shortcuts.ts +259 -0
  381. package/packages/pi/extensions/stratus-bridge.ts +115 -0
  382. package/packages/pi/extensions/synopsis-tool.ts +83 -0
  383. package/packages/pi/extensions/tool-renderers.ts +353 -0
  384. package/packages/pi/extensions/training-buffer-tool.ts +368 -0
  385. package/packages/pi/extensions/types.ts +163 -0
  386. package/packages/pi/package-lock.json +346 -0
  387. package/packages/pi/package.json +44 -0
  388. package/packages/pi/skills/agent-browser/SKILL.md +116 -0
  389. package/packages/pi/skills/brand-architect/SKILL.md +240 -0
  390. package/packages/pi/skills/brand-architect/config.yaml +137 -0
  391. package/packages/pi/skills/campaign-hud/config.yaml +112 -0
  392. package/packages/pi/skills/content-creator/SKILL.md +294 -0
  393. package/packages/pi/skills/context/SKILL.md +65 -0
  394. package/packages/pi/skills/debug/MULTI_AGENT.md +360 -0
  395. package/packages/pi/skills/debug/SKILL.md +554 -0
  396. package/packages/pi/skills/end/SKILL.md +1782 -0
  397. package/packages/pi/skills/eval/SKILL.md +75 -0
  398. package/packages/pi/skills/fly-deploy/SKILL.md +676 -0
  399. package/packages/pi/skills/founder-video/SKILL.md +467 -0
  400. package/packages/pi/skills/hud/SKILL.md +160 -0
  401. package/packages/pi/skills/orchestrate/SKILL.md +74 -0
  402. package/packages/pi/skills/pi-agents/SKILL.md +78 -0
  403. package/packages/pi/skills/react-best-practices/AGENTS.md +2249 -0
  404. package/packages/pi/skills/react-best-practices/README.md +123 -0
  405. package/packages/pi/skills/react-best-practices/SKILL.md +125 -0
  406. package/packages/pi/skills/react-best-practices/metadata.json +15 -0
  407. package/packages/pi/skills/react-best-practices/rules/_sections.md +46 -0
  408. package/packages/pi/skills/react-best-practices/rules/_template.md +28 -0
  409. package/packages/pi/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  410. package/packages/pi/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
  411. package/packages/pi/skills/react-best-practices/rules/async-api-routes.md +38 -0
  412. package/packages/pi/skills/react-best-practices/rules/async-defer-await.md +80 -0
  413. package/packages/pi/skills/react-best-practices/rules/async-dependencies.md +36 -0
  414. package/packages/pi/skills/react-best-practices/rules/async-parallel.md +28 -0
  415. package/packages/pi/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  416. package/packages/pi/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  417. package/packages/pi/skills/react-best-practices/rules/bundle-conditional.md +31 -0
  418. package/packages/pi/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  419. package/packages/pi/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  420. package/packages/pi/skills/react-best-practices/rules/bundle-preload.md +50 -0
  421. package/packages/pi/skills/react-best-practices/rules/client-event-listeners.md +74 -0
  422. package/packages/pi/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
  423. package/packages/pi/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
  424. package/packages/pi/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
  425. package/packages/pi/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
  426. package/packages/pi/skills/react-best-practices/rules/js-cache-storage.md +70 -0
  427. package/packages/pi/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
  428. package/packages/pi/skills/react-best-practices/rules/js-early-exit.md +50 -0
  429. package/packages/pi/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
  430. package/packages/pi/skills/react-best-practices/rules/js-index-maps.md +37 -0
  431. package/packages/pi/skills/react-best-practices/rules/js-length-check-first.md +49 -0
  432. package/packages/pi/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
  433. package/packages/pi/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
  434. package/packages/pi/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  435. package/packages/pi/skills/react-best-practices/rules/rendering-activity.md +26 -0
  436. package/packages/pi/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  437. package/packages/pi/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
  438. package/packages/pi/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
  439. package/packages/pi/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  440. package/packages/pi/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  441. package/packages/pi/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
  442. package/packages/pi/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
  443. package/packages/pi/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
  444. package/packages/pi/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
  445. package/packages/pi/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  446. package/packages/pi/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  447. package/packages/pi/skills/react-best-practices/rules/rerender-memo.md +44 -0
  448. package/packages/pi/skills/react-best-practices/rules/rerender-transitions.md +40 -0
  449. package/packages/pi/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
  450. package/packages/pi/skills/react-best-practices/rules/server-cache-lru.md +41 -0
  451. package/packages/pi/skills/react-best-practices/rules/server-cache-react.md +26 -0
  452. package/packages/pi/skills/react-best-practices/rules/server-parallel-fetching.md +79 -0
  453. package/packages/pi/skills/react-best-practices/rules/server-serialization.md +38 -0
  454. package/packages/pi/skills/remotion-best-practices/SKILL.md +43 -0
  455. package/packages/pi/skills/remotion-best-practices/rules/3d.md +86 -0
  456. package/packages/pi/skills/remotion-best-practices/rules/animations.md +29 -0
  457. package/packages/pi/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
  458. package/packages/pi/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
  459. package/packages/pi/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +108 -0
  460. package/packages/pi/skills/remotion-best-practices/rules/assets.md +78 -0
  461. package/packages/pi/skills/remotion-best-practices/rules/audio.md +172 -0
  462. package/packages/pi/skills/remotion-best-practices/rules/calculate-metadata.md +104 -0
  463. package/packages/pi/skills/remotion-best-practices/rules/can-decode.md +75 -0
  464. package/packages/pi/skills/remotion-best-practices/rules/charts.md +58 -0
  465. package/packages/pi/skills/remotion-best-practices/rules/compositions.md +146 -0
  466. package/packages/pi/skills/remotion-best-practices/rules/display-captions.md +126 -0
  467. package/packages/pi/skills/remotion-best-practices/rules/extract-frames.md +229 -0
  468. package/packages/pi/skills/remotion-best-practices/rules/fonts.md +152 -0
  469. package/packages/pi/skills/remotion-best-practices/rules/get-audio-duration.md +58 -0
  470. package/packages/pi/skills/remotion-best-practices/rules/get-video-dimensions.md +68 -0
  471. package/packages/pi/skills/remotion-best-practices/rules/get-video-duration.md +58 -0
  472. package/packages/pi/skills/remotion-best-practices/rules/gifs.md +138 -0
  473. package/packages/pi/skills/remotion-best-practices/rules/images.md +130 -0
  474. package/packages/pi/skills/remotion-best-practices/rules/import-srt-captions.md +67 -0
  475. package/packages/pi/skills/remotion-best-practices/rules/lottie.md +68 -0
  476. package/packages/pi/skills/remotion-best-practices/rules/measuring-dom-nodes.md +35 -0
  477. package/packages/pi/skills/remotion-best-practices/rules/measuring-text.md +143 -0
  478. package/packages/pi/skills/remotion-best-practices/rules/sequencing.md +106 -0
  479. package/packages/pi/skills/remotion-best-practices/rules/tailwind.md +11 -0
  480. package/packages/pi/skills/remotion-best-practices/rules/text-animations.md +20 -0
  481. package/packages/pi/skills/remotion-best-practices/rules/timing.md +179 -0
  482. package/packages/pi/skills/remotion-best-practices/rules/transcribe-captions.md +19 -0
  483. package/packages/pi/skills/remotion-best-practices/rules/transitions.md +122 -0
  484. package/packages/pi/skills/remotion-best-practices/rules/trimming.md +53 -0
  485. package/packages/pi/skills/remotion-best-practices/rules/videos.md +171 -0
  486. package/packages/pi/skills/search/SKILL.md +220 -0
  487. package/packages/pi/skills/spec/SKILL.md +377 -0
  488. package/packages/pi/skills/startup/SKILL.md +315 -0
  489. package/packages/pi/skills/web-architect/SKILL.md +309 -0
  490. package/packages/pi/skills/x-algorithm/SKILL.md +305 -0
  491. package/packages/pi/teams/dev-team.yaml +63 -0
  492. package/packages/pi/teams/gtm-team.yaml +79 -0
  493. package/packages/pi/themes/jfl.theme.json +76 -0
  494. package/packages/pi/tsconfig.json +21 -0
  495. package/scripts/collect-tuples.sh +124 -0
  496. package/scripts/destroy-fleet.sh +37 -0
  497. package/scripts/jfl-ide.sh +48 -0
  498. package/scripts/session/session-cleanup.sh +4 -11
  499. package/scripts/session/session-init.sh +6 -0
  500. package/scripts/session/session-sync.sh +25 -0
  501. package/scripts/setup-branch-protection.sh +106 -0
  502. package/scripts/spawn-fleet.sh +144 -0
  503. package/scripts/train/requirements.txt +5 -0
  504. package/scripts/train/train-policy-head.py +477 -0
  505. package/scripts/train/v2/dataset.py +81 -0
  506. package/scripts/train/v2/domain.json +18 -0
  507. package/scripts/train/v2/eval.py +196 -0
  508. package/scripts/train/v2/generate_data.py +219 -0
  509. package/scripts/train/v2/infer.py +188 -0
  510. package/scripts/train/v2/model.py +112 -0
  511. package/scripts/train/v2/precompute.py +132 -0
  512. package/scripts/train/v2/train.py +302 -0
  513. package/scripts/train/v2/transform_buffer.py +227 -0
  514. package/scripts/train/v2/validate_data.py +115 -0
  515. package/scripts/train-policy-head.py +434 -0
  516. package/scripts/vm-swarm/README.md +301 -0
  517. package/scripts/vm-swarm/collect-tuples.sh +331 -0
  518. package/scripts/vm-swarm/create-base-template.sh +339 -0
  519. package/scripts/vm-swarm/kill-fleet.sh +204 -0
  520. package/scripts/vm-swarm/monitor-fleet.sh +346 -0
  521. package/scripts/vm-swarm/spawn-fleet.sh +304 -0
  522. package/template/.claude/settings.json +2 -15
  523. package/template/.github/workflows/jfl-eval.yml +6 -1
  524. package/template/.github/workflows/jfl-review.yml +4 -0
  525. package/template/scripts/session/session-cleanup.sh +2 -11
  526. package/template/scripts/session/session-end-hub.sh +72 -0
  527. package/template/scripts/session/session-end.sh +69 -6
  528. package/template/scripts/session/session-init.sh +55 -30
  529. package/template/scripts/session/session-lock.sh +464 -0
  530. package/template/scripts/session/session-start-hub.sh +105 -0
  531. package/template/templates/service-agent/workflows/jfl-eval.yml +19 -0
  532. package/dist/dashboard-static/assets/index-B6kRK9Rq.js +0 -116
  533. package/dist/dashboard-static/assets/index-BpdKJPLu.css +0 -1
@@ -0,0 +1,554 @@
1
+ ---
2
+ name: debug
3
+ description: Reverse engineering and dynamic analysis using industry-standard tools — CTF, security research, malware analysis, binary behavior
4
+ ---
5
+
6
+ # Debug Skill
7
+
8
+ Reverse engineering and dynamic analysis using industry-standard tools. For CTF, security research, malware analysis, and understanding binary behavior.
9
+
10
+ ---
11
+
12
+ ## Philosophy
13
+
14
+ **Understand before patching.** The goal is comprehension, not just getting past a check.
15
+
16
+ **Static + Dynamic = Complete picture.** Ghidra shows structure, Frida shows runtime.
17
+
18
+ **Cross-verify everything.** Use multiple tools to confirm findings.
19
+
20
+ ---
21
+
22
+ ## Commands
23
+
24
+ ```
25
+ /debug # Overview of available tools and workflows
26
+ /debug setup [tool] # Setup guide for specific tool
27
+ /debug ghidra [target] # Static analysis workflow
28
+ /debug frida [target] # Dynamic instrumentation workflow
29
+ /debug windbg [target] # Windows debugging workflow
30
+ /debug binja [target] # Binary Ninja workflow
31
+ /debug ctf [challenge] # CTF-specific approach
32
+ /debug malware [sample] # Malware analysis workflow
33
+ /debug compare [a] [b] # Cross-tool comparison
34
+ /debug hook [function] # Generate Frida hook template
35
+ /debug decompile [function] # Decompilation tips
36
+ ```
37
+
38
+ ---
39
+
40
+ ## THE TOOLS
41
+
42
+ ### Ghidra (Static Analysis)
43
+
44
+ **What it is:** NSA's free reverse engineering suite. Decompiler, disassembler, scripting.
45
+
46
+ **When to use:**
47
+ - Initial triage of unknown binary
48
+ - Understanding program structure
49
+ - Finding interesting functions
50
+ - Patching binaries
51
+
52
+ **Setup:**
53
+ ```bash
54
+ # macOS
55
+ brew install --cask ghidra
56
+
57
+ # Linux
58
+ wget https://github.com/NationalSecurityAgency/ghidra/releases/latest
59
+ unzip ghidra_*.zip
60
+ ./ghidraRun
61
+
62
+ # Requires Java 17+
63
+ java --version
64
+ ```
65
+
66
+ **Key shortcuts:**
67
+ | Key | Action |
68
+ |-----|--------|
69
+ | `G` | Go to address |
70
+ | `L` | Rename label/function |
71
+ | `T` | Change type |
72
+ | `D` | Disassemble |
73
+ | `;` | Add comment |
74
+ | `Ctrl+Shift+E` | Open decompiler |
75
+ | `X` | Show xrefs |
76
+ | `/` | Search |
77
+
78
+ **Workflow:**
79
+ 1. Create new project
80
+ 2. Import binary (File → Import)
81
+ 3. Analyze (Yes to all, be patient)
82
+ 4. Start in `main` or entry point
83
+ 5. Rename functions as you understand them
84
+ 6. Follow cross-references to understand flow
85
+
86
+ **Ghidra Python scripting:**
87
+ ```python
88
+ # List all functions
89
+ from ghidra.program.model.listing import Function
90
+ fm = currentProgram.getFunctionManager()
91
+ for func in fm.getFunctions(True):
92
+ print(f"{func.getName()} @ {func.getEntryPoint()}")
93
+
94
+ # Find strings containing "password"
95
+ from ghidra.program.util import DefinedDataIterator
96
+ for data in DefinedDataIterator.definedStrings(currentProgram):
97
+ if "password" in str(data.getValue()).lower():
98
+ print(f"{data.getAddress()}: {data.getValue()}")
99
+ ```
100
+
101
+ ---
102
+
103
+ ### Frida (Dynamic Instrumentation)
104
+
105
+ **What it is:** Dynamic instrumentation toolkit. Hook functions, trace calls, modify behavior at runtime.
106
+
107
+ **When to use:**
108
+ - Runtime behavior analysis
109
+ - Bypassing checks
110
+ - Tracing function calls
111
+ - Understanding crypto/encoding
112
+ - Mobile app analysis (iOS/Android)
113
+
114
+ **Setup:**
115
+ ```bash
116
+ # Install Frida
117
+ pip install frida-tools
118
+
119
+ # For iOS/Android
120
+ # Device needs frida-server running
121
+ frida-ps -U # List processes on USB device
122
+ ```
123
+
124
+ **Basic hooks:**
125
+ ```javascript
126
+ // Hook a function and log arguments
127
+ Interceptor.attach(Module.findExportByName(null, "strcmp"), {
128
+ onEnter: function(args) {
129
+ console.log("strcmp called:");
130
+ console.log(" arg0: " + Memory.readUtf8String(args[0]));
131
+ console.log(" arg1: " + Memory.readUtf8String(args[1]));
132
+ },
133
+ onLeave: function(retval) {
134
+ console.log(" return: " + retval);
135
+ }
136
+ });
137
+
138
+ // Hook by address (Ghidra tells you the address)
139
+ var baseAddr = Module.findBaseAddress("target");
140
+ var funcAddr = baseAddr.add(0x1234); // offset from Ghidra
141
+
142
+ Interceptor.attach(funcAddr, {
143
+ onEnter: function(args) {
144
+ console.log("Custom function called");
145
+ console.log(" arg0: " + args[0]);
146
+ console.log(" arg1: " + args[1]);
147
+ }
148
+ });
149
+
150
+ // Replace return value
151
+ Interceptor.attach(Module.findExportByName(null, "isLicensed"), {
152
+ onLeave: function(retval) {
153
+ retval.replace(1); // Always return true
154
+ }
155
+ });
156
+ ```
157
+
158
+ **Running Frida:**
159
+ ```bash
160
+ # Attach to running process
161
+ frida -p <pid> -l script.js
162
+
163
+ # Spawn and attach
164
+ frida -f ./target -l script.js --no-pause
165
+
166
+ # On device (iOS/Android)
167
+ frida -U -f com.example.app -l script.js --no-pause
168
+ ```
169
+
170
+ **Common patterns:**
171
+ ```javascript
172
+ // Trace all calls to a module
173
+ var module = Process.findModuleByName("libcrypto.so");
174
+ Interceptor.attach(module.base.add(0x1000), {
175
+ onEnter: function() {
176
+ console.log("Called from: " + Thread.backtrace(this.context, Backtracer.ACCURATE)
177
+ .map(DebugSymbol.fromAddress).join("\n"));
178
+ }
179
+ });
180
+
181
+ // Dump memory
182
+ var buf = Memory.readByteArray(ptr("0x12345678"), 256);
183
+ console.log(hexdump(buf, { offset: 0, length: 256, header: true, ansi: true }));
184
+
185
+ // Find pattern in memory
186
+ var pattern = "48 89 5C 24 08";
187
+ var matches = Memory.scan(module.base, module.size, pattern, {
188
+ onMatch: function(address, size) {
189
+ console.log("Found at: " + address);
190
+ }
191
+ });
192
+ ```
193
+
194
+ ---
195
+
196
+ ### WinDbg (Windows Debugging)
197
+
198
+ **What it is:** Microsoft's debugger for Windows. Kernel and user-mode debugging.
199
+
200
+ **When to use:**
201
+ - Windows binary debugging
202
+ - Crash dump analysis
203
+ - Kernel debugging
204
+ - Driver analysis
205
+
206
+ **Setup:**
207
+ ```
208
+ # Install from Microsoft Store or winget
209
+ winget install Microsoft.WinDbg
210
+
211
+ # Or download from:
212
+ # https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/
213
+ ```
214
+
215
+ **Key commands:**
216
+ | Command | Action |
217
+ |---------|--------|
218
+ | `g` | Go (continue) |
219
+ | `p` | Step over |
220
+ | `t` | Step into |
221
+ | `bp <addr>` | Set breakpoint |
222
+ | `bl` | List breakpoints |
223
+ | `bc *` | Clear all breakpoints |
224
+ | `k` | Stack trace |
225
+ | `r` | Show registers |
226
+ | `dd <addr>` | Display dwords |
227
+ | `db <addr>` | Display bytes |
228
+ | `da <addr>` | Display ASCII |
229
+ | `du <addr>` | Display Unicode |
230
+ | `dps <addr>` | Display with symbols |
231
+ | `lm` | List modules |
232
+ | `x module!*pattern*` | Search symbols |
233
+ | `!analyze -v` | Analyze crash |
234
+
235
+ **Workflow:**
236
+ ```
237
+ # Attach to process
238
+ .attach <pid>
239
+
240
+ # Open executable
241
+ .open <path>
242
+
243
+ # Set breakpoint on function
244
+ bp kernel32!CreateFileW
245
+
246
+ # Set conditional breakpoint
247
+ bp kernel32!CreateFileW ".if (poi(esp+4)==0x12345678) {} .else {gc}"
248
+
249
+ # Log without breaking
250
+ bp kernel32!CreateFileW ".printf \"CreateFile: %mu\\n\", poi(esp+4); gc"
251
+
252
+ # Break on module load
253
+ sxe ld:target.dll
254
+ ```
255
+
256
+ **Extension commands:**
257
+ ```
258
+ # Load SOS for .NET
259
+ .loadby sos clr
260
+
261
+ # Dump heap
262
+ !dumpheap -stat
263
+
264
+ # Find objects
265
+ !dumpheap -type System.String
266
+
267
+ # Dump object
268
+ !dumpobj <addr>
269
+ ```
270
+
271
+ ---
272
+
273
+ ### Binary Ninja (binja)
274
+
275
+ **What it is:** Commercial reverse engineering platform. Fast, scriptable, good UI.
276
+
277
+ **When to use:**
278
+ - When Ghidra is too slow
279
+ - Complex type recovery
280
+ - IL-based analysis
281
+ - Custom architectures
282
+
283
+ **Setup:**
284
+ ```bash
285
+ # Commercial license required
286
+ # Download from: https://binary.ninja/
287
+
288
+ # Python API
289
+ pip install binaryninja
290
+ ```
291
+
292
+ **Key features:**
293
+ - HLIL/MLIL/LLIL (high/medium/low level IL)
294
+ - Type propagation
295
+ - Data flow analysis
296
+ - Collaboration features
297
+
298
+ **Python API:**
299
+ ```python
300
+ import binaryninja as bn
301
+
302
+ # Open binary
303
+ bv = bn.open_view("/path/to/binary")
304
+
305
+ # List functions
306
+ for func in bv.functions:
307
+ print(f"{func.name} @ {hex(func.start)}")
308
+
309
+ # Get HLIL
310
+ for func in bv.functions:
311
+ if func.name == "main":
312
+ for line in func.hlil:
313
+ print(line)
314
+
315
+ # Find strings
316
+ for string in bv.strings:
317
+ if "password" in string.value.lower():
318
+ print(f"{hex(string.start)}: {string.value}")
319
+
320
+ # Cross-references
321
+ func = bv.get_function_at(0x401000)
322
+ for ref in bv.get_code_refs(func.start):
323
+ print(f"Called from: {hex(ref.address)}")
324
+ ```
325
+
326
+ ---
327
+
328
+ ## WORKFLOWS
329
+
330
+ ### CTF Binary Exploitation
331
+
332
+ ```
333
+ 1. File analysis
334
+ file ./challenge
335
+ checksec ./challenge
336
+
337
+ 2. Static analysis (Ghidra)
338
+ - Find main
339
+ - Identify vulnerability (buffer overflow, format string, etc.)
340
+ - Note key addresses
341
+
342
+ 3. Dynamic analysis (Frida/GDB)
343
+ - Verify assumptions
344
+ - Find exact offsets
345
+ - Test exploit
346
+
347
+ 4. Exploit development
348
+ - Write payload
349
+ - Test locally
350
+ - Adjust for remote
351
+ ```
352
+
353
+ ### Malware Analysis (Isolated Environment)
354
+
355
+ ```
356
+ 1. Initial triage
357
+ - Hashes (md5, sha256)
358
+ - Strings
359
+ - Imports
360
+ - PE/ELF structure
361
+
362
+ 2. Static analysis (Ghidra)
363
+ - Entry point behavior
364
+ - Anti-analysis tricks
365
+ - Config extraction
366
+ - C2 identification
367
+
368
+ 3. Dynamic analysis (isolated VM)
369
+ - Network behavior
370
+ - File system changes
371
+ - Registry changes
372
+ - Process behavior
373
+
374
+ 4. Documentation
375
+ - IOCs
376
+ - Behavior summary
377
+ - Detection rules
378
+ ```
379
+
380
+ ### Mobile App Analysis
381
+
382
+ ```
383
+ 1. Extract APK/IPA
384
+ adb pull /data/app/com.example.app/base.apk
385
+ # or use frida-ios-dump for iOS
386
+
387
+ 2. Static analysis
388
+ - jadx for Java decompilation
389
+ - Ghidra for native libs
390
+
391
+ 3. Dynamic analysis (Frida)
392
+ - Hook SSL pinning bypass
393
+ - Trace API calls
394
+ - Dump runtime secrets
395
+
396
+ 4. Common bypasses
397
+ - Root/jailbreak detection
398
+ - SSL pinning
399
+ - Integrity checks
400
+ ```
401
+
402
+ ---
403
+
404
+ ## CROSS-TOOL INTEGRATION
405
+
406
+ ### Ghidra → Frida
407
+
408
+ ```python
409
+ # Export function addresses from Ghidra
410
+ # Run as Ghidra script
411
+ fm = currentProgram.getFunctionManager()
412
+ with open("/tmp/functions.txt", "w") as f:
413
+ for func in fm.getFunctions(True):
414
+ f.write(f"{func.getEntryPoint()},{func.getName()}\n")
415
+ ```
416
+
417
+ ```javascript
418
+ // Import into Frida
419
+ var funcs = {};
420
+ // Load from file or paste
421
+ funcs["0x401000"] = "check_license";
422
+ funcs["0x401100"] = "decrypt_config";
423
+
424
+ for (var addr in funcs) {
425
+ Interceptor.attach(ptr(addr), {
426
+ onEnter: function(args) {
427
+ console.log(funcs[this.context.pc] + " called");
428
+ }
429
+ });
430
+ }
431
+ ```
432
+
433
+ ### Binary Ninja → Frida
434
+
435
+ ```python
436
+ # Export from binja
437
+ import binaryninja as bn
438
+ import json
439
+
440
+ bv = bn.open_view("./target")
441
+ hooks = {}
442
+
443
+ for func in bv.functions:
444
+ if not func.name.startswith("sub_"):
445
+ hooks[hex(func.start)] = func.name
446
+
447
+ with open("hooks.json", "w") as f:
448
+ json.dump(hooks, f)
449
+ ```
450
+
451
+ ---
452
+
453
+ ## QUICK REFERENCE
454
+
455
+ ### File Analysis
456
+ ```bash
457
+ file ./target # File type
458
+ strings ./target | less # Readable strings
459
+ strings -el ./target # Little-endian 16-bit
460
+ objdump -d ./target | less # Disassembly
461
+ readelf -a ./target # ELF info
462
+ nm ./target # Symbols
463
+ ldd ./target # Shared libraries
464
+ checksec ./target # Security features (pwntools)
465
+ ```
466
+
467
+ ### Memory Layouts
468
+ ```
469
+ x86-64 Registers:
470
+ RAX, RBX, RCX, RDX - General purpose
471
+ RSI, RDI - Source/Destination index (args 2, 1)
472
+ RSP - Stack pointer
473
+ RBP - Base pointer
474
+ RIP - Instruction pointer
475
+ R8-R15 - Additional general purpose
476
+
477
+ x86-64 Calling Convention (System V):
478
+ Args: RDI, RSI, RDX, RCX, R8, R9, then stack
479
+ Return: RAX
480
+
481
+ Windows x64:
482
+ Args: RCX, RDX, R8, R9, then stack
483
+ Return: RAX
484
+ ```
485
+
486
+ ### Common Vulnerability Patterns
487
+
488
+ | Pattern | Ghidra Indicator | Frida Hook |
489
+ |---------|-----------------|------------|
490
+ | Buffer overflow | `strcpy`, `gets`, `sprintf` | Hook and log sizes |
491
+ | Format string | `printf(user_input)` | Hook printf, check args |
492
+ | Integer overflow | Arithmetic before allocation | Hook malloc, trace size |
493
+ | Use-after-free | free() then dereference | Hook free/malloc, track |
494
+ | Command injection | `system()`, `exec()` | Hook and log commands |
495
+
496
+ ---
497
+
498
+ ## MULTI-AGENT DEBUGGING
499
+
500
+ When debugging complex issues, use multiple agents:
501
+
502
+ ```
503
+ Agent 1: Static Analysis (Ghidra)
504
+ - Map program structure
505
+ - Identify key functions
506
+ - Document findings
507
+
508
+ Agent 2: Dynamic Analysis (Frida)
509
+ - Trace runtime behavior
510
+ - Hook identified functions
511
+ - Capture actual values
512
+
513
+ Agent 3: Cross-verification
514
+ - Compare static vs dynamic findings
515
+ - Identify discrepancies
516
+ - Validate hypotheses
517
+
518
+ Agent 4: Exploit/Fix Development
519
+ - Use verified findings
520
+ - Develop solution
521
+ - Test and iterate
522
+ ```
523
+
524
+ ---
525
+
526
+ ## OUTPUT FILES
527
+
528
+ ```
529
+ outputs/debug/
530
+ ├── analysis/
531
+ │ └── {target}-analysis-{date}.md
532
+ ├── hooks/
533
+ │ └── {target}-hooks.js
534
+ ├── scripts/
535
+ │ └── {target}-ghidra.py
536
+ └── findings/
537
+ └── {target}-findings.md
538
+ ```
539
+
540
+ ---
541
+
542
+ ## RESOURCES
543
+
544
+ - **Ghidra:** ghidra-sre.org, ghidra.re (community)
545
+ - **Frida:** frida.re/docs
546
+ - **WinDbg:** docs.microsoft.com/windows-hardware/drivers/debugger
547
+ - **Binary Ninja:** docs.binary.ninja
548
+ - **CTF resources:** ctftime.org, pwnable.kr, exploit.education
549
+
550
+ ---
551
+
552
+ *"The best debugger is a good understanding of the code."* — Unknown
553
+
554
+ *"Reverse engineering is not about finding vulnerabilities. It's about understanding systems."* — Also Unknown