@ddwang/magnitude-core 0.3.1-ddwang.2 → 0.3.1-ddwang.21

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 (363) hide show
  1. package/dist/cli.cjs +2 -0
  2. package/dist/cli.cjs.map +1 -0
  3. package/dist/cli.d.cts +2 -0
  4. package/dist/cli.d.ts +2 -0
  5. package/dist/cli.mjs +1 -0
  6. package/dist/cli.mjs.map +1 -0
  7. package/dist/index.cjs +2704 -1522
  8. package/dist/index.cjs.map +1 -0
  9. package/dist/index.d.cts +188 -50
  10. package/dist/index.d.ts +1147 -23
  11. package/dist/index.mjs +2527 -1362
  12. package/dist/index.mjs.map +1 -0
  13. package/node_modules/patchright-core/README.md +3 -0
  14. package/node_modules/patchright-core/ThirdPartyNotices.txt +13 -0
  15. package/node_modules/patchright-core/bin/install_media_pack.ps1 +5 -0
  16. package/node_modules/patchright-core/bin/install_webkit_wsl.ps1 +33 -0
  17. package/node_modules/patchright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
  18. package/node_modules/patchright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
  19. package/node_modules/patchright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
  20. package/node_modules/patchright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
  21. package/node_modules/patchright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
  22. package/node_modules/patchright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
  23. package/node_modules/patchright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
  24. package/node_modules/patchright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
  25. package/node_modules/patchright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
  26. package/node_modules/patchright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
  27. package/node_modules/patchright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
  28. package/node_modules/patchright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
  29. package/node_modules/patchright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
  30. package/node_modules/patchright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
  31. package/node_modules/patchright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
  32. package/node_modules/patchright-core/browsers.json +52 -0
  33. package/node_modules/patchright-core/cli.js +22 -0
  34. package/node_modules/patchright-core/index.d.ts +17 -0
  35. package/node_modules/patchright-core/index.js +17 -0
  36. package/node_modules/patchright-core/index.mjs +28 -0
  37. package/node_modules/patchright-core/lib/bootstrap.js +149 -0
  38. package/node_modules/patchright-core/lib/coreBundle.js +80653 -0
  39. package/node_modules/patchright-core/lib/entry/cliDaemon.js +5 -0
  40. package/node_modules/patchright-core/lib/entry/dashboardApp.js +3 -0
  41. package/node_modules/patchright-core/lib/entry/mcp.js +10 -0
  42. package/node_modules/patchright-core/lib/entry/oopBrowserDownload.js +3 -0
  43. package/node_modules/patchright-core/lib/package.js +50 -0
  44. package/node_modules/patchright-core/lib/server/chromium/appIcon.png +0 -0
  45. package/node_modules/patchright-core/lib/server/electron/loader.js +112 -0
  46. package/node_modules/patchright-core/lib/serverRegistry.js +1939 -0
  47. package/node_modules/patchright-core/lib/serverRegistry.js.LICENSE +65 -0
  48. package/node_modules/patchright-core/lib/tools/cli-client/channelSessions.js +141 -0
  49. package/node_modules/patchright-core/lib/tools/cli-client/cli.js +7 -0
  50. package/node_modules/patchright-core/lib/tools/cli-client/help.json +808 -0
  51. package/node_modules/patchright-core/lib/tools/cli-client/minimist.js +128 -0
  52. package/node_modules/patchright-core/lib/tools/cli-client/output.js +352 -0
  53. package/node_modules/patchright-core/lib/tools/cli-client/program.js +422 -0
  54. package/node_modules/patchright-core/lib/tools/cli-client/registry.js +180 -0
  55. package/node_modules/patchright-core/lib/tools/cli-client/session.js +261 -0
  56. package/node_modules/patchright-core/lib/tools/dashboard/appIcon.png +0 -0
  57. package/node_modules/patchright-core/lib/tools/skills/playwright-cli/SKILL.md +493 -0
  58. package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
  59. package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
  60. package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/pr-attachments.md +60 -0
  61. package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
  62. package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/running-code.md +245 -0
  63. package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/session-management.md +227 -0
  64. package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
  65. package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
  66. package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
  67. package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/video-recording.md +216 -0
  68. package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
  69. package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
  70. package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
  71. package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
  72. package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
  73. package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
  74. package/node_modules/patchright-core/lib/tools/skills/playwright-trace/SKILL.md +174 -0
  75. package/node_modules/patchright-core/lib/tools/utils/extension.js +112 -0
  76. package/node_modules/patchright-core/lib/tools/utils/socketConnection.js +108 -0
  77. package/node_modules/patchright-core/lib/utilsBundle.js +86225 -0
  78. package/node_modules/patchright-core/lib/utilsBundle.js.LICENSE +1890 -0
  79. package/node_modules/patchright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
  80. package/node_modules/patchright-core/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
  81. package/node_modules/patchright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
  82. package/node_modules/patchright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
  83. package/node_modules/patchright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
  84. package/node_modules/patchright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
  85. package/node_modules/patchright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
  86. package/node_modules/patchright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
  87. package/node_modules/patchright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
  88. package/node_modules/patchright-core/lib/vite/dashboard/index.html +29 -0
  89. package/node_modules/patchright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
  90. package/node_modules/patchright-core/lib/vite/htmlReport/index.html +16 -0
  91. package/node_modules/patchright-core/lib/vite/htmlReport/report.css +2 -0
  92. package/node_modules/patchright-core/lib/vite/htmlReport/report.js +32 -0
  93. package/node_modules/patchright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
  94. package/node_modules/patchright-core/lib/vite/recorder/assets/codeMirrorModule-GBnsXk4c.js +32 -0
  95. package/node_modules/patchright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  96. package/node_modules/patchright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
  97. package/node_modules/patchright-core/lib/vite/recorder/assets/index-CVDOfo-j.js +129 -0
  98. package/node_modules/patchright-core/lib/vite/recorder/index.html +29 -0
  99. package/node_modules/patchright-core/lib/vite/recorder/playwright-logo.svg +9 -0
  100. package/node_modules/patchright-core/lib/vite/traceViewer/assets/codeMirrorModule-G79327TW.js +32 -0
  101. package/node_modules/patchright-core/lib/vite/traceViewer/assets/defaultSettingsView-D9EV0iaS.js +184 -0
  102. package/node_modules/patchright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
  103. package/node_modules/patchright-core/lib/vite/traceViewer/assets/xtermModule-Al_u-Nk5.js +7 -0
  104. package/node_modules/patchright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
  105. package/node_modules/patchright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  106. package/node_modules/patchright-core/lib/vite/traceViewer/defaultSettingsView.C8BeHuxd.css +1 -0
  107. package/node_modules/patchright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
  108. package/node_modules/patchright-core/lib/vite/traceViewer/index.CMB2-c8e.js +1 -0
  109. package/node_modules/patchright-core/lib/vite/traceViewer/index.html +44 -0
  110. package/node_modules/patchright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
  111. package/node_modules/patchright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
  112. package/node_modules/patchright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
  113. package/node_modules/patchright-core/lib/vite/traceViewer/snapshot.html +10 -0
  114. package/node_modules/patchright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
  115. package/node_modules/patchright-core/lib/vite/traceViewer/uiMode.C3yLoy2G.js +5 -0
  116. package/node_modules/patchright-core/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
  117. package/node_modules/patchright-core/lib/vite/traceViewer/uiMode.html +18 -0
  118. package/node_modules/patchright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
  119. package/node_modules/patchright-core/lib/webp_codec.LICENSE +173 -0
  120. package/node_modules/patchright-core/lib/webp_codec.wasm +0 -0
  121. package/node_modules/patchright-core/lib/xdg-open +1267 -0
  122. package/node_modules/patchright-core/package.json +34 -0
  123. package/node_modules/patchright-core/types/protocol.d.ts +24776 -0
  124. package/node_modules/patchright-core/types/structs.d.ts +52 -0
  125. package/node_modules/patchright-core/types/types.d.ts +27167 -0
  126. package/node_modules/playwright/.bun-tag-91d746a6045e143f +0 -0
  127. package/node_modules/playwright/README.md +300 -0
  128. package/node_modules/playwright/ThirdPartyNotices.txt +14 -0
  129. package/node_modules/playwright/cli.js +19 -0
  130. package/node_modules/playwright/index.d.ts +17 -0
  131. package/node_modules/playwright/index.js +17 -0
  132. package/node_modules/playwright/index.mjs +18 -0
  133. package/node_modules/playwright/lib/agents/agentParser.js +89 -0
  134. package/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
  135. package/node_modules/playwright/lib/agents/generateAgents.js +395 -0
  136. package/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
  137. package/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
  138. package/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
  139. package/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
  140. package/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +56 -0
  141. package/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
  142. package/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +74 -0
  143. package/node_modules/playwright/lib/cli/reportActions.js +78 -0
  144. package/node_modules/playwright/lib/cli/testActions.js +217 -0
  145. package/node_modules/playwright/lib/common/index.js +2937 -0
  146. package/node_modules/playwright/lib/common/index.js.txt +33 -0
  147. package/node_modules/playwright/lib/errorContext.js +129 -0
  148. package/node_modules/playwright/lib/globals.js +58 -0
  149. package/node_modules/playwright/lib/index.js +827 -0
  150. package/node_modules/playwright/lib/isomorphic.js +260 -0
  151. package/node_modules/playwright/lib/isomorphic.js.txt +9 -0
  152. package/node_modules/playwright/lib/loader/loaderProcessEntry.js +34 -0
  153. package/node_modules/playwright/lib/loader/loaderProcessEntry.js.txt +9 -0
  154. package/node_modules/playwright/lib/matchers/expect.js +13496 -0
  155. package/node_modules/playwright/lib/matchers/expect.js.LICENSE +640 -0
  156. package/node_modules/playwright/lib/matchers/expect.js.txt +67 -0
  157. package/node_modules/playwright/lib/mcp/test/browserBackend.js +135 -0
  158. package/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
  159. package/node_modules/playwright/lib/mcp/test/plannerTools.js +150 -0
  160. package/node_modules/playwright/lib/mcp/test/seed.js +82 -0
  161. package/node_modules/playwright/lib/mcp/test/streams.js +44 -0
  162. package/node_modules/playwright/lib/mcp/test/testBackend.js +99 -0
  163. package/node_modules/playwright/lib/mcp/test/testContext.js +306 -0
  164. package/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
  165. package/node_modules/playwright/lib/mcp/test/testTools.js +98 -0
  166. package/node_modules/playwright/lib/package.js +47 -0
  167. package/node_modules/playwright/lib/program.js +242 -0
  168. package/node_modules/playwright/lib/runner/index.js +8721 -0
  169. package/node_modules/playwright/lib/runner/index.js.txt +62 -0
  170. package/node_modules/playwright/lib/transform/babelBundle.js +72490 -0
  171. package/node_modules/playwright/lib/transform/babelBundle.js.LICENSE +2384 -0
  172. package/node_modules/playwright/lib/transform/babelBundle.js.txt +328 -0
  173. package/node_modules/playwright/lib/transform/esmLoader.js +8213 -0
  174. package/node_modules/playwright/lib/transform/esmLoader.js.LICENSE +355 -0
  175. package/node_modules/playwright/lib/transform/esmLoader.js.txt +60 -0
  176. package/node_modules/playwright/lib/util.js +373 -0
  177. package/node_modules/playwright/lib/worker/workerProcessEntry.js +1860 -0
  178. package/node_modules/playwright/lib/worker/workerProcessEntry.js.txt +19 -0
  179. package/node_modules/playwright/package.json +50 -0
  180. package/node_modules/playwright/test.d.ts +18 -0
  181. package/node_modules/playwright/test.js +24 -0
  182. package/node_modules/playwright/test.mjs +35 -0
  183. package/node_modules/playwright/types/test.d.ts +11191 -0
  184. package/node_modules/playwright/types/testReporter.d.ts +950 -0
  185. package/package.json +21 -12
  186. package/dist/actions/desktopActions.d.ts +0 -58
  187. package/dist/actions/desktopActions.js +0 -155
  188. package/dist/actions/index.d.ts +0 -27
  189. package/dist/actions/index.js +0 -11
  190. package/dist/actions/memoryActions.d.ts +0 -9
  191. package/dist/actions/memoryActions.js +0 -34
  192. package/dist/actions/taskActions.d.ts +0 -8
  193. package/dist/actions/taskActions.js +0 -27
  194. package/dist/actions/types.d.ts +0 -35
  195. package/dist/actions/types.js +0 -5
  196. package/dist/actions/util.d.ts +0 -21
  197. package/dist/actions/util.js +0 -280
  198. package/dist/actions/webActions.d.ts +0 -87
  199. package/dist/actions/webActions.js +0 -214
  200. package/dist/actions/webActions.test.d.ts +0 -1
  201. package/dist/actions/webActions.test.js +0 -43
  202. package/dist/agent/browserAgent.d.ts +0 -31
  203. package/dist/agent/browserAgent.js +0 -136
  204. package/dist/agent/errors.d.ts +0 -22
  205. package/dist/agent/errors.js +0 -97
  206. package/dist/agent/index.d.ts +0 -64
  207. package/dist/agent/index.js +0 -505
  208. package/dist/agent/narrator.d.ts +0 -4
  209. package/dist/agent/narrator.js +0 -63
  210. package/dist/agent/pause.test.d.ts +0 -1
  211. package/dist/agent/pause.test.js +0 -194
  212. package/dist/ai/baml_client/async_client.d.ts +0 -64
  213. package/dist/ai/baml_client/async_client.js +0 -284
  214. package/dist/ai/baml_client/async_request.d.ts +0 -39
  215. package/dist/ai/baml_client/async_request.js +0 -134
  216. package/dist/ai/baml_client/config.d.ts +0 -11
  217. package/dist/ai/baml_client/config.js +0 -20
  218. package/dist/ai/baml_client/globals.d.ts +0 -16
  219. package/dist/ai/baml_client/globals.js +0 -37
  220. package/dist/ai/baml_client/index.d.ts +0 -17
  221. package/dist/ai/baml_client/index.js +0 -42
  222. package/dist/ai/baml_client/inlinedbaml.d.ts +0 -19
  223. package/dist/ai/baml_client/inlinedbaml.js +0 -31
  224. package/dist/ai/baml_client/parser.d.ts +0 -53
  225. package/dist/ai/baml_client/parser.js +0 -86
  226. package/dist/ai/baml_client/partial_types.d.ts +0 -61
  227. package/dist/ai/baml_client/partial_types.js +0 -10
  228. package/dist/ai/baml_client/sync_client.d.ts +0 -57
  229. package/dist/ai/baml_client/sync_client.js +0 -142
  230. package/dist/ai/baml_client/sync_request.d.ts +0 -37
  231. package/dist/ai/baml_client/sync_request.js +0 -134
  232. package/dist/ai/baml_client/tracing.d.ts +0 -16
  233. package/dist/ai/baml_client/tracing.js +0 -18
  234. package/dist/ai/baml_client/type_builder.d.ts +0 -40
  235. package/dist/ai/baml_client/type_builder.js +0 -120
  236. package/dist/ai/baml_client/types.d.ts +0 -69
  237. package/dist/ai/baml_client/types.js +0 -15
  238. package/dist/ai/baml_client/watchers.d.ts +0 -32
  239. package/dist/ai/baml_client/watchers.js +0 -50
  240. package/dist/ai/baseten.d.ts +0 -4
  241. package/dist/ai/baseten.js +0 -10
  242. package/dist/ai/claudeCode.d.ts +0 -1
  243. package/dist/ai/claudeCode.js +0 -186
  244. package/dist/ai/modelHarness.d.ts +0 -39
  245. package/dist/ai/modelHarness.js +0 -324
  246. package/dist/ai/modelResponseError.d.ts +0 -4
  247. package/dist/ai/modelResponseError.js +0 -8
  248. package/dist/ai/multiModelHarness.d.ts +0 -24
  249. package/dist/ai/multiModelHarness.js +0 -52
  250. package/dist/ai/plannerResponse.d.ts +0 -34
  251. package/dist/ai/plannerResponse.js +0 -96
  252. package/dist/ai/plannerResponse.test.d.ts +0 -1
  253. package/dist/ai/plannerResponse.test.js +0 -112
  254. package/dist/ai/structuredOutput.d.ts +0 -11
  255. package/dist/ai/structuredOutput.js +0 -94
  256. package/dist/ai/structuredOutput.test.d.ts +0 -1
  257. package/dist/ai/structuredOutput.test.js +0 -91
  258. package/dist/ai/types.d.ts +0 -119
  259. package/dist/ai/types.js +0 -5
  260. package/dist/ai/util.d.ts +0 -13
  261. package/dist/ai/util.js +0 -200
  262. package/dist/ai/util.test.d.ts +0 -1
  263. package/dist/ai/util.test.js +0 -95
  264. package/dist/cli.js +0 -3
  265. package/dist/common/actions.js +0 -14
  266. package/dist/common/events.d.ts +0 -17
  267. package/dist/common/events.js +0 -3
  268. package/dist/common/failure.d.ts +0 -68
  269. package/dist/common/failure.js +0 -1
  270. package/dist/common/index.d.ts +0 -3
  271. package/dist/common/index.js +0 -3
  272. package/dist/common/operation.d.ts +0 -31
  273. package/dist/common/operation.js +0 -102
  274. package/dist/common/operation.test.d.ts +0 -1
  275. package/dist/common/operation.test.js +0 -53
  276. package/dist/common/retry.d.ts +0 -16
  277. package/dist/common/retry.js +0 -35
  278. package/dist/common/util.d.ts +0 -23
  279. package/dist/common/util.js +0 -139
  280. package/dist/connectors/browserConnector.d.ts +0 -53
  281. package/dist/connectors/browserConnector.js +0 -290
  282. package/dist/connectors/desktopConnector.d.ts +0 -58
  283. package/dist/connectors/desktopConnector.js +0 -68
  284. package/dist/connectors/index.d.ts +0 -14
  285. package/dist/connectors/index.js +0 -2
  286. package/dist/index.js +0 -28
  287. package/dist/logger.d.ts +0 -3
  288. package/dist/logger.js +0 -15
  289. package/dist/memory/agentMemory.d.ts +0 -47
  290. package/dist/memory/agentMemory.js +0 -167
  291. package/dist/memory/agentMemory.test.d.ts +0 -1
  292. package/dist/memory/agentMemory.test.js +0 -150
  293. package/dist/memory/image.d.ts +0 -28
  294. package/dist/memory/image.js +0 -95
  295. package/dist/memory/image.test.d.ts +0 -1
  296. package/dist/memory/image.test.js +0 -46
  297. package/dist/memory/index.d.ts +0 -3
  298. package/dist/memory/index.js +0 -3
  299. package/dist/memory/masking.d.ts +0 -7
  300. package/dist/memory/masking.js +0 -141
  301. package/dist/memory/masking.test.d.ts +0 -1
  302. package/dist/memory/masking.test.js +0 -117
  303. package/dist/memory/notebook.d.ts +0 -58
  304. package/dist/memory/notebook.js +0 -75
  305. package/dist/memory/notebook.test.d.ts +0 -1
  306. package/dist/memory/notebook.test.js +0 -99
  307. package/dist/memory/observation.d.ts +0 -38
  308. package/dist/memory/observation.js +0 -79
  309. package/dist/memory/rendering/index.d.ts +0 -10
  310. package/dist/memory/rendering/index.js +0 -13
  311. package/dist/memory/rendering/renderJsonParts.d.ts +0 -3
  312. package/dist/memory/rendering/renderJsonParts.js +0 -115
  313. package/dist/memory/rendering/renderJsonParts.test.d.ts +0 -1
  314. package/dist/memory/rendering/renderJsonParts.test.js +0 -217
  315. package/dist/memory/rendering/renderXmlParts.d.ts +0 -7
  316. package/dist/memory/rendering/renderXmlParts.js +0 -127
  317. package/dist/memory/serde.d.ts +0 -20
  318. package/dist/memory/serde.js +0 -67
  319. package/dist/memory/serde.test.d.ts +0 -1
  320. package/dist/memory/serde.test.js +0 -64
  321. package/dist/memory/util.d.ts +0 -2
  322. package/dist/memory/util.js +0 -17
  323. package/dist/telemetry/events.d.ts +0 -9
  324. package/dist/telemetry/events.js +0 -80
  325. package/dist/telemetry/index.d.ts +0 -6
  326. package/dist/telemetry/index.js +0 -91
  327. package/dist/types.d.ts +0 -30
  328. package/dist/types.js +0 -1
  329. package/dist/util.d.ts +0 -1
  330. package/dist/util.js +0 -12
  331. package/dist/version.d.ts +0 -1
  332. package/dist/version.js +0 -3
  333. package/dist/web/browserProvider.d.ts +0 -24
  334. package/dist/web/browserProvider.js +0 -164
  335. package/dist/web/browserProvider.test.d.ts +0 -1
  336. package/dist/web/browserProvider.test.js +0 -44
  337. package/dist/web/harness.d.ts +0 -109
  338. package/dist/web/harness.js +0 -401
  339. package/dist/web/recovery.d.ts +0 -46
  340. package/dist/web/recovery.js +0 -137
  341. package/dist/web/recovery.test.d.ts +0 -1
  342. package/dist/web/recovery.test.js +0 -182
  343. package/dist/web/stability.d.ts +0 -57
  344. package/dist/web/stability.js +0 -323
  345. package/dist/web/tabs.d.ts +0 -58
  346. package/dist/web/tabs.js +0 -293
  347. package/dist/web/transformer.d.ts +0 -7
  348. package/dist/web/transformer.js +0 -41
  349. package/dist/web/types.d.ts +0 -37
  350. package/dist/web/types.js +0 -2
  351. package/dist/web/util.d.ts +0 -3
  352. package/dist/web/util.js +0 -81
  353. package/dist/web/visualizer/cursor.d.ts +0 -16
  354. package/dist/web/visualizer/cursor.js +0 -153
  355. package/dist/web/visualizer/index.d.ts +0 -22
  356. package/dist/web/visualizer/index.js +0 -47
  357. package/dist/web/visualizer/mouseEffects.d.ts +0 -18
  358. package/dist/web/visualizer/mouseEffects.js +0 -287
  359. package/dist/web/visualizer/typeEffects.d.ts +0 -10
  360. package/dist/web/visualizer/typeEffects.js +0 -190
  361. package/dist/web/zodReexport.test.d.ts +0 -1
  362. package/dist/web/zodReexport.test.js +0 -14
  363. /package/{dist/common/actions.d.ts → node_modules/patchright-core/.bun-tag-19f23bd68c84ec1f} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddwang/magnitude-core",
3
- "version": "0.3.1-ddwang.2",
3
+ "version": "0.3.1-ddwang.21",
4
4
  "description": "Magnitude e2e testing agent",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,7 +9,7 @@
9
9
  "module": "./dist/index.mjs",
10
10
  "types": "./dist/index.d.cts",
11
11
  "bin": {
12
- "magnus": "dist/cli.js"
12
+ "magnus": "dist/cli.cjs"
13
13
  },
14
14
  "repository": {
15
15
  "type": "git",
@@ -32,10 +32,11 @@
32
32
  "typescript"
33
33
  ],
34
34
  "scripts": {
35
- "build": "baml-cli generate && tsc && pkgroll",
35
+ "build": "baml-cli generate && tsc --noEmit && tsup",
36
36
  "check": "tsc --noEmit",
37
37
  "cli": "bun ./src/cli.ts",
38
- "pubdev": "bun run build && yalc publish --force --push"
38
+ "pubdev": "bun run build && yalc publish --force --push",
39
+ "prepack": "node ../../scripts/prepare-browser-package.mjs"
39
40
  },
40
41
  "author": {
41
42
  "name": "Magnitude",
@@ -46,11 +47,14 @@
46
47
  "Anders Lie <anders@magnitude.run>"
47
48
  ],
48
49
  "license": "Apache-2.0",
50
+ "engines": {
51
+ "node": "^20.20.0 || >=22.22.0"
52
+ },
49
53
  "devDependencies": {
50
54
  "@types/node": "^22.13.4",
51
55
  "@types/object-hash": "^3.0.6",
52
- "pkgroll": "^2.10.0",
53
- "typescript": "~5.7.2"
56
+ "typescript": "~5.7.2",
57
+ "tsup": "^8.5.1"
54
58
  },
55
59
  "dependencies": {
56
60
  "@boundaryml/baml": "0.226.2",
@@ -62,10 +66,15 @@
62
66
  "object-hash": "^3.0.0",
63
67
  "pino": "^9.6.0",
64
68
  "pino-pretty": "^13.0.0",
65
- "playwright": "npm:patchright@^1.52.0",
66
- "posthog-node": "^5.1.1",
67
- "sharp": "^0.33.5",
68
- "zod": "^3.24.4",
69
- "zod-to-json-schema": "^3.24.5"
70
- }
69
+ "playwright": "npm:patchright@1.64.3",
70
+ "posthog-node": "5.61.2",
71
+ "sharp": "^0.35.5",
72
+ "zod": "^4.6.6",
73
+ "patchright-core": "1.64.3"
74
+ },
75
+ "type": "module",
76
+ "bundledDependencies": [
77
+ "playwright",
78
+ "patchright-core"
79
+ ]
71
80
  }
@@ -1,58 +0,0 @@
1
- export declare const desktopClickAction: import(".").ActionDefinition<{
2
- x: number;
3
- y: number;
4
- }>;
5
- export declare const desktopRightClickAction: import(".").ActionDefinition<{
6
- x: number;
7
- y: number;
8
- }>;
9
- export declare const desktopDoubleClickAction: import(".").ActionDefinition<{
10
- x: number;
11
- y: number;
12
- }>;
13
- export declare const desktopDragAction: import(".").ActionDefinition<{
14
- fromX: number;
15
- fromY: number;
16
- toX: number;
17
- toY: number;
18
- }>;
19
- export declare const desktopScrollAction: import(".").ActionDefinition<{
20
- x: number;
21
- y: number;
22
- deltaX: number;
23
- deltaY: number;
24
- }>;
25
- export declare const desktopTypeAction: import(".").ActionDefinition<{
26
- text: string;
27
- }>;
28
- export declare const desktopKeyAction: import(".").ActionDefinition<{
29
- key: string;
30
- }>;
31
- export declare const desktopNavigateAction: import(".").ActionDefinition<{
32
- url: string;
33
- }>;
34
- export declare const desktopWaitAction: import(".").ActionDefinition<{
35
- seconds: number;
36
- }>;
37
- export declare const desktopActions: (import(".").ActionDefinition<{
38
- x: number;
39
- y: number;
40
- }> | import(".").ActionDefinition<{
41
- fromX: number;
42
- fromY: number;
43
- toX: number;
44
- toY: number;
45
- }> | import(".").ActionDefinition<{
46
- x: number;
47
- y: number;
48
- deltaX: number;
49
- deltaY: number;
50
- }> | import(".").ActionDefinition<{
51
- text: string;
52
- }> | import(".").ActionDefinition<{
53
- key: string;
54
- }> | import(".").ActionDefinition<{
55
- url: string;
56
- }> | import(".").ActionDefinition<{
57
- seconds: number;
58
- }>)[];
@@ -1,155 +0,0 @@
1
- import { createAction } from ".";
2
- import { operationSleep } from '@/common/operation';
3
- import { z } from "zod";
4
- import { DesktopConnector } from "@/connectors/desktopConnector";
5
- // Mouse actions
6
- export const desktopClickAction = createAction({
7
- name: 'desktop:click',
8
- description: "Click at screen coordinates",
9
- schema: z.object({
10
- x: z.number().int().describe("X coordinate"),
11
- y: z.number().int().describe("Y coordinate"),
12
- }),
13
- resolver: async ({ input: { x, y }, agent }) => {
14
- const desktop = agent.require(DesktopConnector);
15
- await desktop.getInterface().click(x, y);
16
- },
17
- render: ({ x, y }) => `⊙ click (${x}, ${y})`
18
- });
19
- export const desktopRightClickAction = createAction({
20
- name: 'desktop:right_click',
21
- description: "Right-click at screen coordinates",
22
- schema: z.object({
23
- x: z.number().int(),
24
- y: z.number().int(),
25
- }),
26
- resolver: async ({ input: { x, y }, agent }) => {
27
- const desktop = agent.require(DesktopConnector);
28
- await desktop.getInterface().rightClick(x, y);
29
- },
30
- render: ({ x, y }) => `⊙ right-click (${x}, ${y})`
31
- });
32
- export const desktopDoubleClickAction = createAction({
33
- name: 'desktop:double_click',
34
- description: "Double-click at screen coordinates",
35
- schema: z.object({
36
- x: z.number().int(),
37
- y: z.number().int(),
38
- }),
39
- resolver: async ({ input: { x, y }, agent }) => {
40
- const desktop = agent.require(DesktopConnector);
41
- await desktop.getInterface().doubleClick(x, y);
42
- },
43
- render: ({ x, y }) => `⊙ double-click (${x}, ${y})`
44
- });
45
- export const desktopDragAction = createAction({
46
- name: 'desktop:drag',
47
- description: "Drag from one position to another",
48
- schema: z.object({
49
- fromX: z.number().int(),
50
- fromY: z.number().int(),
51
- toX: z.number().int(),
52
- toY: z.number().int(),
53
- }),
54
- resolver: async ({ input: { fromX, fromY, toX, toY }, agent }) => {
55
- const desktop = agent.require(DesktopConnector);
56
- await desktop.getInterface().drag(fromX, fromY, toX, toY);
57
- },
58
- render: ({ fromX, fromY, toX, toY }) => `⊙ drag from (${fromX}, ${fromY}) to (${toX}, ${toY})`
59
- });
60
- export const desktopScrollAction = createAction({
61
- name: 'desktop:scroll',
62
- description: "Hover mouse over target and scroll",
63
- schema: z.object({
64
- x: z.number().int(),
65
- y: z.number().int(),
66
- deltaX: z.number().int().describe("Pixels to scroll horizontally"),
67
- deltaY: z.number().int().describe("Pixels to scroll vertically"),
68
- }),
69
- resolver: async ({ input: { x, y, deltaX, deltaY }, agent }) => {
70
- const desktop = agent.require(DesktopConnector);
71
- await desktop.getInterface().scroll(x, y, deltaX, deltaY);
72
- },
73
- render: ({ x, y, deltaX, deltaY }) => `↕ scroll (${deltaX}px, ${deltaY}px)`
74
- });
75
- // Keyboard actions
76
- export const desktopTypeAction = createAction({
77
- name: 'desktop:type',
78
- description: "Type text at current cursor position",
79
- schema: z.object({
80
- text: z.string().describe("Text to type"),
81
- }),
82
- resolver: async ({ input: { text }, agent }) => {
83
- const desktop = agent.require(DesktopConnector);
84
- await desktop.getInterface().type(text);
85
- },
86
- render: ({ text }) => `⌨ type "${text}"`
87
- });
88
- export const desktopKeyAction = createAction({
89
- name: 'desktop:key',
90
- description: "Press a key or key combination. Use '+' to combine keys (e.g., 'cmd+c', 'ctrl+shift+t')",
91
- schema: z.object({
92
- key: z.string().describe("Key to press (e.g., 'enter', 'tab', 'esc') or combination (e.g., 'cmd+c', 'ctrl+a', 'ctrl+shift+t')"),
93
- }),
94
- resolver: async ({ input: { key }, agent }) => {
95
- const desktop = agent.require(DesktopConnector);
96
- // Check if it's a key combination (contains +)
97
- if (key.includes('+')) {
98
- // Parse the combination and use hotkey
99
- const keys = key.split('+').map(k => k.trim());
100
- await desktop.getInterface().hotkey(keys);
101
- }
102
- else {
103
- // Single key press
104
- await desktop.getInterface().key(key);
105
- }
106
- },
107
- render: ({ key }) => {
108
- // Show differently based on whether it's a combination
109
- if (key.includes('+')) {
110
- return `⌨ hotkey ${key}`;
111
- }
112
- return `⌨ key '${key}'`;
113
- }
114
- });
115
- // Navigation
116
- export const desktopNavigateAction = createAction({
117
- name: 'desktop:navigate',
118
- description: "Open a new browser window/tab with the specified URL. For navigating within an existing browser window, interact with the address bar instead.",
119
- schema: z.object({
120
- url: z.string().describe("URL to open in a new browser window/tab"),
121
- }),
122
- resolver: async ({ input: { url }, agent }) => {
123
- const desktop = agent.require(DesktopConnector);
124
- const interface_ = desktop.getInterface();
125
- if (!interface_.navigate) {
126
- throw new Error("Desktop interface does not support navigation");
127
- }
128
- await interface_.navigate(url);
129
- },
130
- render: ({ url }) => `⛓ open browser with ${url}`
131
- });
132
- // Utility
133
- export const desktopWaitAction = createAction({
134
- name: 'desktop:wait',
135
- description: "Actions include smart waiting automatically - so only use this when a significant additional wait is clearly required.",
136
- schema: z.object({
137
- seconds: z.number().describe("Seconds to wait"),
138
- }),
139
- resolver: async ({ input: { seconds }, agent }) => {
140
- await operationSleep(seconds * 1000);
141
- },
142
- render: ({ seconds }) => `◴ wait ${seconds}s`
143
- });
144
- // Export all desktop actions
145
- export const desktopActions = [
146
- desktopClickAction,
147
- desktopRightClickAction,
148
- desktopDoubleClickAction,
149
- desktopDragAction,
150
- desktopScrollAction,
151
- desktopTypeAction,
152
- desktopKeyAction,
153
- desktopNavigateAction,
154
- desktopWaitAction,
155
- ];
@@ -1,27 +0,0 @@
1
- import type { Agent } from "@/agent";
2
- import type { AgentMemory } from '@/memory/agentMemory';
3
- import { RenderableContent } from "@/memory/observation";
4
- import { z, Schema, ZodTypeAny } from "zod";
5
- import type { OperationOptions } from '@/common/operation';
6
- export type ActionContext<T> = {
7
- input: T;
8
- agent: Agent;
9
- memory?: AgentMemory;
10
- } & OperationOptions;
11
- export interface ActionDefinition<T> {
12
- name: string;
13
- description?: string;
14
- schema: Schema<T>;
15
- resolver: (context: ActionContext<T>) => Promise<void | RenderableContent>;
16
- render: (action: T) => string;
17
- }
18
- export declare function createAction<S extends ZodTypeAny>(action: {
19
- name: string;
20
- description?: string;
21
- schema?: S;
22
- resolver: (context: ActionContext<z.infer<S>>) => Promise<void | RenderableContent>;
23
- render?: (action: z.infer<S>) => string;
24
- }): ActionDefinition<z.infer<S>>;
25
- export type ActionPayload<A extends ActionDefinition<any>> = {
26
- name: A['name'];
27
- } & z.infer<A['schema']>;
@@ -1,11 +0,0 @@
1
- import { z } from "zod";
2
- export function createAction(action) {
3
- // Just a helper for automatic schema typing
4
- return {
5
- name: action.name,
6
- description: action.description,
7
- schema: action.schema ?? z.object({}),
8
- resolver: action.resolver,
9
- render: action.render ?? ((action) => JSON.stringify(action))
10
- };
11
- }
@@ -1,9 +0,0 @@
1
- export declare const memoryActions: (import(".").ActionDefinition<{
2
- key: string;
3
- text: string;
4
- sources: number[];
5
- operation: "add" | "correct";
6
- expected_text: string | null;
7
- }> | import(".").ActionDefinition<{
8
- key: string;
9
- }>)[];
@@ -1,34 +0,0 @@
1
- import { createAction } from '.';
2
- import { z } from 'zod';
3
- import { NOTEBOOK_LIMITS, noteUpdateSchema } from '@/memory/notebook';
4
- export const memoryActions = [
5
- createAction({
6
- name: 'memory:note',
7
- description: 'Add a new record or explicitly correct one existing record before leaving facts needed later. Adds never overwrite. Corrections must match the targeted note\'s current text. Cite supporting observations. This consumes one action without interacting with the browser.',
8
- schema: noteUpdateSchema,
9
- resolver: async ({ input, agent, memory }) => {
10
- try {
11
- const { operation, expected_text, ...note } = input;
12
- if (operation === 'add' ? expected_text !== null : expected_text === null) {
13
- throw new Error('Use expected_text null for add; for correct, copy the targeted note\'s exact current text.');
14
- }
15
- (memory ?? agent.memory).remember(note, expected_text ?? undefined);
16
- return { saved: input.key };
17
- }
18
- catch (error) {
19
- return { saved: false, error: String(error), instruction: 'No notes changed. Review the error and notebook. New records need new keys; corrections need an exact current-text match. Preserve existing facts when addressing source or capacity errors.' };
20
- }
21
- },
22
- render: input => `note: ${input.key}`,
23
- }),
24
- createAction({
25
- name: 'memory:forget',
26
- description: 'Remove an obsolete task note after consolidating any facts still needed. This does not delete the captured observation history.',
27
- schema: z.object({ key: z.string().min(1).max(NOTEBOOK_LIMITS.key) }),
28
- resolver: async ({ input, agent, memory }) => {
29
- (memory ?? agent.memory).forget(input.key);
30
- return { forgotten: input.key };
31
- },
32
- render: input => `forget note: ${input.key}`,
33
- }),
34
- ];
@@ -1,8 +0,0 @@
1
- import { ActionDefinition } from ".";
2
- export declare const doneAction: ActionDefinition<{
3
- evidence: string;
4
- }>;
5
- export declare const failAction: ActionDefinition<{}>;
6
- export declare const taskActions: readonly [ActionDefinition<{
7
- evidence: string;
8
- }>, ActionDefinition<{}>];
@@ -1,27 +0,0 @@
1
- import { AgentError } from "@/agent/errors";
2
- import { createAction } from ".";
3
- import { z } from "zod";
4
- export const doneAction = createAction({
5
- name: 'task:done',
6
- description: "ONLY once you have seen sufficient evidence of the task's completion, mark it as done", //Use once sure that task is finished',//'Designate current task as finished',// Do not use until you can verify the task is completed.
7
- schema: z.object({
8
- evidence: z.string().describe(`Specific observed evidence that verifies the task's completion. Do NOT predict this evidence.`)
9
- }),
10
- resolver: async ({ agent }) => {
11
- agent.queueDone();
12
- },
13
- render: () => `✓ done`
14
- });
15
- export const failAction = createAction({
16
- name: 'task:fail',
17
- description: 'Use if task was attempted but does not seem possible. Use common sense', //'Designate current task as infeasible',
18
- schema: z.object({}),
19
- resolver: async ({ agent }) => {
20
- throw new AgentError(`Task failed: ${agent.memory.getLastThoughtMessage() ?? "No thought recorded"}`);
21
- },
22
- render: () => `✕ fail`
23
- });
24
- export const taskActions = [
25
- doneAction,
26
- failAction
27
- ];
@@ -1,35 +0,0 @@
1
- /**
2
- * "Intents" are natural language descriptors that align 1:1 with executable web actions.
3
- * Micro converts intents into web actions.
4
- */
5
- import { SwitchTabWebAction } from "@/web/types";
6
- export interface Action {
7
- variant: string;
8
- [key: string]: any;
9
- }
10
- export type ActionIntent = ClickIntent | HoverIntent | TypeIntent | ScrollIntent | SwitchTabIntent;
11
- export type Intent = ActionIntent | CheckIntent;
12
- export interface ClickIntent {
13
- variant: 'click';
14
- target: string;
15
- }
16
- export interface HoverIntent {
17
- variant: 'hover';
18
- target: string;
19
- }
20
- export interface TypeIntent {
21
- variant: 'type';
22
- target: string;
23
- content: string;
24
- }
25
- export interface ScrollIntent {
26
- variant: 'scroll';
27
- target: string;
28
- deltaX: number;
29
- deltaY: number;
30
- }
31
- export type SwitchTabIntent = SwitchTabWebAction;
32
- export interface CheckIntent {
33
- variant: 'check';
34
- checks: string[];
35
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * "Intents" are natural language descriptors that align 1:1 with executable web actions.
3
- * Micro converts intents into web actions.
4
- */
5
- export {};
@@ -1,21 +0,0 @@
1
- import { ActionDefinition } from ".";
2
- import TypeBuilder from "@/ai/baml_client/type_builder";
3
- import { FieldType } from "@boundaryml/baml/native";
4
- import { Schema, ZodSchema } from "zod";
5
- export interface JsonSchema {
6
- type?: string;
7
- title?: string;
8
- description?: string;
9
- default?: any;
10
- properties?: Record<string, JsonSchema>;
11
- required?: string[];
12
- additionalProperties?: boolean | JsonSchema;
13
- items?: JsonSchema;
14
- enum?: any[];
15
- $ref?: string;
16
- anyOf?: JsonSchema[];
17
- [key: string]: any;
18
- }
19
- export declare function convertZodToBaml(tb: TypeBuilder, schema: Schema): FieldType;
20
- export declare function convertActionDefinitionsToBaml<T>(tb: TypeBuilder, actionVocabulary: ActionDefinition<T>[]): FieldType;
21
- export declare function actionInputSchema<T>({ name, description, schema }: ActionDefinition<T>): ZodSchema<any>;