lazycodex-ai 5.1.62 → 5.1.64

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 (276) hide show
  1. package/dist/cli/index.js +1598 -284
  2. package/dist/cli/service-auth/closed-device-login.fixture.d.ts +1 -0
  3. package/dist/cli/service-auth/credential-lock.d.ts +8 -2
  4. package/dist/cli/service-auth/keychain-helper/access.d.ts +27 -0
  5. package/dist/cli/service-auth/keychain-helper/approval-cache.d.ts +51 -0
  6. package/dist/cli/service-auth/keychain-helper/client.d.ts +68 -0
  7. package/dist/cli/service-auth/keychain-helper/creator-handoff.d.ts +31 -0
  8. package/dist/cli/service-auth/keychain-helper/darwin-backend.d.ts +75 -0
  9. package/dist/cli/service-auth/keychain-helper/darwin-read.d.ts +46 -0
  10. package/dist/cli/service-auth/keychain-helper/darwin-store.d.ts +28 -0
  11. package/dist/cli/service-auth/keychain-helper/fake-keychain.test-support.d.ts +85 -0
  12. package/dist/cli/service-auth/keychain-helper/location.d.ts +28 -0
  13. package/dist/cli/service-auth/keychain-helper/migration.d.ts +20 -0
  14. package/dist/cli/service-auth/keychain-helper/owner-marker.d.ts +7 -0
  15. package/dist/cli/service-auth/keychain-helper/pin.d.ts +20 -0
  16. package/dist/cli/service-auth/keychain-helper/process-copy.test-support.d.ts +3 -0
  17. package/dist/cli/service-auth/keychain-helper/process-state.d.ts +19 -0
  18. package/dist/cli/service-auth/keychain-helper/prompt-lock.d.ts +14 -0
  19. package/dist/cli/service-auth/keychain-helper/recovery.d.ts +34 -0
  20. package/dist/cli/service-auth/keychain-helper/runtime-capabilities.d.ts +13 -0
  21. package/dist/cli/service-auth/keychain-helper/secrets-gate.d.ts +4 -0
  22. package/dist/cli/service-auth/keychain-helper/signature.d.ts +17 -0
  23. package/dist/cli/service-auth/keychain-helper/store-binding.d.ts +46 -0
  24. package/dist/cli/service-auth/keystore.d.ts +18 -3
  25. package/dist/cli/service-auth/session.d.ts +2 -2
  26. package/dist/cli-node/index.js +1598 -284
  27. package/package.json +1 -1
  28. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  29. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  30. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  31. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  32. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  33. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  34. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  35. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  36. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  37. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  38. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  39. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  40. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  41. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  42. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  43. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  44. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  45. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  46. package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +2 -0
  47. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  48. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  49. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +1 -1
  50. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +2 -2
  51. package/packages/omo-codex/plugin/components/ultrawork/src/directive-content.ts +1 -1
  52. package/packages/omo-codex/plugin/components/ulw-execute-continuation/directive.md +1 -1
  53. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
  54. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  55. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +2 -0
  56. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
  57. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  58. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +1 -1
  59. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/define-goal.md +1 -1
  60. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +10 -10
  61. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  62. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  63. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  64. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  65. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  66. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  67. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  68. package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
  69. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  70. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  71. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  72. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  73. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  74. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  75. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  76. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  77. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  78. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  79. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  80. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  81. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  82. package/packages/omo-codex/plugin/package-lock.json +12 -12
  83. package/packages/omo-codex/plugin/package.json +1 -1
  84. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +6 -3
  85. package/packages/omo-codex/plugin/skills/ast-grep/AGENTS.md +2 -2
  86. package/packages/omo-codex/plugin/skills/ast-grep/README.md +4 -4
  87. package/packages/omo-codex/plugin/skills/ast-grep/SKILL.md +10 -8
  88. package/packages/omo-codex/plugin/skills/ast-grep/references/cli.md +4 -3
  89. package/packages/omo-codex/plugin/skills/ast-grep/references/patterns.md +5 -5
  90. package/packages/omo-codex/plugin/skills/ast-grep/references/pitfalls.md +3 -3
  91. package/packages/omo-codex/plugin/skills/ast-grep/references/recipes.md +6 -4
  92. package/packages/omo-codex/plugin/skills/ast-grep/references/yaml-rules.md +3 -3
  93. package/packages/omo-codex/plugin/skills/ast-grep/scripts/ast_grep_helper.py +3 -3
  94. package/packages/omo-codex/plugin/skills/browser/SKILL.md +2 -3
  95. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +1 -1
  96. package/packages/omo-codex/plugin/skills/coding-agent-sessions/AGENTS.md +1 -1
  97. package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +2 -1
  98. package/packages/omo-codex/plugin/skills/data-scientist/SKILL.md +8 -6
  99. package/packages/omo-codex/plugin/skills/data-scientist/references/placement.md +9 -5
  100. package/packages/omo-codex/plugin/skills/data-scientist/references/uv-setup.md +3 -3
  101. package/packages/omo-codex/plugin/skills/data-scientist/references/visualization.md +19 -4
  102. package/packages/omo-codex/plugin/skills/debugging/SKILL.md +5 -5
  103. package/packages/omo-codex/plugin/skills/debugging/references/methodology/02-investigate.md +2 -2
  104. package/packages/omo-codex/plugin/skills/debugging/references/methodology/06-fix.md +2 -0
  105. package/packages/omo-codex/plugin/skills/debugging/references/methodology/09-cleanup.md +2 -2
  106. package/packages/omo-codex/plugin/skills/debugging/references/methodology/partial-runtime-evidence.md +1 -1
  107. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/bundled-js-binary.md +1 -1
  108. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/native-binary.md +1 -1
  109. package/packages/omo-codex/plugin/skills/debugging/references/tools/browser-qa.md +1 -2
  110. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +2 -2
  111. package/packages/omo-codex/plugin/skills/frontend/references/design/design-system-architecture.md +1 -1
  112. package/packages/omo-codex/plugin/skills/frontend/references/design/print-paged-media.md +1 -1
  113. package/packages/omo-codex/plugin/skills/frontend/references/perfection/README.md +0 -1
  114. package/packages/omo-codex/plugin/skills/frontend/references/perfection/react-perf-tooling.md +27 -8
  115. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/lighthouse-audit.py +0 -1
  116. package/packages/omo-codex/plugin/skills/git-master/SKILL.md +12 -2
  117. package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +1 -1
  118. package/packages/omo-codex/plugin/skills/lsp-setup/SKILL.md +24 -15
  119. package/packages/omo-codex/plugin/skills/lsp-setup/references/bash/README.md +3 -3
  120. package/packages/omo-codex/plugin/skills/lsp-setup/references/c-cpp/README.md +2 -2
  121. package/packages/omo-codex/plugin/skills/lsp-setup/references/csharp/README.md +2 -2
  122. package/packages/omo-codex/plugin/skills/lsp-setup/references/dart/README.md +2 -2
  123. package/packages/omo-codex/plugin/skills/lsp-setup/references/elixir/README.md +2 -2
  124. package/packages/omo-codex/plugin/skills/lsp-setup/references/go/README.md +2 -2
  125. package/packages/omo-codex/plugin/skills/lsp-setup/references/haskell/README.md +2 -2
  126. package/packages/omo-codex/plugin/skills/lsp-setup/references/java/README.md +3 -3
  127. package/packages/omo-codex/plugin/skills/lsp-setup/references/julia/README.md +3 -3
  128. package/packages/omo-codex/plugin/skills/lsp-setup/references/kotlin/README.md +4 -4
  129. package/packages/omo-codex/plugin/skills/lsp-setup/references/lua/README.md +2 -2
  130. package/packages/omo-codex/plugin/skills/lsp-setup/references/php/README.md +3 -3
  131. package/packages/omo-codex/plugin/skills/lsp-setup/references/python/README.md +13 -12
  132. package/packages/omo-codex/plugin/skills/lsp-setup/references/ruby/README.md +2 -2
  133. package/packages/omo-codex/plugin/skills/lsp-setup/references/rust/README.md +2 -2
  134. package/packages/omo-codex/plugin/skills/lsp-setup/references/swift/README.md +4 -4
  135. package/packages/omo-codex/plugin/skills/lsp-setup/references/terraform/README.md +2 -2
  136. package/packages/omo-codex/plugin/skills/lsp-setup/references/typescript/README.md +3 -3
  137. package/packages/omo-codex/plugin/skills/lsp-setup/references/yaml/README.md +2 -2
  138. package/packages/omo-codex/plugin/skills/lsp-setup/references/zig/README.md +2 -2
  139. package/packages/omo-codex/plugin/skills/lsp-setup/scripts/detect-lsp.ts +1 -1
  140. package/packages/omo-codex/plugin/skills/lsp-setup/scripts/lsp-server-table.ts +3 -2
  141. package/packages/omo-codex/plugin/skills/programming/SKILL.md +5 -5
  142. package/packages/omo-codex/plugin/skills/programming/references/code-smells.md +2 -2
  143. package/packages/omo-codex/plugin/skills/programming/references/go/README.md +3 -3
  144. package/packages/omo-codex/plugin/skills/programming/references/python/README.md +8 -8
  145. package/packages/omo-codex/plugin/skills/programming/references/python/data-processing.md +9 -9
  146. package/packages/omo-codex/plugin/skills/programming/references/rust-ub/README.md +3 -3
  147. package/packages/omo-codex/plugin/skills/programming/references/typescript/README.md +5 -5
  148. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/new-project.ts +1 -1
  149. package/packages/omo-codex/plugin/skills/refactor/SKILL.md +35 -35
  150. package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +6 -6
  151. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +2 -2
  152. package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +10 -7
  153. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/AGENTS.md +4 -4
  154. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/README.md +2 -2
  155. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/career.md +1 -1
  156. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/social.md +1 -1
  157. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/web.md +4 -4
  158. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +2 -1
  159. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/README.md +16 -17
  160. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/fallback.md +10 -6
  161. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/jina.md +12 -12
  162. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/naver.md +3 -3
  163. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/playwright.md +1 -1
  164. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/rss.md +1 -1
  165. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/tls-impersonate.md +12 -7
  166. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +2 -0
  167. package/packages/omo-codex/plugin/skills/ulw-execute/SKILL.md +9 -6
  168. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +1 -1
  169. package/packages/omo-codex/plugin/skills/ulw-loop/references/define-goal.md +1 -1
  170. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +10 -10
  171. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +1 -1
  172. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +2 -2
  173. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +2 -2
  174. package/packages/omo-codex/plugin/skills/ulw-research/references/deliverable-phase.md +5 -5
  175. package/packages/omo-codex/plugin/skills/ulw-research/references/report-visualization.md +2 -2
  176. package/packages/omo-codex/plugin/skills/ulw-research/references/research-collection.md +2 -2
  177. package/packages/omo-codex/plugin/skills/ulw-research/references/unit-rules.md +2 -2
  178. package/packages/omo-codex/plugin/skills/visual-qa/AGENTS.md +1 -1
  179. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +5 -5
  180. package/packages/omo-codex/plugin/skills/visual-qa/references/browser-setup.md +4 -2
  181. package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +2 -0
  182. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +7 -3
  183. package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
  184. package/packages/prompts-core/prompts/ultrawork/codex.md +2 -0
  185. package/packages/shared-skills/skills/ast-grep/AGENTS.md +2 -2
  186. package/packages/shared-skills/skills/ast-grep/README.md +4 -4
  187. package/packages/shared-skills/skills/ast-grep/SKILL.md +10 -8
  188. package/packages/shared-skills/skills/ast-grep/references/cli.md +4 -3
  189. package/packages/shared-skills/skills/ast-grep/references/patterns.md +5 -5
  190. package/packages/shared-skills/skills/ast-grep/references/pitfalls.md +3 -3
  191. package/packages/shared-skills/skills/ast-grep/references/recipes.md +6 -4
  192. package/packages/shared-skills/skills/ast-grep/references/yaml-rules.md +3 -3
  193. package/packages/shared-skills/skills/ast-grep/scripts/ast_grep_helper.py +3 -3
  194. package/packages/shared-skills/skills/browser/SKILL.md +2 -3
  195. package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
  196. package/packages/shared-skills/skills/coding-agent-sessions/AGENTS.md +1 -1
  197. package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +2 -1
  198. package/packages/shared-skills/skills/data-scientist/SKILL.md +8 -6
  199. package/packages/shared-skills/skills/data-scientist/references/placement.md +9 -5
  200. package/packages/shared-skills/skills/data-scientist/references/uv-setup.md +3 -3
  201. package/packages/shared-skills/skills/data-scientist/references/visualization.md +19 -4
  202. package/packages/shared-skills/skills/debugging/SKILL.md +5 -5
  203. package/packages/shared-skills/skills/debugging/references/methodology/02-investigate.md +2 -2
  204. package/packages/shared-skills/skills/debugging/references/methodology/06-fix.md +2 -0
  205. package/packages/shared-skills/skills/debugging/references/methodology/09-cleanup.md +2 -2
  206. package/packages/shared-skills/skills/debugging/references/methodology/partial-runtime-evidence.md +1 -1
  207. package/packages/shared-skills/skills/debugging/references/runtimes/bundled-js-binary.md +1 -1
  208. package/packages/shared-skills/skills/debugging/references/runtimes/native-binary.md +1 -1
  209. package/packages/shared-skills/skills/debugging/references/tools/browser-qa.md +1 -2
  210. package/packages/shared-skills/skills/frontend/SKILL.md +2 -2
  211. package/packages/shared-skills/skills/frontend/references/design/design-system-architecture.md +1 -1
  212. package/packages/shared-skills/skills/frontend/references/design/print-paged-media.md +1 -1
  213. package/packages/shared-skills/skills/frontend/references/perfection/README.md +0 -1
  214. package/packages/shared-skills/skills/frontend/references/perfection/react-perf-tooling.md +27 -8
  215. package/packages/shared-skills/skills/frontend/scripts/perfection/lighthouse-audit.py +0 -1
  216. package/packages/shared-skills/skills/git-master/SKILL.md +12 -2
  217. package/packages/shared-skills/skills/init-deep/SKILL.md +1 -1
  218. package/packages/shared-skills/skills/lsp-setup/SKILL.md +24 -15
  219. package/packages/shared-skills/skills/lsp-setup/references/bash/README.md +3 -3
  220. package/packages/shared-skills/skills/lsp-setup/references/c-cpp/README.md +2 -2
  221. package/packages/shared-skills/skills/lsp-setup/references/csharp/README.md +2 -2
  222. package/packages/shared-skills/skills/lsp-setup/references/dart/README.md +2 -2
  223. package/packages/shared-skills/skills/lsp-setup/references/elixir/README.md +2 -2
  224. package/packages/shared-skills/skills/lsp-setup/references/go/README.md +2 -2
  225. package/packages/shared-skills/skills/lsp-setup/references/haskell/README.md +2 -2
  226. package/packages/shared-skills/skills/lsp-setup/references/java/README.md +3 -3
  227. package/packages/shared-skills/skills/lsp-setup/references/julia/README.md +3 -3
  228. package/packages/shared-skills/skills/lsp-setup/references/kotlin/README.md +4 -4
  229. package/packages/shared-skills/skills/lsp-setup/references/lua/README.md +2 -2
  230. package/packages/shared-skills/skills/lsp-setup/references/php/README.md +3 -3
  231. package/packages/shared-skills/skills/lsp-setup/references/python/README.md +13 -12
  232. package/packages/shared-skills/skills/lsp-setup/references/ruby/README.md +2 -2
  233. package/packages/shared-skills/skills/lsp-setup/references/rust/README.md +2 -2
  234. package/packages/shared-skills/skills/lsp-setup/references/swift/README.md +4 -4
  235. package/packages/shared-skills/skills/lsp-setup/references/terraform/README.md +2 -2
  236. package/packages/shared-skills/skills/lsp-setup/references/typescript/README.md +3 -3
  237. package/packages/shared-skills/skills/lsp-setup/references/yaml/README.md +2 -2
  238. package/packages/shared-skills/skills/lsp-setup/references/zig/README.md +2 -2
  239. package/packages/shared-skills/skills/lsp-setup/scripts/detect-lsp.ts +1 -1
  240. package/packages/shared-skills/skills/lsp-setup/scripts/lsp-server-table.ts +3 -2
  241. package/packages/shared-skills/skills/programming/SKILL.md +5 -5
  242. package/packages/shared-skills/skills/programming/references/code-smells.md +2 -2
  243. package/packages/shared-skills/skills/programming/references/go/README.md +3 -3
  244. package/packages/shared-skills/skills/programming/references/python/README.md +8 -8
  245. package/packages/shared-skills/skills/programming/references/python/data-processing.md +9 -9
  246. package/packages/shared-skills/skills/programming/references/rust-ub/README.md +3 -3
  247. package/packages/shared-skills/skills/programming/references/typescript/README.md +5 -5
  248. package/packages/shared-skills/skills/programming/scripts/typescript/new-project.ts +1 -1
  249. package/packages/shared-skills/skills/refactor/SKILL.md +35 -35
  250. package/packages/shared-skills/skills/remove-ai-slops/SKILL.md +6 -6
  251. package/packages/shared-skills/skills/review-work/SKILL.md +2 -2
  252. package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +10 -7
  253. package/packages/shared-skills/skills/ultimate-browsing/engine/AGENTS.md +4 -4
  254. package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/README.md +2 -2
  255. package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/career.md +1 -1
  256. package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/social.md +1 -1
  257. package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/web.md +4 -4
  258. package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +2 -1
  259. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/README.md +16 -17
  260. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/fallback.md +10 -6
  261. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/jina.md +12 -12
  262. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/naver.md +3 -3
  263. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/playwright.md +1 -1
  264. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/rss.md +1 -1
  265. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/tls-impersonate.md +12 -7
  266. package/packages/shared-skills/skills/ulw-execute/SKILL.md +9 -6
  267. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +1 -1
  268. package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +2 -2
  269. package/packages/shared-skills/skills/ulw-research/SKILL.md +3 -3
  270. package/packages/shared-skills/skills/ulw-research/references/deliverable-phase.md +5 -5
  271. package/packages/shared-skills/skills/ulw-research/references/report-visualization.md +2 -2
  272. package/packages/shared-skills/skills/ulw-research/references/research-collection.md +2 -2
  273. package/packages/shared-skills/skills/ulw-research/references/unit-rules.md +2 -2
  274. package/packages/shared-skills/skills/visual-qa/AGENTS.md +1 -1
  275. package/packages/shared-skills/skills/visual-qa/SKILL.md +5 -5
  276. package/packages/shared-skills/skills/visual-qa/references/browser-setup.md +4 -2
@@ -1,3 +1,4 @@
1
+ import { type LockLease } from "@oh-my-opencode/team-core/team-state-store/locks";
1
2
  /**
2
3
  * The one per-origin lock and desktop generation record (account-transport-api v7 section 4.1). The CLI, desktop main
3
4
  * and the engine pin boundary all derive these paths here or with the same inputs; never pass a path around instead.
@@ -7,5 +8,10 @@ export declare function credentialLockPaths(api: string, home?: string): {
7
8
  readonly lock: string;
8
9
  readonly desktopRecord: string;
9
10
  };
10
- /** Writers and effect boundaries share one origin lock; nested session writes retain ownership. */
11
- export declare function withCredentialLock<T>(api: string, action: () => Promise<T>, home?: string, ownerTag?: string): Promise<T>;
11
+ /** The lease of the origin lock this async context already holds, or undefined outside that lock. */
12
+ export declare function heldCredentialLease(api: string, home?: string): LockLease | undefined;
13
+ /**
14
+ * Writers and effect boundaries share one origin lock; nested session writes retain ownership and see the outer lease,
15
+ * which the keychain helper needs to take the lock over for a mutation (#11262 design 3.6).
16
+ */
17
+ export declare function withCredentialLock<T>(api: string, action: (lease: LockLease) => Promise<T>, home?: string, ownerTag?: string): Promise<T>;
@@ -0,0 +1,27 @@
1
+ import { type HelperCall, type HelperLease, type HelperReply, type HelperSpawner } from "./client";
2
+ import { type PinResult } from "./pin";
3
+ import { type SignatureVerdict } from "./signature";
4
+ export type HelperAccess = {
5
+ readonly kind: "ready";
6
+ readonly path: string;
7
+ readonly call: (call: HelperCall, lease?: HelperLease) => Promise<HelperReply>;
8
+ } | {
9
+ readonly kind: "missing";
10
+ } | {
11
+ readonly kind: "invalid";
12
+ readonly rejected: readonly string[];
13
+ } | {
14
+ readonly kind: "unavailable";
15
+ readonly reason: string;
16
+ };
17
+ /**
18
+ * The only way the store reaches a helper process. The located copy is pinned (copied into this process's private
19
+ * directory and verified there), and the pinned copy is checked again before EVERY spawn through the process's one
20
+ * checker. So an unsigned, ad-hoc-signed or tampered file is never executed: not at resolution, not after a later
21
+ * swap at the original path (never spawned), and not after a change to the pinned copy (refused).
22
+ */
23
+ export declare function resolveHelperAccess(candidates: readonly string[], options?: {
24
+ readonly verify?: (path: string) => Promise<SignatureVerdict>;
25
+ readonly spawn?: HelperSpawner;
26
+ readonly pin?: (source: string, verify: (path: string) => Promise<SignatureVerdict>) => Promise<PinResult>;
27
+ }): Promise<HelperAccess>;
@@ -0,0 +1,51 @@
1
+ export type ItemAttributes = {
2
+ readonly cdat: number;
3
+ readonly mdat: number;
4
+ };
5
+ export type ApprovalEntry = ItemAttributes & {
6
+ readonly value: string;
7
+ readonly readStartedAt: number;
8
+ };
9
+ export type ApprovalAnswer = {
10
+ readonly kind: "approved";
11
+ readonly value: string;
12
+ readonly attributes: ItemAttributes;
13
+ } | {
14
+ readonly kind: "denied";
15
+ } | {
16
+ readonly kind: "missing";
17
+ };
18
+ export type ApprovalClock = {
19
+ readonly nowSeconds: () => number;
20
+ readonly sleepMs: (ms: number) => Promise<void>;
21
+ };
22
+ /**
23
+ * A cached `approve` answer serves a read only while `<A>` is exactly the item that answer read: equal `cdat` and `mdat`,
24
+ * and `floor(mdat) < floor(readStartedAt)` so any write after the approval read started (which lands in that second or
25
+ * later) invalidates it. A clock that went backwards since then drops the entry (design 3.5).
26
+ */
27
+ export declare function isEntryValid(entry: ApprovalEntry, current: ItemAttributes, nowSeconds: number): boolean;
28
+ export type ApprovalCache = ReturnType<typeof createApprovalCache>;
29
+ /**
30
+ * One cache per process (design 3.2 step 3; addendum rows 12, 13, 22, 23): the validated answer, the one in-flight
31
+ * `approve` every caller attaches to, and a remembered "Deny" that only background paths honor.
32
+ */
33
+ export declare function createApprovalCache(clock?: ApprovalClock): {
34
+ consume(current: ItemAttributes): string | null;
35
+ deniedForBackground: () => boolean;
36
+ /**
37
+ * Runs `approve` at most once at a time per process: later callers attach to the pending answer instead of opening a
38
+ * second dialog, and a late answer still fills the cache after a caller's bounded wait expired (3.2 step 4).
39
+ */
40
+ /** The `approve` already running in this process, which a new caller attaches to before taking any lock. */
41
+ inFlight: () => Promise<ApprovalAnswer> | null;
42
+ approve(run: () => Promise<ApprovalAnswer>): Promise<ApprovalAnswer>;
43
+ /**
44
+ * After this process wrote a non-owned item under the session lock, keep serving it: take the written value, hold
45
+ * the lock until the clock has left the write's second, then re-stamp from a fresh attribute read. Any later foreign
46
+ * write lands in a later second and fails validation (3.2 step 3, "This process's own writes keep it valid").
47
+ */
48
+ afterOwnWrite(value: string, readAttributes: () => Promise<ItemAttributes | null>): Promise<void>;
49
+ drop(): void;
50
+ };
51
+ export declare const processApprovalCache: () => ApprovalCache;
@@ -0,0 +1,68 @@
1
+ import { z } from "zod";
2
+ export type HelperVerb = "read" | "approve" | "write" | "stage" | "retire" | "promote" | "remove";
3
+ export type HelperCall = {
4
+ readonly verb: HelperVerb;
5
+ readonly account: string;
6
+ readonly value?: string;
7
+ };
8
+ declare const helperReplySchema: z.ZodObject<{
9
+ owned: z.ZodOptional<z.ZodBoolean>;
10
+ value: z.ZodOptional<z.ZodString>;
11
+ marker: z.ZodOptional<z.ZodBoolean>;
12
+ cdat: z.ZodOptional<z.ZodNumber>;
13
+ mdat: z.ZodOptional<z.ZodNumber>;
14
+ partition: z.ZodOptional<z.ZodEnum<{
15
+ none: "none";
16
+ other: "other";
17
+ ours: "ours";
18
+ unknown: "unknown";
19
+ }>>;
20
+ present: z.ZodOptional<z.ZodObject<{
21
+ staging: z.ZodBoolean;
22
+ old: z.ZodBoolean;
23
+ oldSlots: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
24
+ }, z.core.$strict>>;
25
+ missing: z.ZodOptional<z.ZodBoolean>;
26
+ recover: z.ZodOptional<z.ZodBoolean>;
27
+ ok: z.ZodOptional<z.ZodBoolean>;
28
+ created: z.ZodOptional<z.ZodBoolean>;
29
+ skipped: z.ZodOptional<z.ZodBoolean>;
30
+ slot: z.ZodOptional<z.ZodNumber>;
31
+ error: z.ZodOptional<z.ZodEnum<{
32
+ denied: "denied";
33
+ exists: "exists";
34
+ locked: "locked";
35
+ missing: "missing";
36
+ "not-owned": "not-owned";
37
+ refused: "refused";
38
+ store: "store";
39
+ }>>;
40
+ reason: z.ZodOptional<z.ZodString>;
41
+ status: z.ZodOptional<z.ZodNumber>;
42
+ }, z.core.$strict>;
43
+ export type HelperReply = z.infer<typeof helperReplySchema>;
44
+ /** The session-lock lease of team-core (`withLock`'s callback argument), narrowed to what a helper call needs. */
45
+ export type HelperLease = {
46
+ readonly handOver: (pid: number) => Promise<void>;
47
+ readonly restore: () => Promise<void>;
48
+ };
49
+ export type SpawnedHelper = {
50
+ readonly pid: number;
51
+ readonly send: (line: string) => void;
52
+ readonly reply: Promise<string | null>;
53
+ readonly close: () => void;
54
+ };
55
+ export type HelperSpawner = (path: string) => SpawnedHelper;
56
+ export declare class HelperProtocolError extends Error {
57
+ }
58
+ export declare const spawnDetachedHelper: HelperSpawner;
59
+ /**
60
+ * One helper process per call. A mutating call runs only under the session lock: the lock is handed to the helper
61
+ * before the request and restored before its stdin closes, so no other writer can enter until the native call has
62
+ * landed (design 3.6, R2). `restore` throws when the lock was lost, and the caller's section must stop.
63
+ */
64
+ export declare function callHelper(path: string, call: HelperCall, options?: {
65
+ readonly lease?: HelperLease;
66
+ readonly spawn?: HelperSpawner;
67
+ }): Promise<HelperReply>;
68
+ export {};
@@ -0,0 +1,31 @@
1
+ import type { RequirementCheck } from "./signature";
2
+ export declare const DESKTOP_RUNTIME_REQUIREMENT = "identifier \"com.mengmota.omo-desktop-runtime\" and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = \"523JNR86LZ\"";
3
+ /** The app bundle as a whole: any Developer ID signature of our team, with every nested piece sealed (--deep --strict). */
4
+ export declare const DESKTOP_APP_REQUIREMENT = "anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = \"523JNR86LZ\"";
5
+ /** Set in the creator's environment: that process never hands off in turn and never shows a keychain dialog. */
6
+ export declare const HANDOFF_ENV = "OMO_KEYCHAIN_HANDOFF";
7
+ export type DesktopRuntime = {
8
+ readonly app: string;
9
+ readonly runtime: string;
10
+ };
11
+ /** The desktop app's macOS install locations, joined with POSIX separators on every host. */
12
+ export declare function desktopRuntimeCandidates(home: string, arch?: string): readonly DesktopRuntime[];
13
+ export type BundleCheck = (app: string, requirement: string) => Promise<boolean>;
14
+ export type HandOffRunner = (path: string, args: readonly string[], env: Record<string, string>, deadlineMs: number) => Promise<number | null>;
15
+ /**
16
+ * Addendum change 1 (rows 7, 8): before the one dialog, ask the side that created the item to move it to the helper.
17
+ * The runtime is run from inside its app bundle, never from a copy: it finds its own keychain helper next to itself,
18
+ * which is what lets it migrate. So the whole bundle is verified (`codesign --deep --strict` against our team) and the
19
+ * runtime against its designated requirement immediately before the spawn. True only when a verified creator exited
20
+ * cleanly; a missing app, a failed check, a failed spawn or a non-zero exit is false, and the caller shows its dialog.
21
+ */
22
+ export declare function createCreatorHandOff(options: {
23
+ readonly candidates: readonly DesktopRuntime[];
24
+ readonly origin?: string;
25
+ readonly env?: NodeJS.ProcessEnv;
26
+ readonly checkRuntime?: RequirementCheck;
27
+ readonly checkBundle?: BundleCheck;
28
+ readonly declaresHandOff?: (runtime: string) => Promise<boolean>;
29
+ readonly run?: HandOffRunner;
30
+ readonly selfPath?: string;
31
+ }): () => Promise<boolean>;
@@ -0,0 +1,75 @@
1
+ import { type HelperAccess } from "./access";
2
+ import { type ApprovalCache } from "./approval-cache";
3
+ import { type Row8bChoice } from "./darwin-read";
4
+ import { type LockedDarwinStore } from "./darwin-store";
5
+ import type { HelperLease } from "./client";
6
+ import { type MarkerProbe } from "./owner-marker";
7
+ type SecretKey = {
8
+ readonly service: string;
9
+ readonly name: string;
10
+ };
11
+ type Secrets = {
12
+ readonly get: (key: SecretKey) => Promise<string | null>;
13
+ readonly set: (key: SecretKey & {
14
+ readonly value: string;
15
+ }) => Promise<void>;
16
+ readonly delete: (key: SecretKey) => Promise<boolean>;
17
+ };
18
+ /**
19
+ * Row 9b (addendum, ruled 2026-10-28): the item is helper-owned but no verified helper exists on this machine.
20
+ * "reinstall-notice" (default) fails with a one-line notice and no dialog; "dialog" takes today's read, which prompts.
21
+ */
22
+ export type Row9bChoice = "reinstall-notice" | "dialog";
23
+ /** Entry points with their own layout (the compiled binary's `execDir`, the desktop runtime) register their copy first. */
24
+ export declare function registerHelperCandidates(paths: readonly string[]): void;
25
+ /**
26
+ * One resolution per process, shared by every bundled copy. An `unavailable` result (a transient pin or copy failure)
27
+ * is not kept: the next resolve tries again, so a long-lived process does not stay on the helper-less path.
28
+ */
29
+ export declare const helperAccess: () => Promise<HelperAccess>;
30
+ export declare function sharedHelperAccess(resolve: () => Promise<HelperAccess>): Promise<HelperAccess>;
31
+ export declare class HelperMissingForOwnedItem extends Error {
32
+ }
33
+ /** The error shapes keystore.ts already maps: a locked keychain carries -25308; a pending approval is its own kind. */
34
+ export declare function asKeystoreError(error: unknown, pending: (message: string) => Error): unknown;
35
+ /** What a test (or an entry point) may substitute; production uses the defaults. */
36
+ export type KeychainHelperOptions = {
37
+ readonly access?: () => Promise<HelperAccess>;
38
+ readonly ownerMarker?: MarkerProbe;
39
+ readonly silently?: <T>(run: () => Promise<T>) => Promise<T>;
40
+ readonly home?: string;
41
+ readonly row8b?: Row8bChoice;
42
+ readonly row9b?: Row9bChoice;
43
+ readonly cache?: ApprovalCache;
44
+ readonly handOff?: () => Promise<boolean>;
45
+ readonly noDialog?: boolean;
46
+ };
47
+ export type DarwinBackend = {
48
+ /** The read every caller outside the session lock shares (it may show the one plain approval dialog). */
49
+ readonly read: () => Promise<string | null>;
50
+ readonly underLock: (lease: HelperLease) => LockedDarwinStore;
51
+ /** The last read outside the lock found a value the helper does not own yet; only a locked section migrates it. */
52
+ readonly migrationPending: () => boolean;
53
+ };
54
+ export declare function createDarwinBackend(options: {
55
+ readonly access: Extract<HelperAccess, {
56
+ kind: "ready";
57
+ }>;
58
+ readonly secrets: Secrets;
59
+ readonly service: string;
60
+ readonly account: string;
61
+ readonly background: boolean;
62
+ readonly notice: (message: string) => void;
63
+ readonly home?: string;
64
+ readonly row8b?: Row8bChoice;
65
+ readonly silently?: <T>(run: () => Promise<T>) => Promise<T>;
66
+ readonly cache?: ApprovalCache;
67
+ readonly handOff?: () => Promise<boolean>;
68
+ readonly noDialog?: boolean;
69
+ }): DarwinBackend;
70
+ /**
71
+ * Without a verified helper, the read is today's, except for an item the helper owns (row 9b): today's read could
72
+ * only reach it through a dialog, so by default this answers with the reinstall notice instead.
73
+ */
74
+ export declare function guardHelperlessRead(service: string, account: string, choice?: Row9bChoice, probe?: MarkerProbe): Promise<void>;
75
+ export {};
@@ -0,0 +1,46 @@
1
+ import type { HelperAccess } from "./access";
2
+ import type { ApprovalCache } from "./approval-cache";
3
+ import type { HelperReply } from "./client";
4
+ export type ReadSource = "owned" | "owned-unmarked" | "own-identity" | "approved";
5
+ export type ReadResult = {
6
+ readonly kind: "value";
7
+ readonly value: string;
8
+ readonly source: ReadSource;
9
+ readonly reply: HelperReply;
10
+ } | {
11
+ readonly kind: "missing";
12
+ readonly reply: HelperReply;
13
+ };
14
+ /**
15
+ * Row 8b (addendum, PRODUCT CALL, recommended default): the item's creator is gone and the only dialog left would be
16
+ * the login-password kind. "re-login" reads as signed out so the user signs in again (save then retires the old item);
17
+ * "password-dialog" asks anyway. Only the default may ship until the owner decides.
18
+ */
19
+ export type Row8bChoice = "re-login" | "password-dialog";
20
+ export type ReadFailure = "locked" | "store" | "pending" | "denied";
21
+ export declare class HelperReadError extends Error {
22
+ readonly failure: ReadFailure;
23
+ constructor(failure: ReadFailure, message: string);
24
+ }
25
+ export type DarwinReadDeps = {
26
+ readonly account: string;
27
+ readonly access: Extract<HelperAccess, {
28
+ kind: "ready";
29
+ }>;
30
+ /** This process's own identity, interaction off: the value, null when missing, or throws when refused. */
31
+ readonly ownSilentGet: () => Promise<string | null>;
32
+ readonly cache: ApprovalCache;
33
+ /** R4: the machine-wide prompt lock, taken with zero wait; null when another process holds it. */
34
+ readonly takePromptLock: () => Promise<(() => Promise<void>) | null>;
35
+ /** Asks the side that created the item to migrate it before any prompt; true when that ran. */
36
+ readonly handOff?: () => Promise<boolean>;
37
+ readonly noDialog?: boolean;
38
+ readonly background: boolean;
39
+ readonly row8b?: Row8bChoice;
40
+ };
41
+ /**
42
+ * Design 3.2 for one read: the helper's read; for an item another identity owns, this process's own silent read, then
43
+ * the process's validated approval, then (outside the session lock only) the creator hand-off and at most one plain
44
+ * `approve` dialog. A login-password dialog is never shown (addendum Q2): such an item reads per row 8b.
45
+ */
46
+ export declare function readThroughHelper(deps: DarwinReadDeps, allowPrompt: boolean): Promise<ReadResult>;
@@ -0,0 +1,28 @@
1
+ import type { HelperLease } from "./client";
2
+ import { type DarwinReadDeps } from "./darwin-read";
3
+ export type WriteIntent = "fresh-sign-in" | "update";
4
+ export type DarwinStoreDeps = DarwinReadDeps & {
5
+ /** Today's overwrite of an item another identity owns (silent, m5): keeps that item's access list. */
6
+ readonly ownOverwrite: (value: string) => Promise<void>;
7
+ /** Today's delete of `<A>` by this process's identity (may prompt, v9 3.1); `<A>.old` silently. */
8
+ readonly ownDelete: (name: string) => Promise<boolean>;
9
+ /** One notice per process for a failed migration (v9 3.3: it never fails the section). */
10
+ readonly notice: (message: string) => void;
11
+ };
12
+ export type LockedDarwinStore = {
13
+ readonly recover: () => Promise<void>;
14
+ readonly read: () => Promise<string | null>;
15
+ readonly settle: () => Promise<void>;
16
+ /** `beforeRetire` runs once, just before row 8b moves an unreadable item aside (the session reports that discard). */
17
+ readonly write: (value: string, intent: WriteIntent, beforeRetire?: () => Promise<void>) => Promise<void>;
18
+ readonly clear: () => Promise<void>;
19
+ };
20
+ /** RULING-73: every retired slot holds a copy nothing here can remove; the user must delete them once. */
21
+ export declare class HelperOldSlotsFull extends Error {
22
+ }
23
+ /**
24
+ * The session-lock view (design 3.3, 3.4, 3.6): every helper mutation is handed the lease; reads never prompt (an
25
+ * approval comes from `prepare()` before the lock); recovery runs at the start of every section, migration only from
26
+ * `accessToken()`'s section via `settle()`.
27
+ */
28
+ export declare function lockedDarwinStore(deps: DarwinStoreDeps, lease: HelperLease): LockedDarwinStore;
@@ -0,0 +1,85 @@
1
+ import { type SecretApi } from "../keystore";
2
+ import type { Credentials } from "../protocol";
3
+ import { type BeforeKeysDiscarded } from "../session";
4
+ import type { HelperCall, HelperLease, HelperReply } from "./client";
5
+ export type Owner = "helper" | "bun" | "runtime" | "other-app";
6
+ type Item = {
7
+ value: string;
8
+ owner: Owner;
9
+ partition: "ours" | "other" | "none";
10
+ marker: boolean;
11
+ cdat: number;
12
+ mdat: number;
13
+ };
14
+ export declare const credentials: Credentials;
15
+ export declare const API = "https://api.example.test";
16
+ export declare const A: string;
17
+ /**
18
+ * An in-memory keychain with the measured semantics of #11262 design 8: data reads by a non-owner are refused, an
19
+ * overwrite keeps the item's owner (m5), a rename works for anyone (m10), a delete by a non-owner is refused (m6).
20
+ * `secrets` is this process's own identity (`bun`); `access` is the signed helper, which counts every approve dialog.
21
+ */
22
+ export declare function fakeKeychain(options?: {
23
+ readonly approve?: "allow" | "deny" | "locked";
24
+ readonly approveGate?: Promise<void>;
25
+ readonly onApprove?: () => void;
26
+ readonly failReadWhenMissing?: boolean;
27
+ readonly singleOldSlot?: boolean;
28
+ }): {
29
+ items: Map<string, Item>;
30
+ events: string[];
31
+ stats: {
32
+ approves: number;
33
+ unleasedMutations: number;
34
+ };
35
+ secrets: SecretApi;
36
+ secretsAs: (identity: Owner) => SecretApi;
37
+ access: {
38
+ readonly kind: "ready";
39
+ readonly path: string;
40
+ readonly call: (call: HelperCall, lease?: HelperLease) => Promise<HelperReply>;
41
+ };
42
+ put: (name: string, value: string, owner: Owner, partition?: Item["partition"]) => Map<string, Item>;
43
+ cache: {
44
+ consume(current: import("./approval-cache").ItemAttributes): string | null;
45
+ deniedForBackground: () => boolean;
46
+ inFlight: () => Promise<import("./approval-cache").ApprovalAnswer> | null;
47
+ approve(run: () => Promise<import("./approval-cache").ApprovalAnswer>): Promise<import("./approval-cache").ApprovalAnswer>;
48
+ afterOwnWrite(value: string, readAttributes: () => Promise<import("./approval-cache").ItemAttributes | null>): Promise<void>;
49
+ drop(): void;
50
+ };
51
+ };
52
+ export type SessionProcess = {
53
+ readonly identity?: Owner;
54
+ readonly noDialog?: boolean;
55
+ readonly handOff?: () => Promise<boolean>;
56
+ readonly home?: string;
57
+ readonly api?: string;
58
+ readonly beforeKeysDiscarded?: BeforeKeysDiscarded;
59
+ };
60
+ /** One omo process on the fake machine; a process other than the default has its own approval cache, as a real one does. */
61
+ export declare function helperSession(keychain: ReturnType<typeof fakeKeychain>, background?: boolean, proc?: SessionProcess): Promise<{
62
+ store: import("..").CredentialStore;
63
+ session: {
64
+ request: (path: string, init: RequestInit) => Promise<unknown>;
65
+ signal: AbortSignal | undefined;
66
+ transaction: <T>(action: (view: import("./store-binding").LockedStore<Credentials> | null) => Promise<T>) => Promise<T>;
67
+ ready(): Promise<void>;
68
+ save(value: Credentials): Promise<void>;
69
+ signedOutMarker: () => Promise<{
70
+ device: string | null;
71
+ at: string;
72
+ } | null>;
73
+ clearSignedOutMarker: () => Promise<void>;
74
+ update<T>(action: (current: Credentials | null) => Promise<T>, options?: {
75
+ readonly replaceInvalid?: boolean;
76
+ }): Promise<T>;
77
+ forget(): Promise<void>;
78
+ accessSnapshot: () => Promise<Credentials | null>;
79
+ logout(): Promise<boolean>;
80
+ accessToken(expect?: (current: Credentials) => boolean): Promise<string>;
81
+ removeForLimit(error: unknown, choose: import("../protocol").ChooseDevice): Promise<boolean>;
82
+ };
83
+ home: string;
84
+ }>;
85
+ export {};
@@ -0,0 +1,28 @@
1
+ import type { SignatureVerdict } from "./signature";
2
+ export type HelperLocation = {
3
+ readonly kind: "found";
4
+ readonly path: string;
5
+ } | {
6
+ readonly kind: "missing";
7
+ } | {
8
+ readonly kind: "invalid";
9
+ readonly rejected: readonly string[];
10
+ };
11
+ /**
12
+ * The two candidates every store-inlining bundle tries first, relative to its own file (design 1, shape A):
13
+ * `<two levels up>/bin/darwin/omo-keychain` (the omo-ai package, the compiled payload), then `<two levels up>/omo-keychain`
14
+ * (the desktop runtime directory).
15
+ */
16
+ export declare function bundleCandidates(moduleUrl: string): readonly string[];
17
+ /**
18
+ * Other signature-valid copies on this machine, tried after the bundle's own (addendum rows 9 and 10): the desktop
19
+ * app's copies and a bun-global omo-ai install. These are macOS paths, so they are joined with POSIX separators on
20
+ * every host.
21
+ */
22
+ export declare function machineCandidates(home: string, arch?: string): readonly string[];
23
+ /**
24
+ * The first candidate that exists AND passes the signature check. A missing candidate is skipped. A present candidate
25
+ * that fails the check is never used and is reported; the search continues only to other verified copies (addendum
26
+ * row 10 amends v9's "refuse, never fall through" to exactly this). Never PATH, never an environment variable.
27
+ */
28
+ export declare function locateHelper(candidates: readonly string[], verify: (path: string) => Promise<SignatureVerdict>): Promise<HelperLocation>;
@@ -0,0 +1,20 @@
1
+ import { type HelperCaller } from "./recovery";
2
+ /** Where the value about to be migrated came from; anything else is never migrated (3.3 table, addendum row 22). */
3
+ export type MigrationSource = "own-identity" | "owned-unmarked" | "approved";
4
+ export type MigrationOutcome = {
5
+ readonly kind: "migrated";
6
+ readonly oldDeleted: boolean;
7
+ } | {
8
+ readonly kind: "skipped";
9
+ readonly reason: "old-slots-full" | "not-migratable";
10
+ } | {
11
+ readonly kind: "failed";
12
+ readonly step: "stage" | "retire" | "promote";
13
+ };
14
+ /**
15
+ * stage -> retire (`<A>` -> its first free `.old` slot) -> promote (staging -> `<A>`) -> delete that slot, all helper calls under the
16
+ * session lock (3.6 R2), so at every instant `<A>`, `<A>.staging` or `<A>.old` holds the current value. It never throws
17
+ * for a keychain refusal: the caller prints one notice and its section continues with the value it already read; 3.4
18
+ * recovery converges whatever is left.
19
+ */
20
+ export declare function migrate(account: string, value: string, source: string, helper: HelperCaller, deleteOwnOld: (name: string) => Promise<boolean>): Promise<MigrationOutcome>;
@@ -0,0 +1,7 @@
1
+ export type MarkerProbe = (service: string, account: string, keychain?: string) => Promise<"helper-owned" | "other" | "absent" | "unknown">;
2
+ /**
3
+ * Whether `<A>` carries the helper's `omo-owner/1` marker, read WITHOUT the helper (addendum row 9b): an attribute-only
4
+ * `security find-generic-password` lookup. It never passes `-w`/`-g`, so the secret is never read and no dialog can
5
+ * appear (attribute reads are silent for any identity, design 8 m2).
6
+ */
7
+ export declare const probeOwnerMarker: MarkerProbe;
@@ -0,0 +1,20 @@
1
+ import type { SignatureVerdict } from "./signature";
2
+ /** Removes the pin directories of processes that are gone (a crash skips the exit cleanup). A live owner's is kept. */
3
+ export declare function sweepDeadPinDirs(root?: string): readonly string[];
4
+ export type PinResult = {
5
+ readonly kind: "pinned";
6
+ readonly path: string;
7
+ } | {
8
+ readonly kind: "invalid";
9
+ } | {
10
+ readonly kind: "unavailable";
11
+ readonly reason: string;
12
+ };
13
+ /**
14
+ * Copies a located helper into a directory only this process uses, makes the copy read-only, and verifies the COPY.
15
+ * The process then spawns only that copy, so a file written to the original path later (a dev build, a broken
16
+ * install) is never executed. The signature is inside the Mach-O, so the copy has the same designated requirement and
17
+ * the same keychain access as the original (#11262 design 1: every copy at any path matches one ACL entry).
18
+ * One copy is kept per source file identity; a source that changes gets a fresh copy.
19
+ */
20
+ export declare function pinVerifiedCopy(source: string, verify: (path: string) => Promise<SignatureVerdict>, dir?: string): Promise<PinResult>;
@@ -0,0 +1,3 @@
1
+ export { processApprovalCache } from "./approval-cache";
2
+ export { promptLockAt } from "./prompt-lock";
3
+ export { gatedSecrets } from "./secrets-gate";
@@ -0,0 +1,19 @@
1
+ import type { HelperAccess } from "./access";
2
+ import type { ApprovalCache } from "./approval-cache";
3
+ /**
4
+ * The state design 3.2 and 3.6 require once per PROCESS: the Bun.secrets queue and interaction switch, the approval
5
+ * cache, the helper candidates and their resolution, and the prompt locks this process holds. The store is bundled
6
+ * separately into more than one sidecar loaded in one process, so module state would give each copy its own; one
7
+ * record on globalThis under a registered symbol is shared by every copy. The ".v1" suffix keeps a future change of
8
+ * this record's shape from being read by an older copy.
9
+ */
10
+ export type KeychainProcessState = {
11
+ secretsQueue: Promise<unknown>;
12
+ interactionSwitch: ((allowed: boolean) => void) | null | undefined;
13
+ approvalCache: ApprovalCache | undefined;
14
+ readonly entryCandidates: string[];
15
+ helperAccess: Promise<HelperAccess> | undefined;
16
+ readonly heldPromptLocks: Set<string>;
17
+ handOff: Promise<boolean> | undefined;
18
+ };
19
+ export declare function keychainProcessState(): KeychainProcessState;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * R4 (design 3.6): the machine-wide prompt lock around `approve`, taken with zero wait. Null means another process is
3
+ * already showing the one dialog, so this caller must not open a second. A pending `approve` keeps holding it; a holder
4
+ * that died leaves a record that is stale at once and is reaped by the next taker.
5
+ */
6
+ /**
7
+ * Test seams: `beforePublish` runs between this caller's reservation and its publish (holding one copy there makes a race
8
+ * deterministic); `removeRecord` replaces the release's unlink, so a test can observe what holds while it runs.
9
+ */
10
+ export type PromptLockHooks = {
11
+ readonly beforePublish?: () => Promise<void>;
12
+ readonly removeRecord?: (path: string, record: string) => Promise<unknown>;
13
+ };
14
+ export declare function promptLockAt(path: string, hooks?: PromptLockHooks): () => Promise<(() => Promise<void>) | null>;
@@ -0,0 +1,34 @@
1
+ import type { HelperCall, HelperReply } from "./client";
2
+ export type MigrationNames = {
3
+ readonly original: boolean;
4
+ readonly staging: boolean;
5
+ readonly old: boolean;
6
+ readonly oldSlots: readonly number[];
7
+ };
8
+ /** `<A>.old` is slot 0; retired copies rotate through `<A>.old.1` ... `<A>.old.7` (RULING-73). */
9
+ export declare const OLD_SLOT_COUNT = 8;
10
+ export declare const oldSlotName: (account: string, slot: number) => string;
11
+ export type RecoveryStep = "promote" | "remove-staging" | "delete-old";
12
+ /**
13
+ * The 3.4 table: what one locked section does for each leftover of an interrupted migration. Renames only, never
14
+ * interactive, and `.old` is never renamed back: an `.old` with no original and no staging means signed out.
15
+ */
16
+ export declare function recoveryPlan(names: MigrationNames): readonly RecoveryStep[];
17
+ /** The occupied old slots; a helper that predates `oldSlots` has only slot 0 (`.old`). */
18
+ export declare function oldSlotsOf(reply: HelperReply): readonly number[];
19
+ /** The names present, from one `read` reply (its `present` field comes from silent attribute reads). */
20
+ export declare function namesFromRead(reply: HelperReply): MigrationNames;
21
+ export type HelperCaller = (call: HelperCall) => Promise<HelperReply>;
22
+ /**
23
+ * Deletes one retired copy with whichever identity can: the helper when it can read it, otherwise this process's own
24
+ * identity (a decrypt-list member deletes silently, m9). A copy neither can delete is left; it holds a single-use token
25
+ * that the next refresh retires, and it occupies one rotation slot.
26
+ */
27
+ export declare function deleteOld(name: string, helper: HelperCaller, deleteOwn: (name: string) => Promise<boolean>): Promise<boolean>;
28
+ /** Clears every retired slot that is present and that some identity here can delete; true when none is left. */
29
+ export declare function deleteOldSlots(account: string, slots: readonly number[], helper: HelperCaller, deleteOwn: (name: string) => Promise<boolean>): Promise<boolean>;
30
+ export type RecoveryOutcome = {
31
+ readonly applied: readonly RecoveryStep[];
32
+ readonly failed: RecoveryStep | null;
33
+ };
34
+ export declare function runRecovery(account: string, names: MigrationNames, helper: HelperCaller, deleteOwnOld: (name: string) => Promise<boolean>): Promise<RecoveryOutcome>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * What a built omo runtime declares about itself (RULING-74), in a file beside the runtime binary. The release build
3
+ * writes it next to every runtime it produces, and the desktop bundles it with the runtime and its keychain helper,
4
+ * inside the sealed app. A runtime from before this contract has no such file.
5
+ */
6
+ export declare const RUNTIME_CAPABILITIES_FILE = "omo-runtime-capabilities.json";
7
+ /** keychainHandoff 1: honours OMO_KEYCHAIN_HANDOFF (never shows a keychain dialog) and migrates through its helper. */
8
+ export declare const RUNTIME_CAPABILITIES: {
9
+ readonly keychainHandoff: 1;
10
+ };
11
+ export declare function runtimeCapabilitiesText(): string;
12
+ /** True only when the file beside `runtime` parses and declares keychain hand-off support at level 1 or above. */
13
+ export declare function runtimeDeclaresKeychainHandoff(runtime: string): Promise<boolean>;
@@ -0,0 +1,4 @@
1
+ /** Runs one Bun.secrets call after every earlier one has settled. */
2
+ export declare function gatedSecrets<T>(run: () => Promise<T>): Promise<T>;
3
+ /** As `gatedSecrets`, with keychain interaction off for exactly this call: it can never show a dialog. */
4
+ export declare function silentSecrets<T>(run: () => Promise<T>): Promise<T>;
@@ -0,0 +1,17 @@
1
+ export declare const KEYCHAIN_HELPER_REQUIREMENT: string;
2
+ export type SignatureVerdict = "valid" | "invalid" | "missing";
3
+ /** Checks one file against a designated requirement. Injected in tests; production uses `verifyWithSecurityFramework`. */
4
+ export type RequirementCheck = (path: string, requirement: string) => Promise<boolean>;
5
+ export declare function signatureBackend(): Promise<"ffi" | "codesign">;
6
+ /** bun:ffi first, `/usr/bin/codesign --verify --strict -R=<DR>` when the framework cannot be loaded. */
7
+ export declare const verifyWithSecurityFramework: RequirementCheck;
8
+ /**
9
+ * One verdict per file identity (dev, inode, size, mtime, ctime) per process (design 1, "Checking the helper"): a
10
+ * replaced or rewritten file is checked again, an unchanged one is not. ctime moves on every write and cannot be set
11
+ * back with utimes. The file is stat'ed before AND after the check, and a verdict is stored only when both agree, so it
12
+ * is never recorded under the identity of a file that changed while it was being checked (that answers "invalid").
13
+ */
14
+ export type SignatureChecker = (path: string) => Promise<SignatureVerdict>;
15
+ export declare function createSignatureChecker(check?: RequirementCheck, requirement?: string): SignatureChecker;
16
+ /** The one checker of this process: its verdict cache is shared by every resolution and every spawn. */
17
+ export declare const processSignatureChecker: () => SignatureChecker;