@code-yeongyu/senpi 2026.8.14 → 2026.8.17

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 (1060) hide show
  1. package/CHANGELOG.md +128 -0
  2. package/README.md +1 -0
  3. package/dist/bun/cli.js +1 -0
  4. package/dist/bun/cli.js.map +1 -1
  5. package/dist/bun/register-cursor-agent.d.ts +2 -0
  6. package/dist/bun/register-cursor-agent.d.ts.map +1 -0
  7. package/dist/bun/register-cursor-agent.js +4 -0
  8. package/dist/bun/register-cursor-agent.js.map +1 -0
  9. package/dist/cli/args.d.ts +1 -0
  10. package/dist/cli/args.d.ts.map +1 -1
  11. package/dist/cli/args.js +14 -0
  12. package/dist/cli/args.js.map +1 -1
  13. package/dist/cli/auth-command.d.ts.map +1 -1
  14. package/dist/cli/auth-command.js +5 -4
  15. package/dist/cli/auth-command.js.map +1 -1
  16. package/dist/core/agent-session-services.js +2 -2
  17. package/dist/core/agent-session-services.js.map +1 -1
  18. package/dist/core/agent-session.d.ts +127 -13
  19. package/dist/core/agent-session.d.ts.map +1 -1
  20. package/dist/core/agent-session.js +420 -82
  21. package/dist/core/agent-session.js.map +1 -1
  22. package/dist/core/auth-storage.d.ts.map +1 -1
  23. package/dist/core/auth-storage.js +19 -8
  24. package/dist/core/auth-storage.js.map +1 -1
  25. package/dist/core/cursor-exec-bridge-session.d.ts +11 -0
  26. package/dist/core/cursor-exec-bridge-session.d.ts.map +1 -0
  27. package/dist/core/cursor-exec-bridge-session.js +17 -0
  28. package/dist/core/cursor-exec-bridge-session.js.map +1 -0
  29. package/dist/core/cursor-exec-bridge.d.ts +52 -0
  30. package/dist/core/cursor-exec-bridge.d.ts.map +1 -0
  31. package/dist/core/cursor-exec-bridge.js +196 -0
  32. package/dist/core/cursor-exec-bridge.js.map +1 -0
  33. package/dist/core/experimental.d.ts +4 -0
  34. package/dist/core/experimental.d.ts.map +1 -1
  35. package/dist/core/experimental.js +4 -0
  36. package/dist/core/experimental.js.map +1 -1
  37. package/dist/core/export-html/template.js +31 -9
  38. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-environment.d.ts +4 -0
  39. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-environment.d.ts.map +1 -0
  40. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-environment.js +30 -0
  41. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-environment.js.map +1 -0
  42. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.d.ts +2 -0
  43. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.d.ts.map +1 -1
  44. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.js +13 -47
  45. package/dist/core/extensions/builtin/claude-sdk-oauth/auth-lane.js.map +1 -1
  46. package/dist/core/extensions/builtin/claude-sdk-oauth/availability.d.ts +18 -1
  47. package/dist/core/extensions/builtin/claude-sdk-oauth/availability.d.ts.map +1 -1
  48. package/dist/core/extensions/builtin/claude-sdk-oauth/availability.js +64 -2
  49. package/dist/core/extensions/builtin/claude-sdk-oauth/availability.js.map +1 -1
  50. package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.d.ts +3 -0
  51. package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.d.ts.map +1 -0
  52. package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.js +27 -0
  53. package/dist/core/extensions/builtin/claude-sdk-oauth/config-dir-credentials.js.map +1 -0
  54. package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.d.ts +15 -2
  55. package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.d.ts.map +1 -1
  56. package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.js +45 -11
  57. package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.js.map +1 -1
  58. package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js +1 -0
  59. package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js.map +1 -1
  60. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts.map +1 -1
  61. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js +17 -1
  62. package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js.map +1 -1
  63. package/dist/core/extensions/builtin/claude-sdk-oauth/stream.d.ts.map +1 -1
  64. package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js +1 -0
  65. package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js.map +1 -1
  66. package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
  67. package/dist/core/extensions/builtin/compaction/index.js +48 -6
  68. package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
  69. package/dist/core/extensions/builtin/compaction/log.d.ts +1 -1
  70. package/dist/core/extensions/builtin/compaction/log.d.ts.map +1 -1
  71. package/dist/core/extensions/builtin/compaction/log.js +2 -0
  72. package/dist/core/extensions/builtin/compaction/log.js.map +1 -1
  73. package/dist/core/extensions/builtin/compaction/overflow-retry.d.ts.map +1 -1
  74. package/dist/core/extensions/builtin/compaction/overflow-retry.js +38 -4
  75. package/dist/core/extensions/builtin/compaction/overflow-retry.js.map +1 -1
  76. package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
  77. package/dist/core/extensions/builtin/compaction/speculative.js +2 -1
  78. package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
  79. package/dist/core/extensions/builtin/compaction/summarization-turn-order.d.ts +33 -0
  80. package/dist/core/extensions/builtin/compaction/summarization-turn-order.d.ts.map +1 -0
  81. package/dist/core/extensions/builtin/compaction/summarization-turn-order.js +67 -0
  82. package/dist/core/extensions/builtin/compaction/summarization-turn-order.js.map +1 -0
  83. package/dist/core/extensions/builtin/config-reload/index.d.ts.map +1 -1
  84. package/dist/core/extensions/builtin/config-reload/index.js +31 -8
  85. package/dist/core/extensions/builtin/config-reload/index.js.map +1 -1
  86. package/dist/core/extensions/builtin/config-reload/routine-settings.d.ts.map +1 -1
  87. package/dist/core/extensions/builtin/config-reload/routine-settings.js +11 -12
  88. package/dist/core/extensions/builtin/config-reload/routine-settings.js.map +1 -1
  89. package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.d.ts +28 -0
  90. package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.d.ts.map +1 -0
  91. package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.js +278 -0
  92. package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.js.map +1 -0
  93. package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.d.ts +38 -0
  94. package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.d.ts.map +1 -0
  95. package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.js +75 -0
  96. package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.js.map +1 -0
  97. package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.d.ts +24 -0
  98. package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.d.ts.map +1 -0
  99. package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.js +64 -0
  100. package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.js.map +1 -0
  101. package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.d.ts +139 -0
  102. package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.d.ts.map +1 -0
  103. package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.js +362 -0
  104. package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.js.map +1 -0
  105. package/dist/core/extensions/builtin/cursor-cli-oauth/errors.d.ts +19 -0
  106. package/dist/core/extensions/builtin/cursor-cli-oauth/errors.d.ts.map +1 -0
  107. package/dist/core/extensions/builtin/cursor-cli-oauth/errors.js +122 -0
  108. package/dist/core/extensions/builtin/cursor-cli-oauth/errors.js.map +1 -0
  109. package/dist/core/extensions/builtin/cursor-cli-oauth/executable.d.ts +30 -0
  110. package/dist/core/extensions/builtin/cursor-cli-oauth/executable.d.ts.map +1 -0
  111. package/dist/core/extensions/builtin/cursor-cli-oauth/executable.js +117 -0
  112. package/dist/core/extensions/builtin/cursor-cli-oauth/executable.js.map +1 -0
  113. package/dist/core/extensions/builtin/cursor-cli-oauth/failover.d.ts +39 -0
  114. package/dist/core/extensions/builtin/cursor-cli-oauth/failover.d.ts.map +1 -0
  115. package/dist/core/extensions/builtin/cursor-cli-oauth/failover.js +155 -0
  116. package/dist/core/extensions/builtin/cursor-cli-oauth/failover.js.map +1 -0
  117. package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.d.ts +89 -0
  118. package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.d.ts.map +1 -0
  119. package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.js +147 -0
  120. package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.js.map +1 -0
  121. package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.d.ts +20 -0
  122. package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.d.ts.map +1 -0
  123. package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.js +99 -0
  124. package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.js.map +1 -0
  125. package/dist/core/extensions/builtin/cursor-cli-oauth/index.d.ts +25 -0
  126. package/dist/core/extensions/builtin/cursor-cli-oauth/index.d.ts.map +1 -0
  127. package/dist/core/extensions/builtin/cursor-cli-oauth/index.js +67 -0
  128. package/dist/core/extensions/builtin/cursor-cli-oauth/index.js.map +1 -0
  129. package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts +27 -0
  130. package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts.map +1 -0
  131. package/dist/core/extensions/builtin/cursor-cli-oauth/models.js +242 -0
  132. package/dist/core/extensions/builtin/cursor-cli-oauth/models.js.map +1 -0
  133. package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.d.ts +73 -0
  134. package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.d.ts.map +1 -0
  135. package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.js +330 -0
  136. package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.js.map +1 -0
  137. package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.d.ts +94 -0
  138. package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.d.ts.map +1 -0
  139. package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.js +248 -0
  140. package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.js.map +1 -0
  141. package/dist/core/extensions/builtin/cursor-cli-oauth/settings.d.ts +35 -0
  142. package/dist/core/extensions/builtin/cursor-cli-oauth/settings.d.ts.map +1 -0
  143. package/dist/core/extensions/builtin/cursor-cli-oauth/settings.js +186 -0
  144. package/dist/core/extensions/builtin/cursor-cli-oauth/settings.js.map +1 -0
  145. package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.d.ts +11 -0
  146. package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.d.ts.map +1 -0
  147. package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.js +17 -0
  148. package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.js.map +1 -0
  149. package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.d.ts +104 -0
  150. package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.d.ts.map +1 -0
  151. package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.js +301 -0
  152. package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.js.map +1 -0
  153. package/dist/core/extensions/builtin/cursor-cli-oauth/stream.d.ts +26 -0
  154. package/dist/core/extensions/builtin/cursor-cli-oauth/stream.d.ts.map +1 -0
  155. package/dist/core/extensions/builtin/cursor-cli-oauth/stream.js +587 -0
  156. package/dist/core/extensions/builtin/cursor-cli-oauth/stream.js.map +1 -0
  157. package/dist/core/extensions/builtin/cursor-cli-oauth/transport.d.ts +43 -0
  158. package/dist/core/extensions/builtin/cursor-cli-oauth/transport.d.ts.map +1 -0
  159. package/dist/core/extensions/builtin/cursor-cli-oauth/transport.js +196 -0
  160. package/dist/core/extensions/builtin/cursor-cli-oauth/transport.js.map +1 -0
  161. package/dist/core/extensions/builtin/goal/channel-state-subscriptions.d.ts +9 -0
  162. package/dist/core/extensions/builtin/goal/channel-state-subscriptions.d.ts.map +1 -0
  163. package/dist/core/extensions/builtin/goal/channel-state-subscriptions.js +18 -0
  164. package/dist/core/extensions/builtin/goal/channel-state-subscriptions.js.map +1 -0
  165. package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
  166. package/dist/core/extensions/builtin/goal/monitor-continuation.js +10 -9
  167. package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
  168. package/dist/core/extensions/builtin/goal/terminal-provider-error.d.ts.map +1 -1
  169. package/dist/core/extensions/builtin/goal/terminal-provider-error.js +16 -0
  170. package/dist/core/extensions/builtin/goal/terminal-provider-error.js.map +1 -1
  171. package/dist/core/extensions/builtin/index.d.ts.map +1 -1
  172. package/dist/core/extensions/builtin/index.js +9 -2
  173. package/dist/core/extensions/builtin/index.js.map +1 -1
  174. package/dist/core/extensions/builtin/loop-guard/detectors.d.ts.map +1 -1
  175. package/dist/core/extensions/builtin/loop-guard/detectors.js +21 -3
  176. package/dist/core/extensions/builtin/loop-guard/detectors.js.map +1 -1
  177. package/dist/core/extensions/builtin/loop-guard/escalation.d.ts +24 -0
  178. package/dist/core/extensions/builtin/loop-guard/escalation.d.ts.map +1 -0
  179. package/dist/core/extensions/builtin/loop-guard/escalation.js +77 -0
  180. package/dist/core/extensions/builtin/loop-guard/escalation.js.map +1 -0
  181. package/dist/core/extensions/builtin/loop-guard/index.d.ts.map +1 -1
  182. package/dist/core/extensions/builtin/loop-guard/index.js +98 -3
  183. package/dist/core/extensions/builtin/loop-guard/index.js.map +1 -1
  184. package/dist/core/extensions/builtin/loop-guard/notice.d.ts +9 -0
  185. package/dist/core/extensions/builtin/loop-guard/notice.d.ts.map +1 -1
  186. package/dist/core/extensions/builtin/loop-guard/notice.js +17 -0
  187. package/dist/core/extensions/builtin/loop-guard/notice.js.map +1 -1
  188. package/dist/core/extensions/builtin/loop-guard/policy.d.ts +4 -0
  189. package/dist/core/extensions/builtin/loop-guard/policy.d.ts.map +1 -1
  190. package/dist/core/extensions/builtin/loop-guard/policy.js +4 -0
  191. package/dist/core/extensions/builtin/loop-guard/policy.js.map +1 -1
  192. package/dist/core/extensions/builtin/loop-guard/renderer.d.ts +2 -0
  193. package/dist/core/extensions/builtin/loop-guard/renderer.d.ts.map +1 -1
  194. package/dist/core/extensions/builtin/loop-guard/renderer.js +11 -0
  195. package/dist/core/extensions/builtin/loop-guard/renderer.js.map +1 -1
  196. package/dist/core/extensions/builtin/loop-guard/tracker.d.ts +1 -1
  197. package/dist/core/extensions/builtin/loop-guard/tracker.d.ts.map +1 -1
  198. package/dist/core/extensions/builtin/loop-guard/tracker.js +3 -1
  199. package/dist/core/extensions/builtin/loop-guard/tracker.js.map +1 -1
  200. package/dist/core/extensions/builtin/mcp/process-tree.js +6 -1
  201. package/dist/core/extensions/builtin/mcp/process-tree.js.map +1 -1
  202. package/dist/core/extensions/builtin/monitor-state-event.d.ts +6 -0
  203. package/dist/core/extensions/builtin/monitor-state-event.d.ts.map +1 -1
  204. package/dist/core/extensions/builtin/monitor-state-event.js +10 -0
  205. package/dist/core/extensions/builtin/monitor-state-event.js.map +1 -1
  206. package/dist/core/extensions/builtin/prompt-preset/glm-5-3.d.ts +3 -0
  207. package/dist/core/extensions/builtin/prompt-preset/glm-5-3.d.ts.map +1 -0
  208. package/dist/core/extensions/builtin/prompt-preset/glm-5-3.js +14 -0
  209. package/dist/core/extensions/builtin/prompt-preset/glm-5-3.js.map +1 -0
  210. package/dist/core/extensions/builtin/prompt-preset/grok-4.6.d.ts +3 -0
  211. package/dist/core/extensions/builtin/prompt-preset/grok-4.6.d.ts.map +1 -0
  212. package/dist/core/extensions/builtin/prompt-preset/grok-4.6.js +91 -0
  213. package/dist/core/extensions/builtin/prompt-preset/grok-4.6.js.map +1 -0
  214. package/dist/core/extensions/builtin/prompt-preset/index.d.ts.map +1 -1
  215. package/dist/core/extensions/builtin/prompt-preset/index.js +22 -2
  216. package/dist/core/extensions/builtin/prompt-preset/index.js.map +1 -1
  217. package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
  218. package/dist/core/extensions/builtin/prompt-preset/presets.js +25 -0
  219. package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
  220. package/dist/core/extensions/builtin/prompt-preset/settings.d.ts +1 -1
  221. package/dist/core/extensions/builtin/prompt-preset/settings.d.ts.map +1 -1
  222. package/dist/core/extensions/builtin/prompt-preset/settings.js +2 -0
  223. package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -1
  224. package/dist/core/extensions/builtin/reasoning/index.d.ts +3 -0
  225. package/dist/core/extensions/builtin/reasoning/index.d.ts.map +1 -0
  226. package/dist/core/extensions/builtin/reasoning/index.js +211 -0
  227. package/dist/core/extensions/builtin/reasoning/index.js.map +1 -0
  228. package/dist/core/extensions/builtin/service-tier.d.ts +44 -1
  229. package/dist/core/extensions/builtin/service-tier.d.ts.map +1 -1
  230. package/dist/core/extensions/builtin/service-tier.js +176 -24
  231. package/dist/core/extensions/builtin/service-tier.js.map +1 -1
  232. package/dist/core/extensions/runner.d.ts.map +1 -1
  233. package/dist/core/extensions/runner.js +4 -4
  234. package/dist/core/extensions/runner.js.map +1 -1
  235. package/dist/core/extensions/types.d.ts +12 -0
  236. package/dist/core/extensions/types.d.ts.map +1 -1
  237. package/dist/core/extensions/types.js.map +1 -1
  238. package/dist/core/keybindings.d.ts +24 -0
  239. package/dist/core/keybindings.d.ts.map +1 -1
  240. package/dist/core/lockfile-policy.d.ts +15 -0
  241. package/dist/core/lockfile-policy.d.ts.map +1 -0
  242. package/dist/core/lockfile-policy.js +15 -0
  243. package/dist/core/lockfile-policy.js.map +1 -0
  244. package/dist/core/model-config.d.ts.map +1 -1
  245. package/dist/core/model-config.js +1 -0
  246. package/dist/core/model-config.js.map +1 -1
  247. package/dist/core/model-resolver.d.ts +34 -7
  248. package/dist/core/model-resolver.d.ts.map +1 -1
  249. package/dist/core/model-resolver.js +116 -28
  250. package/dist/core/model-resolver.js.map +1 -1
  251. package/dist/core/model-runtime.d.ts +7 -2
  252. package/dist/core/model-runtime.d.ts.map +1 -1
  253. package/dist/core/model-runtime.js +19 -5
  254. package/dist/core/model-runtime.js.map +1 -1
  255. package/dist/core/prompt-templates.d.ts +5 -0
  256. package/dist/core/prompt-templates.d.ts.map +1 -1
  257. package/dist/core/prompt-templates.js +8 -9
  258. package/dist/core/prompt-templates.js.map +1 -1
  259. package/dist/core/provider-api-key-auth.d.ts.map +1 -1
  260. package/dist/core/provider-api-key-auth.js +45 -2
  261. package/dist/core/provider-api-key-auth.js.map +1 -1
  262. package/dist/core/provider-composer.d.ts +12 -1
  263. package/dist/core/provider-composer.d.ts.map +1 -1
  264. package/dist/core/provider-composer.js.map +1 -1
  265. package/dist/core/provider-display-names.d.ts.map +1 -1
  266. package/dist/core/provider-display-names.js +2 -0
  267. package/dist/core/provider-display-names.js.map +1 -1
  268. package/dist/core/remote-catalog-provider.d.ts +13 -0
  269. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  270. package/dist/core/remote-catalog-provider.js +15 -0
  271. package/dist/core/remote-catalog-provider.js.map +1 -1
  272. package/dist/core/retry-fallback/controller.d.ts +1 -1
  273. package/dist/core/retry-fallback/controller.d.ts.map +1 -1
  274. package/dist/core/retry-fallback/controller.js +5 -3
  275. package/dist/core/retry-fallback/controller.js.map +1 -1
  276. package/dist/core/sdk.d.ts +5 -3
  277. package/dist/core/sdk.d.ts.map +1 -1
  278. package/dist/core/sdk.js +20 -8
  279. package/dist/core/sdk.js.map +1 -1
  280. package/dist/core/session-manager.d.ts.map +1 -1
  281. package/dist/core/session-manager.js +20 -4
  282. package/dist/core/session-manager.js.map +1 -1
  283. package/dist/core/settings-manager.d.ts +50 -1
  284. package/dist/core/settings-manager.d.ts.map +1 -1
  285. package/dist/core/settings-manager.js +258 -15
  286. package/dist/core/settings-manager.js.map +1 -1
  287. package/dist/core/system-prompt.js +1 -1
  288. package/dist/core/system-prompt.js.map +1 -1
  289. package/dist/core/thinking-levels.d.ts +22 -0
  290. package/dist/core/thinking-levels.d.ts.map +1 -1
  291. package/dist/core/thinking-levels.js +29 -0
  292. package/dist/core/thinking-levels.js.map +1 -1
  293. package/dist/core/tools/bash.d.ts.map +1 -1
  294. package/dist/core/tools/bash.js +2 -0
  295. package/dist/core/tools/bash.js.map +1 -1
  296. package/dist/core/tools/edit.d.ts.map +1 -1
  297. package/dist/core/tools/edit.js +2 -0
  298. package/dist/core/tools/edit.js.map +1 -1
  299. package/dist/core/tools/find.js +1 -1
  300. package/dist/core/tools/find.js.map +1 -1
  301. package/dist/core/tools/grep.js +1 -1
  302. package/dist/core/tools/grep.js.map +1 -1
  303. package/dist/core/tools/read.d.ts.map +1 -1
  304. package/dist/core/tools/read.js +2 -0
  305. package/dist/core/tools/read.js.map +1 -1
  306. package/dist/core/tools/write.d.ts.map +1 -1
  307. package/dist/core/tools/write.js +2 -0
  308. package/dist/core/tools/write.js.map +1 -1
  309. package/dist/index.d.ts +1 -1
  310. package/dist/index.d.ts.map +1 -1
  311. package/dist/index.js.map +1 -1
  312. package/dist/main.d.ts.map +1 -1
  313. package/dist/main.js +18 -1
  314. package/dist/main.js.map +1 -1
  315. package/dist/modes/interactive/components/model-favorites.d.ts +2 -1
  316. package/dist/modes/interactive/components/model-favorites.d.ts.map +1 -1
  317. package/dist/modes/interactive/components/model-favorites.js +72 -6
  318. package/dist/modes/interactive/components/model-favorites.js.map +1 -1
  319. package/dist/modes/interactive/components/model-selector.d.ts +5 -1
  320. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  321. package/dist/modes/interactive/components/model-selector.js +10 -6
  322. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  323. package/dist/modes/interactive/components/settings-selector.d.ts +3 -1
  324. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  325. package/dist/modes/interactive/components/settings-selector.js +10 -0
  326. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  327. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  328. package/dist/modes/interactive/components/tool-execution.js +22 -1
  329. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  330. package/dist/modes/interactive/editor-paste-transfer.d.ts +10 -0
  331. package/dist/modes/interactive/editor-paste-transfer.d.ts.map +1 -1
  332. package/dist/modes/interactive/editor-paste-transfer.js +16 -0
  333. package/dist/modes/interactive/editor-paste-transfer.js.map +1 -1
  334. package/dist/modes/interactive/interactive-mode.d.ts +14 -4
  335. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  336. package/dist/modes/interactive/interactive-mode.js +111 -52
  337. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  338. package/dist/modes/interactive/model-catalog-refresh.d.ts +7 -0
  339. package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
  340. package/dist/modes/interactive/model-catalog-refresh.js +36 -0
  341. package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
  342. package/dist/modes/interactive/theme/dark.json +2 -0
  343. package/dist/modes/interactive/theme/grok-day.json +2 -0
  344. package/dist/modes/interactive/theme/grok-night.json +2 -0
  345. package/dist/modes/interactive/theme/light.json +2 -0
  346. package/dist/modes/interactive/theme/theme-controller.d.ts +10 -2
  347. package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
  348. package/dist/modes/interactive/theme/theme-controller.js +23 -10
  349. package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
  350. package/dist/modes/interactive/theme/theme-schema.json +9 -1
  351. package/dist/modes/interactive/theme/theme.d.ts +5 -3
  352. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  353. package/dist/modes/interactive/theme/theme.js +12 -2
  354. package/dist/modes/interactive/theme/theme.js.map +1 -1
  355. package/dist/modes/json-event.d.ts +4 -1
  356. package/dist/modes/json-event.d.ts.map +1 -1
  357. package/dist/modes/json-event.js +5 -2
  358. package/dist/modes/json-event.js.map +1 -1
  359. package/dist/modes/rpc/connection-handler.d.ts +10 -0
  360. package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
  361. package/dist/modes/rpc/connection-handler.js +119 -46
  362. package/dist/modes/rpc/connection-handler.js.map +1 -1
  363. package/dist/modes/rpc/jsonl.d.ts +6 -1
  364. package/dist/modes/rpc/jsonl.d.ts.map +1 -1
  365. package/dist/modes/rpc/jsonl.js +47 -14
  366. package/dist/modes/rpc/jsonl.js.map +1 -1
  367. package/dist/modes/rpc/multi-session-host.d.ts.map +1 -1
  368. package/dist/modes/rpc/multi-session-host.js +29 -7
  369. package/dist/modes/rpc/multi-session-host.js.map +1 -1
  370. package/dist/modes/rpc/rpc-client.d.ts +26 -1
  371. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  372. package/dist/modes/rpc/rpc-client.js +25 -2
  373. package/dist/modes/rpc/rpc-client.js.map +1 -1
  374. package/dist/modes/rpc/rpc-command-invocation.d.ts +5 -0
  375. package/dist/modes/rpc/rpc-command-invocation.d.ts.map +1 -0
  376. package/dist/modes/rpc/rpc-command-invocation.js +2 -0
  377. package/dist/modes/rpc/rpc-command-invocation.js.map +1 -0
  378. package/dist/modes/rpc/rpc-command-surface.d.ts +49 -0
  379. package/dist/modes/rpc/rpc-command-surface.d.ts.map +1 -0
  380. package/dist/modes/rpc/rpc-command-surface.js +40 -0
  381. package/dist/modes/rpc/rpc-command-surface.js.map +1 -0
  382. package/dist/modes/rpc/rpc-input-validation.d.ts +4 -0
  383. package/dist/modes/rpc/rpc-input-validation.d.ts.map +1 -0
  384. package/dist/modes/rpc/rpc-input-validation.js +20 -0
  385. package/dist/modes/rpc/rpc-input-validation.js.map +1 -0
  386. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  387. package/dist/modes/rpc/rpc-mode.js +12 -1
  388. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  389. package/dist/modes/rpc/rpc-types.d.ts +72 -12
  390. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  391. package/dist/modes/rpc/rpc-types.js.map +1 -1
  392. package/dist/modes/rpc/session-command-router.d.ts.map +1 -1
  393. package/dist/modes/rpc/session-command-router.js +2 -14
  394. package/dist/modes/rpc/session-command-router.js.map +1 -1
  395. package/dist/modes/rpc/session-event-writer.d.ts +29 -10
  396. package/dist/modes/rpc/session-event-writer.d.ts.map +1 -1
  397. package/dist/modes/rpc/session-event-writer.js +229 -50
  398. package/dist/modes/rpc/session-event-writer.js.map +1 -1
  399. package/dist/server/create-harness.d.ts.map +1 -1
  400. package/dist/server/create-harness.js +2 -0
  401. package/dist/server/create-harness.js.map +1 -1
  402. package/dist/utils/shell.d.ts +27 -0
  403. package/dist/utils/shell.d.ts.map +1 -1
  404. package/dist/utils/shell.js +79 -13
  405. package/dist/utils/shell.js.map +1 -1
  406. package/dist/utils/tools-manager.d.ts +10 -1
  407. package/dist/utils/tools-manager.d.ts.map +1 -1
  408. package/dist/utils/tools-manager.js +14 -19
  409. package/dist/utils/tools-manager.js.map +1 -1
  410. package/docs/compaction.md +3 -3
  411. package/docs/custom-provider.md +1 -1
  412. package/docs/environment-variables.md +8 -2
  413. package/docs/extensions.md +4 -0
  414. package/docs/json.md +6 -4
  415. package/docs/keybindings.md +8 -2
  416. package/docs/providers.md +56 -0
  417. package/docs/rpc.md +206 -12
  418. package/docs/sdk.md +9 -0
  419. package/docs/settings.md +93 -1
  420. package/docs/skills.md +14 -3
  421. package/docs/terminal-setup.md +23 -2
  422. package/docs/themes.md +24 -3
  423. package/docs/tui.md +2 -2
  424. package/docs/usage.md +24 -4
  425. package/examples/extensions/subagent/agents.ts +40 -9
  426. package/examples/extensions/subagent/index.ts +26 -3
  427. package/node_modules/@bufbuild/protobuf/README.md +44 -0
  428. package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.d.ts +6 -0
  429. package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.js +66 -0
  430. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.d.ts +1 -0
  431. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.js +18 -0
  432. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.d.ts +10 -0
  433. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.js +31 -0
  434. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.d.ts +9 -0
  435. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.js +28 -0
  436. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.d.ts +1 -0
  437. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.js +18 -0
  438. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.d.ts +10 -0
  439. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.js +39 -0
  440. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.d.ts +10 -0
  441. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.js +24 -0
  442. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.d.ts +8 -0
  443. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.js +27 -0
  444. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.d.ts +140 -0
  445. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.js +43 -0
  446. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.d.ts +79 -0
  447. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.js +15 -0
  448. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.d.ts +63 -0
  449. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.js +105 -0
  450. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.d.ts +43 -0
  451. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.js +244 -0
  452. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.d.ts +29 -0
  453. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.js +58 -0
  454. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.d.ts +9 -0
  455. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.js +28 -0
  456. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.d.ts +7 -0
  457. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.js +35 -0
  458. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.d.ts +10 -0
  459. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.js +39 -0
  460. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.d.ts +15 -0
  461. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.js +24 -0
  462. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.d.ts +5 -0
  463. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.js +29 -0
  464. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.d.ts +9 -0
  465. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.js +67 -0
  466. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.d.ts +8 -0
  467. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.js +27 -0
  468. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.d.ts +145 -0
  469. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.js +74 -0
  470. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.d.ts +85 -0
  471. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.js +15 -0
  472. package/node_modules/@bufbuild/protobuf/dist/commonjs/create.d.ts +9 -0
  473. package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +259 -0
  474. package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.d.ts +634 -0
  475. package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.js +53 -0
  476. package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.d.ts +46 -0
  477. package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.js +209 -0
  478. package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.d.ts +60 -0
  479. package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.js +168 -0
  480. package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.d.ts +23 -0
  481. package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.js +45 -0
  482. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.d.ts +48 -0
  483. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +247 -0
  484. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.d.ts +73 -0
  485. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +739 -0
  486. package/node_modules/@bufbuild/protobuf/dist/commonjs/index.d.ts +19 -0
  487. package/node_modules/@bufbuild/protobuf/dist/commonjs/index.js +55 -0
  488. package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.d.ts +7 -0
  489. package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.js +33 -0
  490. package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.d.ts +16 -0
  491. package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.js +15 -0
  492. package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.d.ts +13 -0
  493. package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.js +70 -0
  494. package/node_modules/@bufbuild/protobuf/dist/commonjs/package.json +4 -0
  495. package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.d.ts +98 -0
  496. package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.js +131 -0
  497. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.d.ts +9 -0
  498. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.js +36 -0
  499. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.d.ts +20 -0
  500. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.js +78 -0
  501. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.d.ts +8 -0
  502. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.js +41 -0
  503. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.d.ts +30 -0
  504. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.js +115 -0
  505. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.d.ts +35 -0
  506. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.js +110 -0
  507. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.d.ts +107 -0
  508. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.js +376 -0
  509. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.d.ts +19 -0
  510. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +268 -0
  511. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.d.ts +217 -0
  512. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.js +16 -0
  513. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.d.ts +43 -0
  514. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +546 -0
  515. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.d.ts +43 -0
  516. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.js +129 -0
  517. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.d.ts +39 -0
  518. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.js +149 -0
  519. package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.d.ts +98 -0
  520. package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +945 -0
  521. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.d.ts +24 -0
  522. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.js +199 -0
  523. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.d.ts +67 -0
  524. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +391 -0
  525. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.d.ts +35 -0
  526. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.js +684 -0
  527. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.d.ts +4 -0
  528. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.js +21 -0
  529. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.d.ts +19 -0
  530. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.js +47 -0
  531. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.d.ts +91 -0
  532. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.js +481 -0
  533. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.d.ts +34 -0
  534. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.js +358 -0
  535. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.d.ts +76 -0
  536. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.js +220 -0
  537. package/node_modules/@bufbuild/protobuf/dist/commonjs/types.d.ts +135 -0
  538. package/node_modules/@bufbuild/protobuf/dist/commonjs/types.js +15 -0
  539. package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.d.ts +10 -0
  540. package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.js +26 -0
  541. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.d.ts +23 -0
  542. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.js +156 -0
  543. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.d.ts +268 -0
  544. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +530 -0
  545. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.d.ts +5 -0
  546. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.js +34 -0
  547. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.d.ts +69 -0
  548. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.js +191 -0
  549. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.d.ts +28 -0
  550. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.js +61 -0
  551. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.d.ts +13 -0
  552. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.js +199 -0
  553. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.d.ts +70 -0
  554. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.js +322 -0
  555. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.d.ts +38 -0
  556. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.js +75 -0
  557. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.d.ts +9 -0
  558. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.js +39 -0
  559. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
  560. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.js +27 -0
  561. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
  562. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.js +39 -0
  563. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
  564. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.js +68 -0
  565. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
  566. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.js +60 -0
  567. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
  568. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.js +892 -0
  569. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
  570. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.js +27 -0
  571. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
  572. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.js +27 -0
  573. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
  574. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.js +27 -0
  575. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
  576. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.js +126 -0
  577. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
  578. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.js +106 -0
  579. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
  580. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.js +27 -0
  581. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
  582. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.js +59 -0
  583. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
  584. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.js +27 -0
  585. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
  586. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.js +242 -0
  587. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
  588. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.js +67 -0
  589. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.d.ts +19 -0
  590. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.js +48 -0
  591. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.d.ts +21 -0
  592. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.js +57 -0
  593. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.d.ts +25 -0
  594. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.js +66 -0
  595. package/node_modules/@bufbuild/protobuf/dist/esm/clone.d.ts +6 -0
  596. package/node_modules/@bufbuild/protobuf/dist/esm/clone.js +63 -0
  597. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.d.ts +1 -0
  598. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.js +14 -0
  599. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.d.ts +10 -0
  600. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.js +26 -0
  601. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.d.ts +9 -0
  602. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.js +25 -0
  603. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.d.ts +1 -0
  604. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.js +14 -0
  605. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.d.ts +10 -0
  606. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.js +23 -0
  607. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.d.ts +10 -0
  608. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.js +21 -0
  609. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.d.ts +8 -0
  610. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.js +24 -0
  611. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.d.ts +140 -0
  612. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.js +40 -0
  613. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.d.ts +79 -0
  614. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.js +14 -0
  615. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.d.ts +63 -0
  616. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +101 -0
  617. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.d.ts +43 -0
  618. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +239 -0
  619. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.d.ts +29 -0
  620. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.js +53 -0
  621. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.d.ts +9 -0
  622. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.js +25 -0
  623. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.d.ts +7 -0
  624. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +32 -0
  625. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.d.ts +10 -0
  626. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +23 -0
  627. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.d.ts +15 -0
  628. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +21 -0
  629. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.d.ts +5 -0
  630. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +26 -0
  631. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.d.ts +9 -0
  632. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.js +63 -0
  633. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.d.ts +8 -0
  634. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.js +24 -0
  635. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.d.ts +145 -0
  636. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +71 -0
  637. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.d.ts +85 -0
  638. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.js +14 -0
  639. package/node_modules/@bufbuild/protobuf/dist/esm/create.d.ts +9 -0
  640. package/node_modules/@bufbuild/protobuf/dist/esm/create.js +256 -0
  641. package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.d.ts +634 -0
  642. package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +50 -0
  643. package/node_modules/@bufbuild/protobuf/dist/esm/equals.d.ts +46 -0
  644. package/node_modules/@bufbuild/protobuf/dist/esm/equals.js +206 -0
  645. package/node_modules/@bufbuild/protobuf/dist/esm/extensions.d.ts +60 -0
  646. package/node_modules/@bufbuild/protobuf/dist/esm/extensions.js +159 -0
  647. package/node_modules/@bufbuild/protobuf/dist/esm/fields.d.ts +23 -0
  648. package/node_modules/@bufbuild/protobuf/dist/esm/fields.js +41 -0
  649. package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.d.ts +48 -0
  650. package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +241 -0
  651. package/node_modules/@bufbuild/protobuf/dist/esm/from-json.d.ts +73 -0
  652. package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +731 -0
  653. package/node_modules/@bufbuild/protobuf/dist/esm/index.d.ts +19 -0
  654. package/node_modules/@bufbuild/protobuf/dist/esm/index.js +29 -0
  655. package/node_modules/@bufbuild/protobuf/dist/esm/is-message.d.ts +7 -0
  656. package/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +30 -0
  657. package/node_modules/@bufbuild/protobuf/dist/esm/json-value.d.ts +16 -0
  658. package/node_modules/@bufbuild/protobuf/dist/esm/json-value.js +14 -0
  659. package/node_modules/@bufbuild/protobuf/dist/esm/merge.d.ts +13 -0
  660. package/node_modules/@bufbuild/protobuf/dist/esm/merge.js +67 -0
  661. package/node_modules/@bufbuild/protobuf/dist/esm/package.json +4 -0
  662. package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.d.ts +98 -0
  663. package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +128 -0
  664. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.d.ts +9 -0
  665. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +31 -0
  666. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.d.ts +20 -0
  667. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +71 -0
  668. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.d.ts +8 -0
  669. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.js +21 -0
  670. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.d.ts +30 -0
  671. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +109 -0
  672. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.d.ts +35 -0
  673. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +105 -0
  674. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.d.ts +107 -0
  675. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.js +369 -0
  676. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.d.ts +19 -0
  677. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +262 -0
  678. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.d.ts +217 -0
  679. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.js +14 -0
  680. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.d.ts +43 -0
  681. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +541 -0
  682. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.d.ts +43 -0
  683. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +124 -0
  684. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.d.ts +39 -0
  685. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +140 -0
  686. package/node_modules/@bufbuild/protobuf/dist/esm/registry.d.ts +98 -0
  687. package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +939 -0
  688. package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.d.ts +24 -0
  689. package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +195 -0
  690. package/node_modules/@bufbuild/protobuf/dist/esm/to-json.d.ts +67 -0
  691. package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +386 -0
  692. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.d.ts +35 -0
  693. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.js +680 -0
  694. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.d.ts +4 -0
  695. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.js +15 -0
  696. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.d.ts +19 -0
  697. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.js +44 -0
  698. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.d.ts +91 -0
  699. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.js +477 -0
  700. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.d.ts +34 -0
  701. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.js +355 -0
  702. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.d.ts +76 -0
  703. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.js +214 -0
  704. package/node_modules/@bufbuild/protobuf/dist/esm/types.d.ts +135 -0
  705. package/node_modules/@bufbuild/protobuf/dist/esm/types.js +14 -0
  706. package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.d.ts +10 -0
  707. package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.js +23 -0
  708. package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.d.ts +23 -0
  709. package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +152 -0
  710. package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.d.ts +268 -0
  711. package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +525 -0
  712. package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.d.ts +5 -0
  713. package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +18 -0
  714. package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.d.ts +69 -0
  715. package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.js +186 -0
  716. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.d.ts +28 -0
  717. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +57 -0
  718. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.d.ts +13 -0
  719. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +195 -0
  720. package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.d.ts +70 -0
  721. package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +313 -0
  722. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.d.ts +38 -0
  723. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +69 -0
  724. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.d.ts +9 -0
  725. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +35 -0
  726. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
  727. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.js +24 -0
  728. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
  729. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.js +36 -0
  730. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
  731. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +65 -0
  732. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
  733. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.js +57 -0
  734. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
  735. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +888 -0
  736. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
  737. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.js +24 -0
  738. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
  739. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.js +24 -0
  740. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
  741. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +24 -0
  742. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
  743. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +123 -0
  744. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
  745. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.js +103 -0
  746. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
  747. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +24 -0
  748. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
  749. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.js +56 -0
  750. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
  751. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +24 -0
  752. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
  753. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.js +239 -0
  754. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
  755. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +64 -0
  756. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.d.ts +19 -0
  757. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +32 -0
  758. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.d.ts +21 -0
  759. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +50 -0
  760. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.d.ts +25 -0
  761. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +61 -0
  762. package/node_modules/@bufbuild/protobuf/package.json +147 -0
  763. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +28 -0
  764. package/node_modules/@code-yeongyu/senpi-codemode/README.md +5 -0
  765. package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
  766. package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +14 -1
  767. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/call-capture.ts +64 -0
  768. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-handler.ts +45 -61
  769. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-runtime.ts +8 -0
  770. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-execution-event.ts +201 -0
  771. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool-options.ts +2 -0
  772. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/eval-tool.ts +22 -0
  773. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/render.ts +43 -6
  774. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/types.ts +4 -0
  775. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
  776. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +59 -17
  777. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
  778. package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +14 -0
  779. package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
  780. package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +14 -0
  781. package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
  782. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts +25 -0
  783. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +1 -1
  784. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +77 -12
  785. package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +1 -1
  786. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts +43 -0
  787. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts.map +1 -0
  788. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js +67 -0
  789. package/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js.map +1 -0
  790. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts +4 -2
  791. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts.map +1 -1
  792. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js +127 -88
  793. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js.map +1 -1
  794. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts +5 -1
  795. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts.map +1 -1
  796. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js +9 -2
  797. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js.map +1 -1
  798. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts +12 -3
  799. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts.map +1 -1
  800. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js +88 -45
  801. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js.map +1 -1
  802. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts +1 -1
  803. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts.map +1 -1
  804. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js +28 -19
  805. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js.map +1 -1
  806. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts +1 -1
  807. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts.map +1 -1
  808. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js.map +1 -1
  809. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts +1 -1
  810. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts.map +1 -1
  811. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js.map +1 -1
  812. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +6 -1
  813. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +1 -1
  814. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +7 -2
  815. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +1 -1
  816. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts +1 -1
  817. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts.map +1 -1
  818. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js.map +1 -1
  819. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts.map +1 -1
  820. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js +19 -0
  821. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js.map +1 -1
  822. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts +18 -5
  823. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts.map +1 -1
  824. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js.map +1 -1
  825. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +1 -1
  826. package/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +1 -1
  827. package/node_modules/@earendil-works/pi-agent-core/dist/index.js +1 -1
  828. package/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +1 -1
  829. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts +4 -1
  830. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts.map +1 -1
  831. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
  832. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts +21 -0
  833. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts.map +1 -0
  834. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js +2 -0
  835. package/node_modules/@earendil-works/pi-agent-core/dist/search/index.js.map +1 -0
  836. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts +29 -0
  837. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts.map +1 -0
  838. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +103 -0
  839. package/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js.map +1 -0
  840. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +12 -1
  841. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
  842. package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
  843. package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  844. package/node_modules/@earendil-works/pi-ai/README.md +3 -0
  845. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  846. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +40 -14
  847. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  848. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
  849. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +16 -4
  850. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
  851. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts +69 -0
  852. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts.map +1 -0
  853. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +159 -0
  854. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js.map +1 -0
  855. package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.d.ts +3 -0
  856. package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.d.ts.map +1 -1
  857. package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js +125 -5
  858. package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js.map +1 -1
  859. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.d.ts +17 -0
  860. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.d.ts.map +1 -0
  861. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.js +14 -0
  862. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.js.map +1 -0
  863. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.d.ts +13 -0
  864. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.d.ts.map +1 -0
  865. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.js +33 -0
  866. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.js.map +1 -0
  867. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.d.ts +79 -0
  868. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.d.ts.map +1 -0
  869. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.js +360 -0
  870. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.js.map +1 -0
  871. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.d.ts +16797 -0
  872. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.d.ts.map +1 -0
  873. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.js +3828 -0
  874. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.js.map +1 -0
  875. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.d.ts +55 -0
  876. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.d.ts.map +1 -0
  877. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.js +76 -0
  878. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.js.map +1 -0
  879. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.d.ts +116 -0
  880. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.d.ts.map +1 -0
  881. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.js +16 -0
  882. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.js.map +1 -0
  883. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts +191 -0
  884. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts.map +1 -0
  885. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js +3316 -0
  886. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js.map +1 -0
  887. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.d.ts +29 -0
  888. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.d.ts.map +1 -0
  889. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.js +33 -0
  890. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.js.map +1 -0
  891. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +7 -3
  892. package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js.map +1 -1
  893. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts +1 -1
  894. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts.map +1 -1
  895. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +13 -9
  896. package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js.map +1 -1
  897. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +7 -3
  898. package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js.map +1 -1
  899. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts +1 -1
  900. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts.map +1 -1
  901. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +208 -42
  902. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
  903. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  904. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +13 -4
  905. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  906. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
  907. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +10 -7
  908. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
  909. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts +1 -0
  910. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +1 -1
  911. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +31 -7
  912. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +1 -1
  913. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
  914. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +8 -1
  915. package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
  916. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/cursor.d.ts +16 -0
  917. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/cursor.d.ts.map +1 -0
  918. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/cursor.js +234 -0
  919. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/cursor.js.map +1 -0
  920. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.d.ts.map +1 -1
  921. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js +6 -3
  922. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js.map +1 -1
  923. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.d.ts +2 -0
  924. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.d.ts.map +1 -1
  925. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js +5 -0
  926. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js.map +1 -1
  927. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +44 -9
  928. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js.map +1 -1
  929. package/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts +2 -0
  930. package/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts.map +1 -1
  931. package/node_modules/@earendil-works/pi-ai/dist/auth/types.js.map +1 -1
  932. package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.d.ts.map +1 -1
  933. package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js +2 -0
  934. package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js.map +1 -1
  935. package/node_modules/@earendil-works/pi-ai/dist/compat.d.ts +1 -0
  936. package/node_modules/@earendil-works/pi-ai/dist/compat.d.ts.map +1 -1
  937. package/node_modules/@earendil-works/pi-ai/dist/compat.js +3 -0
  938. package/node_modules/@earendil-works/pi-ai/dist/compat.js.map +1 -1
  939. package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.d.ts +11 -0
  940. package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.d.ts.map +1 -0
  941. package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.js +11 -0
  942. package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.js.map +1 -0
  943. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +3 -0
  944. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
  945. package/node_modules/@earendil-works/pi-ai/dist/index.js +2 -0
  946. package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
  947. package/node_modules/@earendil-works/pi-ai/dist/model.d.ts +6 -1
  948. package/node_modules/@earendil-works/pi-ai/dist/model.d.ts.map +1 -1
  949. package/node_modules/@earendil-works/pi-ai/dist/model.js.map +1 -1
  950. package/node_modules/@earendil-works/pi-ai/dist/providers/all.d.ts.map +1 -1
  951. package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +2 -0
  952. package/node_modules/@earendil-works/pi-ai/dist/providers/all.js.map +1 -1
  953. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts +12 -0
  954. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts.map +1 -0
  955. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js +65 -0
  956. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js.map +1 -0
  957. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  958. package/node_modules/@earendil-works/pi-ai/dist/providers/data/alibaba-token-plan.json +1 -1
  959. package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
  960. package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
  961. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cerebras.json +1 -1
  962. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  963. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
  964. package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
  965. package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
  966. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  967. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  968. package/node_modules/@earendil-works/pi-ai/dist/providers/data/kimi-coding.json +1 -1
  969. package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
  970. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
  971. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
  972. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
  973. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  974. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
  975. package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
  976. package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
  977. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  978. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
  979. package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
  980. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +17 -4
  981. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  982. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  983. package/node_modules/@earendil-works/pi-ai/dist/utils/block-symbols.d.ts +57 -0
  984. package/node_modules/@earendil-works/pi-ai/dist/utils/block-symbols.d.ts.map +1 -0
  985. package/node_modules/@earendil-works/pi-ai/dist/utils/block-symbols.js +57 -0
  986. package/node_modules/@earendil-works/pi-ai/dist/utils/block-symbols.js.map +1 -0
  987. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts +10 -0
  988. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
  989. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +22 -0
  990. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
  991. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
  992. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +2 -0
  993. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
  994. package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.d.ts +2 -0
  995. package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.d.ts.map +1 -0
  996. package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.js +12 -0
  997. package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.js.map +1 -0
  998. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
  999. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +3 -2
  1000. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
  1001. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts.map +1 -1
  1002. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +1 -0
  1003. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
  1004. package/node_modules/@earendil-works/pi-ai/dist/utils/validation.d.ts.map +1 -1
  1005. package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js +34 -0
  1006. package/node_modules/@earendil-works/pi-ai/dist/utils/validation.js.map +1 -1
  1007. package/node_modules/@earendil-works/pi-ai/package.json +3 -2
  1008. package/node_modules/@earendil-works/pi-pty/package.json +1 -1
  1009. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  1010. package/node_modules/@earendil-works/pi-tui/README.md +1 -1
  1011. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts +26 -0
  1012. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts.map +1 -0
  1013. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js +121 -0
  1014. package/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js.map +1 -0
  1015. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
  1016. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +21 -0
  1017. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
  1018. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +1 -1
  1019. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  1020. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +6 -1
  1021. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +1 -1
  1022. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +23 -7
  1023. package/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +1 -1
  1024. package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.d.ts +9 -0
  1025. package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.d.ts.map +1 -0
  1026. package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.js +82 -0
  1027. package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.js.map +1 -0
  1028. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +4 -1
  1029. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  1030. package/node_modules/@earendil-works/pi-tui/dist/index.js +7 -1
  1031. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  1032. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +30 -0
  1033. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
  1034. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +24 -0
  1035. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
  1036. package/node_modules/@earendil-works/pi-tui/dist/layout.d.ts.map +1 -1
  1037. package/node_modules/@earendil-works/pi-tui/dist/layout.js +9 -2
  1038. package/node_modules/@earendil-works/pi-tui/dist/layout.js.map +1 -1
  1039. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +8 -2
  1040. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +1 -1
  1041. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +6 -2
  1042. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +1 -1
  1043. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +6 -0
  1044. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  1045. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +18 -1
  1046. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  1047. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +21 -0
  1048. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
  1049. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +243 -5
  1050. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
  1051. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +2 -0
  1052. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
  1053. package/node_modules/@earendil-works/pi-tui/dist/tui.js +33 -8
  1054. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
  1055. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  1056. package/package.json +11 -8
  1057. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search.d.ts +0 -19
  1058. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search.d.ts.map +0 -1
  1059. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search.js +0 -41
  1060. package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/search.js.map +0 -1
@@ -0,0 +1,731 @@
1
+ // Copyright 2021-2026 Buf Technologies, Inc.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ import { ScalarType, } from "./descriptors.js";
15
+ import { protoInt64 } from "./proto-int64.js";
16
+ import { create } from "./create.js";
17
+ import { reflect } from "./reflect/reflect.js";
18
+ import { FieldError, isFieldError } from "./reflect/error.js";
19
+ import { formatVal } from "./reflect/reflect-check.js";
20
+ import { protoSnakeCase } from "./reflect/names.js";
21
+ import { base64Decode } from "./wire/base64-encoding.js";
22
+ import { hasCustomJsonRepresentation, isWrapperDesc, anyPack, ListValueSchema, NullValue, StructSchema, ValueSchema, } from "./wkt/index.js";
23
+ import { createExtensionContainer, setExtension } from "./extensions.js";
24
+ function makeReadContext(options) {
25
+ return Object.assign(Object.assign({ ignoreUnknownFields: false, recursionLimit: 100 }, options), { depth: 0 });
26
+ }
27
+ /**
28
+ * Parse a message from a JSON string.
29
+ *
30
+ * Duplicate keys are rejected.
31
+ */
32
+ export function fromJsonString(schema, json, options) {
33
+ return fromJson(schema, parseJsonString(json, schema.typeName), options);
34
+ }
35
+ /**
36
+ * Parse a message from a JSON string, merging fields into the target.
37
+ *
38
+ * Repeated fields are appended. Map entries are added, overwriting
39
+ * existing keys.
40
+ *
41
+ * If a message field is already present, it will be merged with the
42
+ * new data.
43
+ *
44
+ * Duplicate keys in the JSON are rejected, as in `fromJsonString`.
45
+ */
46
+ export function mergeFromJsonString(schema, target, json, options) {
47
+ return mergeFromJson(schema, target, parseJsonString(json, schema.typeName), options);
48
+ }
49
+ /**
50
+ * Parse a message from a JSON value.
51
+ *
52
+ * Duplicate keys are rejected, but a value parsed by JSON.parse has already
53
+ * dropped duplicates (the last one wins). Use `fromJsonString` for strict
54
+ * duplicate-key checking.
55
+ */
56
+ export function fromJson(schema, json, options) {
57
+ const msg = reflect(schema);
58
+ try {
59
+ readMessage(msg, json, makeReadContext(options));
60
+ }
61
+ catch (e) {
62
+ if (isFieldError(e)) {
63
+ // @ts-expect-error we use the ES2022 error CTOR option "cause" for better stack traces
64
+ throw new Error(`cannot decode ${e.field()} from JSON: ${e.message}`, {
65
+ cause: e,
66
+ });
67
+ }
68
+ throw e;
69
+ }
70
+ return msg.message;
71
+ }
72
+ /**
73
+ * Parse a message from a JSON value, merging fields into the target.
74
+ *
75
+ * Repeated fields are appended. Map entries are added, overwriting
76
+ * existing keys.
77
+ *
78
+ * If a message field is already present, it will be merged with the
79
+ * new data.
80
+ *
81
+ * Duplicate keys are rejected as in `fromJson`; use `mergeFromJsonString`
82
+ * for strict checking.
83
+ */
84
+ export function mergeFromJson(schema, target, json, options) {
85
+ try {
86
+ readMessage(reflect(schema, target), json, makeReadContext(options));
87
+ }
88
+ catch (e) {
89
+ if (isFieldError(e)) {
90
+ // @ts-expect-error we use the ES2022 error CTOR option "cause" for better stack traces
91
+ throw new Error(`cannot decode ${e.field()} from JSON: ${e.message}`, {
92
+ cause: e,
93
+ });
94
+ }
95
+ throw e;
96
+ }
97
+ return target;
98
+ }
99
+ /**
100
+ * Parses an enum value from JSON.
101
+ */
102
+ export function enumFromJson(descEnum, json) {
103
+ return readEnum(descEnum, json, false);
104
+ }
105
+ /**
106
+ * Is the given value a JSON enum value?
107
+ */
108
+ export function isEnumJson(descEnum, value) {
109
+ return undefined !== descEnum.values.find((v) => v.name === value);
110
+ }
111
+ const messageJsonFields = new WeakMap();
112
+ function getJsonField(desc, jsonKey) {
113
+ var _a;
114
+ if (!messageJsonFields.has(desc)) {
115
+ const jsonNames = new Map();
116
+ for (const field of desc.fields) {
117
+ jsonNames.set(field.name, field).set(field.jsonName, field);
118
+ }
119
+ messageJsonFields.set(desc, jsonNames);
120
+ }
121
+ return (_a = messageJsonFields.get(desc)) === null || _a === void 0 ? void 0 : _a.get(jsonKey);
122
+ }
123
+ function readMessage(msg, json, ctx) {
124
+ var _a;
125
+ if (++ctx.depth > ctx.recursionLimit) {
126
+ throw new Error(`cannot decode ${msg.desc} from JSON: maximum recursion depth of ${ctx.recursionLimit} reached`);
127
+ }
128
+ if (tryWktFromJson(msg, json, ctx)) {
129
+ ctx.depth--;
130
+ return;
131
+ }
132
+ if (json == null || Array.isArray(json) || typeof json != "object") {
133
+ throw new Error(`cannot decode ${msg.desc} from JSON: ${formatVal(json)}`);
134
+ }
135
+ const oneofSeen = new Map();
136
+ const fieldSeen = new Set();
137
+ for (const [jsonKey, jsonValue] of Object.entries(json)) {
138
+ const field = getJsonField(msg.desc, jsonKey);
139
+ if (field) {
140
+ if (fieldSeen.has(field)) {
141
+ // The same field may be set by its proto name and its JSON name, or by
142
+ // a duplicate or unicode-escaped key that JSON.parse already collapsed.
143
+ // Checked before the null-skip below so that a null entry still counts.
144
+ throw new FieldError(field, "set multiple times");
145
+ }
146
+ fieldSeen.add(field);
147
+ if (field.oneof && jsonValue === null && field.fieldKind == "scalar") {
148
+ // see conformance test Required.Proto3.JsonInput.OneofFieldNull{First,Second}
149
+ continue;
150
+ }
151
+ if (field.oneof) {
152
+ const seen = oneofSeen.get(field.oneof);
153
+ if (seen !== undefined) {
154
+ throw new FieldError(field.oneof, `oneof set multiple times by ${seen.name} and ${field.name}`);
155
+ }
156
+ oneofSeen.set(field.oneof, field);
157
+ }
158
+ readField(msg, field, jsonValue, ctx);
159
+ }
160
+ else {
161
+ let extension = undefined;
162
+ if (jsonKey.startsWith("[") &&
163
+ jsonKey.endsWith("]") &&
164
+ // biome-ignore lint/suspicious/noAssignInExpressions: no
165
+ (extension = (_a = ctx.registry) === null || _a === void 0 ? void 0 : _a.getExtension(jsonKey.substring(1, jsonKey.length - 1))) &&
166
+ extension.extendee.typeName === msg.desc.typeName) {
167
+ const [container, field, get] = createExtensionContainer(extension);
168
+ readField(container, field, jsonValue, ctx);
169
+ setExtension(msg.message, extension, get());
170
+ }
171
+ if (!extension && !ctx.ignoreUnknownFields) {
172
+ throw new Error(`cannot decode ${msg.desc} from JSON: key "${jsonKey}" is unknown`);
173
+ }
174
+ }
175
+ }
176
+ ctx.depth--;
177
+ }
178
+ function readField(msg, field, json, ctx) {
179
+ switch (field.fieldKind) {
180
+ case "scalar":
181
+ readScalarField(msg, field, json);
182
+ break;
183
+ case "enum":
184
+ readEnumField(msg, field, json, ctx);
185
+ break;
186
+ case "message":
187
+ readMessageField(msg, field, json, ctx);
188
+ break;
189
+ case "list":
190
+ readListField(msg.get(field), json, ctx);
191
+ break;
192
+ case "map":
193
+ readMapField(msg.get(field), json, ctx);
194
+ break;
195
+ }
196
+ }
197
+ function readListOrMapItem(field, json, ctx) {
198
+ if (field.scalar && json !== null) {
199
+ return scalarFromJson(field, json);
200
+ }
201
+ if (field.message && !isResetSentinelNullValue(field, json)) {
202
+ const msgValue = reflect(field.message);
203
+ readMessage(msgValue, json, ctx);
204
+ return msgValue;
205
+ }
206
+ if (field.enum && !isResetSentinelNullValue(field, json)) {
207
+ return readEnum(field.enum, json, ctx.ignoreUnknownFields);
208
+ }
209
+ throw new FieldError(field, `${field.fieldKind === "list" ? "list item" : "map value"} must not be null`);
210
+ }
211
+ function readMapField(map, json, ctx) {
212
+ if (json === null) {
213
+ return;
214
+ }
215
+ const field = map.field();
216
+ if (typeof json != "object" || Array.isArray(json)) {
217
+ throw new FieldError(field, "expected object, got " + formatVal(json));
218
+ }
219
+ const seen = new Set();
220
+ for (const [jsonMapKey, jsonMapValue] of Object.entries(json)) {
221
+ const key = mapKeyFromJson(field.mapKey, jsonMapKey);
222
+ if (seen.has(key)) {
223
+ throw new FieldError(field, `duplicate map key "${jsonMapKey}"`);
224
+ }
225
+ seen.add(key);
226
+ const value = readListOrMapItem(field, jsonMapValue, ctx);
227
+ if (value !== tokenIgnoredUnknownEnum) {
228
+ map.set(key, value);
229
+ }
230
+ }
231
+ }
232
+ function readListField(list, json, ctx) {
233
+ if (json === null) {
234
+ return;
235
+ }
236
+ const field = list.field();
237
+ if (!Array.isArray(json)) {
238
+ throw new FieldError(field, "expected Array, got " + formatVal(json));
239
+ }
240
+ for (const jsonItem of json) {
241
+ const value = readListOrMapItem(field, jsonItem, ctx);
242
+ if (value !== tokenIgnoredUnknownEnum) {
243
+ list.add(value);
244
+ }
245
+ }
246
+ }
247
+ function readMessageField(msg, field, json, ctx) {
248
+ if (isResetSentinelNullValue(field, json)) {
249
+ msg.clear(field);
250
+ return;
251
+ }
252
+ const msgValue = msg.isSet(field) ? msg.get(field) : reflect(field.message);
253
+ readMessage(msgValue, json, ctx);
254
+ msg.set(field, msgValue);
255
+ }
256
+ function readEnumField(msg, field, json, ctx) {
257
+ if (isResetSentinelNullValue(field, json)) {
258
+ msg.clear(field);
259
+ return;
260
+ }
261
+ const enumValue = readEnum(field.enum, json, ctx.ignoreUnknownFields);
262
+ if (enumValue !== tokenIgnoredUnknownEnum) {
263
+ msg.set(field, enumValue);
264
+ }
265
+ }
266
+ function readScalarField(msg, field, json) {
267
+ if (json === null) {
268
+ msg.clear(field);
269
+ }
270
+ else {
271
+ msg.set(field, scalarFromJson(field, json));
272
+ }
273
+ }
274
+ /**
275
+ * Indicates whether a value is a sentinel for reseting a field.
276
+ *
277
+ * For this to be true, the value must be a JSON null and the field must not
278
+ * permit a present, Protobuf-serializable null.
279
+ *
280
+ * Only message google.protobuf.Value and enum google.protobuf.NullValue fields
281
+ * permit Protobuf-serializable nulls.
282
+ *
283
+ * Note that field-resetting sentinel nulls are not permitted in lists and maps.
284
+ */
285
+ function isResetSentinelNullValue(field, json) {
286
+ var _a, _b;
287
+ return (json === null &&
288
+ ((_a = field.message) === null || _a === void 0 ? void 0 : _a.typeName) != "google.protobuf.Value" &&
289
+ ((_b = field.enum) === null || _b === void 0 ? void 0 : _b.typeName) != "google.protobuf.NullValue");
290
+ }
291
+ const tokenIgnoredUnknownEnum = Symbol();
292
+ function readEnum(desc, json, ignoreUnknownFields) {
293
+ if (json === null) {
294
+ return desc.values[0].number;
295
+ }
296
+ switch (typeof json) {
297
+ case "number":
298
+ if (Number.isInteger(json)) {
299
+ return json;
300
+ }
301
+ break;
302
+ case "string":
303
+ const value = desc.values.find((ev) => ev.name === json);
304
+ if (value !== undefined) {
305
+ return value.number;
306
+ }
307
+ if (ignoreUnknownFields) {
308
+ return tokenIgnoredUnknownEnum;
309
+ }
310
+ break;
311
+ }
312
+ throw new Error(`cannot decode ${desc} from JSON: ${formatVal(json)}`);
313
+ }
314
+ /**
315
+ * Try to parse a JSON value to a scalar value for the reflect API.
316
+ *
317
+ * Returns the input if the JSON value cannot be converted. Raises a FieldError
318
+ * if conversion would be ambiguous.
319
+ */
320
+ function scalarFromJson(field, json) {
321
+ // int64, sfixed64, sint64, fixed64, uint64: Reflect supports string and number.
322
+ // string, bool: Supported by reflect.
323
+ switch (field.scalar) {
324
+ // float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity".
325
+ // Either numbers or strings are accepted. Exponent notation is also accepted.
326
+ case ScalarType.DOUBLE:
327
+ case ScalarType.FLOAT:
328
+ if (json === "NaN")
329
+ return NaN;
330
+ if (json === "Infinity")
331
+ return Number.POSITIVE_INFINITY;
332
+ if (json === "-Infinity")
333
+ return Number.NEGATIVE_INFINITY;
334
+ if (typeof json == "number") {
335
+ if (Number.isNaN(json)) {
336
+ // NaN must be encoded with string constants
337
+ throw new FieldError(field, "unexpected NaN number");
338
+ }
339
+ if (!Number.isFinite(json)) {
340
+ // Infinity must be encoded with string constants
341
+ throw new FieldError(field, "unexpected infinite number");
342
+ }
343
+ break;
344
+ }
345
+ if (typeof json == "string") {
346
+ if (json === "") {
347
+ // empty string is not a number
348
+ break;
349
+ }
350
+ if (json.trim().length !== json.length) {
351
+ // extra whitespace
352
+ break;
353
+ }
354
+ const float = Number(json);
355
+ if (!Number.isFinite(float)) {
356
+ // Infinity and NaN must be encoded with string constants
357
+ break;
358
+ }
359
+ return float;
360
+ }
361
+ break;
362
+ // int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.
363
+ case ScalarType.INT32:
364
+ case ScalarType.FIXED32:
365
+ case ScalarType.SFIXED32:
366
+ case ScalarType.SINT32:
367
+ case ScalarType.UINT32:
368
+ return int32FromJson(json);
369
+ // bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.
370
+ // Either standard or URL-safe base64 encoding with/without paddings are accepted.
371
+ case ScalarType.BYTES:
372
+ if (typeof json == "string") {
373
+ if (json === "") {
374
+ return new Uint8Array(0);
375
+ }
376
+ try {
377
+ return base64Decode(json);
378
+ }
379
+ catch (e) {
380
+ const message = e instanceof Error ? e.message : String(e);
381
+ throw new FieldError(field, message);
382
+ }
383
+ }
384
+ break;
385
+ }
386
+ return json;
387
+ }
388
+ /**
389
+ * Try to parse a JSON value to a map key for the reflect API.
390
+ * Canonicalizes 64-bit integers given as string, so that "01 and "1" are one
391
+ * key, and duplicates can raise an error.
392
+ * Returns the input if the JSON value cannot be converted.
393
+ */
394
+ function mapKeyFromJson(type, jsonString) {
395
+ switch (type) {
396
+ case ScalarType.BOOL:
397
+ switch (jsonString) {
398
+ case "true":
399
+ return true;
400
+ case "false":
401
+ return false;
402
+ }
403
+ return jsonString;
404
+ case ScalarType.INT32:
405
+ case ScalarType.FIXED32:
406
+ case ScalarType.UINT32:
407
+ case ScalarType.SFIXED32:
408
+ case ScalarType.SINT32:
409
+ return int32FromJson(jsonString);
410
+ case ScalarType.INT64:
411
+ case ScalarType.SINT64:
412
+ case ScalarType.SFIXED64:
413
+ case ScalarType.UINT64:
414
+ case ScalarType.FIXED64:
415
+ return /^-?0+$/.test(jsonString)
416
+ ? "0"
417
+ : jsonString.replace(/^(-?)0+(?=\d)/, "$1");
418
+ default:
419
+ return jsonString;
420
+ }
421
+ }
422
+ /**
423
+ * Try to parse a JSON value to a 32-bit integer for the reflect API.
424
+ *
425
+ * Returns the input if the JSON value cannot be converted.
426
+ */
427
+ function int32FromJson(json) {
428
+ if (typeof json == "string") {
429
+ if (json === "") {
430
+ // empty string is not a number
431
+ return json;
432
+ }
433
+ if (json.trim().length !== json.length) {
434
+ // extra whitespace
435
+ return json;
436
+ }
437
+ const num = Number(json);
438
+ if (Number.isNaN(num)) {
439
+ // not a number
440
+ return json;
441
+ }
442
+ return num;
443
+ }
444
+ return json;
445
+ }
446
+ /**
447
+ * Parse a JSON string, rejecting duplicate object keys (which JSON.parse would
448
+ * otherwise silently merge).
449
+ */
450
+ function parseJsonString(jsonString, typeName) {
451
+ let json;
452
+ try {
453
+ json = JSON.parse(jsonString);
454
+ }
455
+ catch (e) {
456
+ const message = e instanceof Error ? e.message : String(e);
457
+ throw new Error(`cannot decode message ${typeName} from JSON: ${message}`,
458
+ // @ts-expect-error we use the ES2022 error CTOR option "cause" for better stack traces
459
+ { cause: e });
460
+ }
461
+ checkDuplicateKeys(jsonString, typeName);
462
+ return json;
463
+ }
464
+ /**
465
+ * Scan a JSON string for duplicate object member names at any depth, throwing
466
+ * if any are found. JSON.parse() silently keeps the last of duplicate keys, so
467
+ * this raw-string scan is the only way to reject them. It must only be called
468
+ * with a string that JSON.parse() has already accepted, so it can assume the
469
+ * input is well-formed.
470
+ */
471
+ function checkDuplicateKeys(jsonString, typeName) {
472
+ // One Set of seen member names for each open object; arrays push null.
473
+ const stack = [];
474
+ // Whether the next string token is an object member name.
475
+ let expectKey = false;
476
+ let i = 0;
477
+ while (i < jsonString.length) {
478
+ switch (jsonString[i]) {
479
+ case "{":
480
+ stack.push(new Set());
481
+ expectKey = true;
482
+ i++;
483
+ break;
484
+ case "[":
485
+ stack.push(null);
486
+ expectKey = false;
487
+ i++;
488
+ break;
489
+ case "}":
490
+ case "]":
491
+ stack.pop();
492
+ expectKey = false;
493
+ i++;
494
+ break;
495
+ case ",":
496
+ expectKey = stack[stack.length - 1] != null;
497
+ i++;
498
+ break;
499
+ case ":":
500
+ expectKey = false;
501
+ i++;
502
+ break;
503
+ case '"': {
504
+ const open = i++;
505
+ let escaped = false;
506
+ while (i < jsonString.length) {
507
+ if (jsonString[i] == "\\") {
508
+ escaped = true;
509
+ i += 2; // skip the backslash and the character it escapes
510
+ continue;
511
+ }
512
+ if (jsonString[i] == '"') {
513
+ break;
514
+ }
515
+ i++;
516
+ }
517
+ const close = i++;
518
+ const seen = stack[stack.length - 1];
519
+ if (expectKey && seen) {
520
+ // Decode escapes (rare) so that, for example, a key written with a
521
+ // unicode escape collides with the same key written literally.
522
+ const name = escaped
523
+ ? JSON.parse(jsonString.substring(open, close + 1))
524
+ : jsonString.substring(open + 1, close);
525
+ if (seen.has(name)) {
526
+ throw new Error(`cannot decode message ${typeName} from JSON: duplicate object key "${name}"`);
527
+ }
528
+ seen.add(name);
529
+ }
530
+ expectKey = false;
531
+ break;
532
+ }
533
+ default:
534
+ i++;
535
+ break;
536
+ }
537
+ }
538
+ }
539
+ function tryWktFromJson(msg, jsonValue, ctx) {
540
+ if (!msg.desc.typeName.startsWith("google.protobuf.")) {
541
+ return false;
542
+ }
543
+ switch (msg.desc.typeName) {
544
+ case "google.protobuf.Any":
545
+ anyFromJson(msg.message, jsonValue, ctx);
546
+ return true;
547
+ case "google.protobuf.Timestamp":
548
+ timestampFromJson(msg.message, jsonValue);
549
+ return true;
550
+ case "google.protobuf.Duration":
551
+ durationFromJson(msg.message, jsonValue);
552
+ return true;
553
+ case "google.protobuf.FieldMask":
554
+ fieldMaskFromJson(msg.message, jsonValue);
555
+ return true;
556
+ case "google.protobuf.Struct":
557
+ structFromJson(msg.message, jsonValue, ctx);
558
+ return true;
559
+ case "google.protobuf.Value":
560
+ valueFromJson(msg.message, jsonValue, ctx);
561
+ return true;
562
+ case "google.protobuf.ListValue":
563
+ listValueFromJson(msg.message, jsonValue, ctx);
564
+ return true;
565
+ default:
566
+ if (isWrapperDesc(msg.desc)) {
567
+ const valueField = msg.desc.fields[0];
568
+ if (jsonValue === null) {
569
+ msg.clear(valueField);
570
+ }
571
+ else {
572
+ msg.set(valueField, scalarFromJson(valueField, jsonValue));
573
+ }
574
+ return true;
575
+ }
576
+ return false;
577
+ }
578
+ }
579
+ function anyFromJson(any, json, ctx) {
580
+ var _a;
581
+ if (json === null || Array.isArray(json) || typeof json != "object") {
582
+ throw new Error(`cannot decode message ${any.$typeName} from JSON: expected object but got ${formatVal(json)}`);
583
+ }
584
+ if (Object.keys(json).length == 0) {
585
+ return;
586
+ }
587
+ const typeUrl = json["@type"];
588
+ if (typeof typeUrl != "string" || typeUrl == "") {
589
+ throw new Error(`cannot decode message ${any.$typeName} from JSON: "@type" is empty`);
590
+ }
591
+ const typeName = typeUrl.includes("/")
592
+ ? typeUrl.substring(typeUrl.lastIndexOf("/") + 1)
593
+ : typeUrl;
594
+ if (!typeName.length) {
595
+ throw new Error(`cannot decode message ${any.$typeName} from JSON: "@type" is invalid`);
596
+ }
597
+ const desc = (_a = ctx.registry) === null || _a === void 0 ? void 0 : _a.getMessage(typeName);
598
+ if (!desc) {
599
+ throw new Error(`cannot decode message ${any.$typeName} from JSON: ${typeUrl} is not in the type registry`);
600
+ }
601
+ const msg = reflect(desc);
602
+ if (hasCustomJsonRepresentation(desc) &&
603
+ Object.prototype.hasOwnProperty.call(json, "value")) {
604
+ const value = json.value;
605
+ readMessage(msg, value, ctx);
606
+ }
607
+ else {
608
+ const copy = Object.assign({}, json);
609
+ // biome-ignore lint/performance/noDelete: <explanation>
610
+ delete copy["@type"];
611
+ readMessage(msg, copy, ctx);
612
+ }
613
+ anyPack(msg.desc, msg.message, any);
614
+ }
615
+ function timestampFromJson(timestamp, json) {
616
+ if (typeof json !== "string") {
617
+ throw new Error(`cannot decode message ${timestamp.$typeName} from JSON: ${formatVal(json)}`);
618
+ }
619
+ const matches = json.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:\.([0-9]{1,9}))?(?:Z|([+-][0-9][0-9]:[0-9][0-9]))$/);
620
+ if (!matches) {
621
+ throw new Error(`cannot decode message ${timestamp.$typeName} from JSON: invalid RFC 3339 string`);
622
+ }
623
+ const ms = Date.parse(
624
+ // biome-ignore format: want this to read well
625
+ matches[1] + "-" + matches[2] + "-" + matches[3] + "T" + matches[4] + ":" + matches[5] + ":" + matches[6] + (matches[8] ? matches[8] : "Z"));
626
+ if (Number.isNaN(ms)) {
627
+ throw new Error(`cannot decode message ${timestamp.$typeName} from JSON: invalid RFC 3339 string`);
628
+ }
629
+ if (ms < Date.parse("0001-01-01T00:00:00Z") ||
630
+ ms > Date.parse("9999-12-31T23:59:59Z")) {
631
+ throw new Error(`cannot decode message ${timestamp.$typeName} from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);
632
+ }
633
+ timestamp.seconds = protoInt64.parse(ms / 1000);
634
+ timestamp.nanos = 0;
635
+ if (matches[7]) {
636
+ timestamp.nanos =
637
+ parseInt("1" + matches[7] + "0".repeat(9 - matches[7].length)) -
638
+ 1000000000;
639
+ }
640
+ }
641
+ function durationFromJson(duration, json) {
642
+ if (typeof json !== "string") {
643
+ throw new Error(`cannot decode message ${duration.$typeName} from JSON: ${formatVal(json)}`);
644
+ }
645
+ const match = json.match(/^(-?[0-9]+)(?:\.([0-9]+))?s/);
646
+ if (match === null) {
647
+ throw new Error(`cannot decode message ${duration.$typeName} from JSON: ${formatVal(json)}`);
648
+ }
649
+ const longSeconds = Number(match[1]);
650
+ if (longSeconds > 315576000000 || longSeconds < -315576000000) {
651
+ throw new Error(`cannot decode message ${duration.$typeName} from JSON: ${formatVal(json)}`);
652
+ }
653
+ duration.seconds = protoInt64.parse(longSeconds);
654
+ if (typeof match[2] !== "string") {
655
+ return;
656
+ }
657
+ const nanosStr = match[2] + "0".repeat(9 - match[2].length);
658
+ duration.nanos = parseInt(nanosStr);
659
+ if (longSeconds < 0 || Object.is(longSeconds, -0)) {
660
+ duration.nanos = -duration.nanos;
661
+ }
662
+ }
663
+ function fieldMaskFromJson(fieldMask, json) {
664
+ if (typeof json !== "string") {
665
+ throw new Error(`cannot decode message ${fieldMask.$typeName} from JSON: ${formatVal(json)}`);
666
+ }
667
+ if (json === "") {
668
+ return;
669
+ }
670
+ fieldMask.paths = json.split(",").map((path) => {
671
+ if (path.includes("_")) {
672
+ throw new Error(`cannot decode message ${fieldMask.$typeName} from JSON: path names must be lowerCamelCase`);
673
+ }
674
+ return protoSnakeCase(path);
675
+ });
676
+ }
677
+ function structFromJson(struct, json, ctx) {
678
+ if (typeof json != "object" || json == null || Array.isArray(json)) {
679
+ throw new Error(`cannot decode message ${struct.$typeName} from JSON ${formatVal(json)}`);
680
+ }
681
+ for (const [k, v] of Object.entries(json)) {
682
+ const parsedV = create(ValueSchema);
683
+ valueFromJson(parsedV, v, ctx);
684
+ struct.fields[k] = parsedV;
685
+ }
686
+ }
687
+ function valueFromJson(value, json, ctx) {
688
+ if (++ctx.depth > ctx.recursionLimit) {
689
+ throw new Error(`cannot decode ${value.$typeName} from JSON: maximum recursion depth of ${ctx.recursionLimit} reached`);
690
+ }
691
+ switch (typeof json) {
692
+ case "number":
693
+ value.kind = { case: "numberValue", value: json };
694
+ break;
695
+ case "string":
696
+ value.kind = { case: "stringValue", value: json };
697
+ break;
698
+ case "boolean":
699
+ value.kind = { case: "boolValue", value: json };
700
+ break;
701
+ case "object":
702
+ if (json === null) {
703
+ value.kind = { case: "nullValue", value: NullValue.NULL_VALUE };
704
+ }
705
+ else if (Array.isArray(json)) {
706
+ const listValue = create(ListValueSchema);
707
+ listValueFromJson(listValue, json, ctx);
708
+ value.kind = { case: "listValue", value: listValue };
709
+ }
710
+ else {
711
+ const struct = create(StructSchema);
712
+ structFromJson(struct, json, ctx);
713
+ value.kind = { case: "structValue", value: struct };
714
+ }
715
+ break;
716
+ default:
717
+ throw new Error(`cannot decode message ${value.$typeName} from JSON ${formatVal(json)}`);
718
+ }
719
+ ctx.depth--;
720
+ return value;
721
+ }
722
+ function listValueFromJson(listValue, json, ctx) {
723
+ if (!Array.isArray(json)) {
724
+ throw new Error(`cannot decode message ${listValue.$typeName} from JSON ${formatVal(json)}`);
725
+ }
726
+ for (const e of json) {
727
+ const value = create(ValueSchema);
728
+ valueFromJson(value, e, ctx);
729
+ listValue.values.push(value);
730
+ }
731
+ }