@code-yeongyu/senpi 2026.8.16 → 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 (625) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/dist/bun/cli.js +1 -0
  3. package/dist/bun/cli.js.map +1 -1
  4. package/dist/bun/register-cursor-agent.d.ts +2 -0
  5. package/dist/bun/register-cursor-agent.d.ts.map +1 -0
  6. package/dist/bun/register-cursor-agent.js +4 -0
  7. package/dist/bun/register-cursor-agent.js.map +1 -0
  8. package/dist/core/agent-session-services.js +2 -2
  9. package/dist/core/agent-session-services.js.map +1 -1
  10. package/dist/core/agent-session.d.ts +48 -5
  11. package/dist/core/agent-session.d.ts.map +1 -1
  12. package/dist/core/agent-session.js +239 -61
  13. package/dist/core/agent-session.js.map +1 -1
  14. package/dist/core/cursor-exec-bridge-session.d.ts +11 -0
  15. package/dist/core/cursor-exec-bridge-session.d.ts.map +1 -0
  16. package/dist/core/cursor-exec-bridge-session.js +17 -0
  17. package/dist/core/cursor-exec-bridge-session.js.map +1 -0
  18. package/dist/core/cursor-exec-bridge.d.ts +52 -0
  19. package/dist/core/cursor-exec-bridge.d.ts.map +1 -0
  20. package/dist/core/cursor-exec-bridge.js +196 -0
  21. package/dist/core/cursor-exec-bridge.js.map +1 -0
  22. package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.d.ts +28 -0
  23. package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.d.ts.map +1 -0
  24. package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.js +278 -0
  25. package/dist/core/extensions/builtin/cursor-cli-oauth/account-command.js.map +1 -0
  26. package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.d.ts +38 -0
  27. package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.d.ts.map +1 -0
  28. package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.js +75 -0
  29. package/dist/core/extensions/builtin/cursor-cli-oauth/accounts.js.map +1 -0
  30. package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.d.ts +24 -0
  31. package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.d.ts.map +1 -0
  32. package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.js +64 -0
  33. package/dist/core/extensions/builtin/cursor-cli-oauth/affinity.js.map +1 -0
  34. package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.d.ts +139 -0
  35. package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.d.ts.map +1 -0
  36. package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.js +362 -0
  37. package/dist/core/extensions/builtin/cursor-cli-oauth/diagnostics.js.map +1 -0
  38. package/dist/core/extensions/builtin/cursor-cli-oauth/errors.d.ts +19 -0
  39. package/dist/core/extensions/builtin/cursor-cli-oauth/errors.d.ts.map +1 -0
  40. package/dist/core/extensions/builtin/cursor-cli-oauth/errors.js +122 -0
  41. package/dist/core/extensions/builtin/cursor-cli-oauth/errors.js.map +1 -0
  42. package/dist/core/extensions/builtin/cursor-cli-oauth/executable.d.ts +30 -0
  43. package/dist/core/extensions/builtin/cursor-cli-oauth/executable.d.ts.map +1 -0
  44. package/dist/core/extensions/builtin/cursor-cli-oauth/executable.js +117 -0
  45. package/dist/core/extensions/builtin/cursor-cli-oauth/executable.js.map +1 -0
  46. package/dist/core/extensions/builtin/cursor-cli-oauth/failover.d.ts +39 -0
  47. package/dist/core/extensions/builtin/cursor-cli-oauth/failover.d.ts.map +1 -0
  48. package/dist/core/extensions/builtin/cursor-cli-oauth/failover.js +155 -0
  49. package/dist/core/extensions/builtin/cursor-cli-oauth/failover.js.map +1 -0
  50. package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.d.ts +89 -0
  51. package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.d.ts.map +1 -0
  52. package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.js +147 -0
  53. package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.js.map +1 -0
  54. package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.d.ts +20 -0
  55. package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.d.ts.map +1 -0
  56. package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.js +99 -0
  57. package/dist/core/extensions/builtin/cursor-cli-oauth/home-store.js.map +1 -0
  58. package/dist/core/extensions/builtin/cursor-cli-oauth/index.d.ts +25 -0
  59. package/dist/core/extensions/builtin/cursor-cli-oauth/index.d.ts.map +1 -0
  60. package/dist/core/extensions/builtin/cursor-cli-oauth/index.js +67 -0
  61. package/dist/core/extensions/builtin/cursor-cli-oauth/index.js.map +1 -0
  62. package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts +27 -0
  63. package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts.map +1 -0
  64. package/dist/core/extensions/builtin/cursor-cli-oauth/models.js +242 -0
  65. package/dist/core/extensions/builtin/cursor-cli-oauth/models.js.map +1 -0
  66. package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.d.ts +73 -0
  67. package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.d.ts.map +1 -0
  68. package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.js +330 -0
  69. package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.js.map +1 -0
  70. package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.d.ts +94 -0
  71. package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.d.ts.map +1 -0
  72. package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.js +248 -0
  73. package/dist/core/extensions/builtin/cursor-cli-oauth/session-router.js.map +1 -0
  74. package/dist/core/extensions/builtin/cursor-cli-oauth/settings.d.ts +35 -0
  75. package/dist/core/extensions/builtin/cursor-cli-oauth/settings.d.ts.map +1 -0
  76. package/dist/core/extensions/builtin/cursor-cli-oauth/settings.js +186 -0
  77. package/dist/core/extensions/builtin/cursor-cli-oauth/settings.js.map +1 -0
  78. package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.d.ts +11 -0
  79. package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.d.ts.map +1 -0
  80. package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.js +17 -0
  81. package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-args.js.map +1 -0
  82. package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.d.ts +104 -0
  83. package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.d.ts.map +1 -0
  84. package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.js +301 -0
  85. package/dist/core/extensions/builtin/cursor-cli-oauth/stream-parser.js.map +1 -0
  86. package/dist/core/extensions/builtin/cursor-cli-oauth/stream.d.ts +26 -0
  87. package/dist/core/extensions/builtin/cursor-cli-oauth/stream.d.ts.map +1 -0
  88. package/dist/core/extensions/builtin/cursor-cli-oauth/stream.js +587 -0
  89. package/dist/core/extensions/builtin/cursor-cli-oauth/stream.js.map +1 -0
  90. package/dist/core/extensions/builtin/cursor-cli-oauth/transport.d.ts +43 -0
  91. package/dist/core/extensions/builtin/cursor-cli-oauth/transport.d.ts.map +1 -0
  92. package/dist/core/extensions/builtin/cursor-cli-oauth/transport.js +196 -0
  93. package/dist/core/extensions/builtin/cursor-cli-oauth/transport.js.map +1 -0
  94. package/dist/core/extensions/builtin/goal/channel-state-subscriptions.d.ts +9 -0
  95. package/dist/core/extensions/builtin/goal/channel-state-subscriptions.d.ts.map +1 -0
  96. package/dist/core/extensions/builtin/goal/channel-state-subscriptions.js +18 -0
  97. package/dist/core/extensions/builtin/goal/channel-state-subscriptions.js.map +1 -0
  98. package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
  99. package/dist/core/extensions/builtin/goal/monitor-continuation.js +10 -9
  100. package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
  101. package/dist/core/extensions/builtin/index.d.ts.map +1 -1
  102. package/dist/core/extensions/builtin/index.js +5 -2
  103. package/dist/core/extensions/builtin/index.js.map +1 -1
  104. package/dist/core/extensions/builtin/loop-guard/detectors.d.ts.map +1 -1
  105. package/dist/core/extensions/builtin/loop-guard/detectors.js +21 -3
  106. package/dist/core/extensions/builtin/loop-guard/detectors.js.map +1 -1
  107. package/dist/core/extensions/builtin/loop-guard/escalation.d.ts +24 -0
  108. package/dist/core/extensions/builtin/loop-guard/escalation.d.ts.map +1 -0
  109. package/dist/core/extensions/builtin/loop-guard/escalation.js +77 -0
  110. package/dist/core/extensions/builtin/loop-guard/escalation.js.map +1 -0
  111. package/dist/core/extensions/builtin/loop-guard/index.d.ts.map +1 -1
  112. package/dist/core/extensions/builtin/loop-guard/index.js +98 -3
  113. package/dist/core/extensions/builtin/loop-guard/index.js.map +1 -1
  114. package/dist/core/extensions/builtin/loop-guard/notice.d.ts +9 -0
  115. package/dist/core/extensions/builtin/loop-guard/notice.d.ts.map +1 -1
  116. package/dist/core/extensions/builtin/loop-guard/notice.js +17 -0
  117. package/dist/core/extensions/builtin/loop-guard/notice.js.map +1 -1
  118. package/dist/core/extensions/builtin/loop-guard/policy.d.ts +4 -0
  119. package/dist/core/extensions/builtin/loop-guard/policy.d.ts.map +1 -1
  120. package/dist/core/extensions/builtin/loop-guard/policy.js +4 -0
  121. package/dist/core/extensions/builtin/loop-guard/policy.js.map +1 -1
  122. package/dist/core/extensions/builtin/loop-guard/renderer.d.ts +2 -0
  123. package/dist/core/extensions/builtin/loop-guard/renderer.d.ts.map +1 -1
  124. package/dist/core/extensions/builtin/loop-guard/renderer.js +11 -0
  125. package/dist/core/extensions/builtin/loop-guard/renderer.js.map +1 -1
  126. package/dist/core/extensions/builtin/loop-guard/tracker.d.ts +1 -1
  127. package/dist/core/extensions/builtin/loop-guard/tracker.d.ts.map +1 -1
  128. package/dist/core/extensions/builtin/loop-guard/tracker.js +3 -1
  129. package/dist/core/extensions/builtin/loop-guard/tracker.js.map +1 -1
  130. package/dist/core/extensions/builtin/monitor-state-event.d.ts +6 -0
  131. package/dist/core/extensions/builtin/monitor-state-event.d.ts.map +1 -1
  132. package/dist/core/extensions/builtin/monitor-state-event.js +10 -0
  133. package/dist/core/extensions/builtin/monitor-state-event.js.map +1 -1
  134. package/dist/core/model-resolver.js +1 -1
  135. package/dist/core/model-resolver.js.map +1 -1
  136. package/dist/core/model-runtime.d.ts +7 -2
  137. package/dist/core/model-runtime.d.ts.map +1 -1
  138. package/dist/core/model-runtime.js +14 -2
  139. package/dist/core/model-runtime.js.map +1 -1
  140. package/dist/core/prompt-templates.d.ts +5 -0
  141. package/dist/core/prompt-templates.d.ts.map +1 -1
  142. package/dist/core/prompt-templates.js +8 -9
  143. package/dist/core/prompt-templates.js.map +1 -1
  144. package/dist/core/provider-display-names.d.ts.map +1 -1
  145. package/dist/core/provider-display-names.js +1 -0
  146. package/dist/core/provider-display-names.js.map +1 -1
  147. package/dist/core/sdk.d.ts.map +1 -1
  148. package/dist/core/sdk.js +6 -0
  149. package/dist/core/sdk.js.map +1 -1
  150. package/dist/modes/interactive/editor-paste-transfer.d.ts +10 -0
  151. package/dist/modes/interactive/editor-paste-transfer.d.ts.map +1 -1
  152. package/dist/modes/interactive/editor-paste-transfer.js +16 -0
  153. package/dist/modes/interactive/editor-paste-transfer.js.map +1 -1
  154. package/dist/modes/interactive/interactive-mode.js +2 -2
  155. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  156. package/dist/modes/rpc/connection-handler.d.ts.map +1 -1
  157. package/dist/modes/rpc/connection-handler.js +32 -27
  158. package/dist/modes/rpc/connection-handler.js.map +1 -1
  159. package/dist/modes/rpc/jsonl.d.ts +6 -1
  160. package/dist/modes/rpc/jsonl.d.ts.map +1 -1
  161. package/dist/modes/rpc/jsonl.js +47 -14
  162. package/dist/modes/rpc/jsonl.js.map +1 -1
  163. package/dist/modes/rpc/multi-session-host.d.ts.map +1 -1
  164. package/dist/modes/rpc/multi-session-host.js +26 -4
  165. package/dist/modes/rpc/multi-session-host.js.map +1 -1
  166. package/dist/modes/rpc/rpc-command-invocation.d.ts +5 -0
  167. package/dist/modes/rpc/rpc-command-invocation.d.ts.map +1 -0
  168. package/dist/modes/rpc/rpc-command-invocation.js +2 -0
  169. package/dist/modes/rpc/rpc-command-invocation.js.map +1 -0
  170. package/dist/modes/rpc/rpc-command-surface.d.ts +49 -0
  171. package/dist/modes/rpc/rpc-command-surface.d.ts.map +1 -0
  172. package/dist/modes/rpc/rpc-command-surface.js +40 -0
  173. package/dist/modes/rpc/rpc-command-surface.js.map +1 -0
  174. package/dist/modes/rpc/rpc-input-validation.d.ts +4 -0
  175. package/dist/modes/rpc/rpc-input-validation.d.ts.map +1 -0
  176. package/dist/modes/rpc/rpc-input-validation.js +20 -0
  177. package/dist/modes/rpc/rpc-input-validation.js.map +1 -0
  178. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  179. package/dist/modes/rpc/rpc-mode.js +12 -1
  180. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  181. package/dist/modes/rpc/rpc-types.d.ts +12 -12
  182. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  183. package/dist/modes/rpc/rpc-types.js.map +1 -1
  184. package/docs/providers.md +50 -1
  185. package/docs/rpc.md +78 -6
  186. package/docs/skills.md +14 -3
  187. package/node_modules/@bufbuild/protobuf/README.md +44 -0
  188. package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.d.ts +6 -0
  189. package/node_modules/@bufbuild/protobuf/dist/commonjs/clone.js +66 -0
  190. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.d.ts +1 -0
  191. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/boot.js +18 -0
  192. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.d.ts +10 -0
  193. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/enum.js +31 -0
  194. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.d.ts +9 -0
  195. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/extension.js +28 -0
  196. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.d.ts +1 -0
  197. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/file.js +18 -0
  198. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.d.ts +10 -0
  199. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/index.js +39 -0
  200. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.d.ts +10 -0
  201. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/message.js +24 -0
  202. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.d.ts +8 -0
  203. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/service.js +27 -0
  204. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.d.ts +140 -0
  205. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/symbols.js +43 -0
  206. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.d.ts +79 -0
  207. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv1/types.js +15 -0
  208. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.d.ts +63 -0
  209. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/boot.js +105 -0
  210. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.d.ts +43 -0
  211. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/embed.js +244 -0
  212. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.d.ts +29 -0
  213. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/enum.js +58 -0
  214. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.d.ts +9 -0
  215. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/extension.js +28 -0
  216. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.d.ts +7 -0
  217. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/file.js +35 -0
  218. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.d.ts +10 -0
  219. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/index.js +39 -0
  220. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.d.ts +15 -0
  221. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/message.js +24 -0
  222. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.d.ts +5 -0
  223. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/restore-json-names.js +29 -0
  224. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.d.ts +9 -0
  225. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/scalar.js +67 -0
  226. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.d.ts +8 -0
  227. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/service.js +27 -0
  228. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.d.ts +145 -0
  229. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/symbols.js +74 -0
  230. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.d.ts +85 -0
  231. package/node_modules/@bufbuild/protobuf/dist/commonjs/codegenv2/types.js +15 -0
  232. package/node_modules/@bufbuild/protobuf/dist/commonjs/create.d.ts +9 -0
  233. package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +259 -0
  234. package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.d.ts +634 -0
  235. package/node_modules/@bufbuild/protobuf/dist/commonjs/descriptors.js +53 -0
  236. package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.d.ts +46 -0
  237. package/node_modules/@bufbuild/protobuf/dist/commonjs/equals.js +209 -0
  238. package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.d.ts +60 -0
  239. package/node_modules/@bufbuild/protobuf/dist/commonjs/extensions.js +168 -0
  240. package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.d.ts +23 -0
  241. package/node_modules/@bufbuild/protobuf/dist/commonjs/fields.js +45 -0
  242. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.d.ts +48 -0
  243. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +247 -0
  244. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.d.ts +73 -0
  245. package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +739 -0
  246. package/node_modules/@bufbuild/protobuf/dist/commonjs/index.d.ts +19 -0
  247. package/node_modules/@bufbuild/protobuf/dist/commonjs/index.js +55 -0
  248. package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.d.ts +7 -0
  249. package/node_modules/@bufbuild/protobuf/dist/commonjs/is-message.js +33 -0
  250. package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.d.ts +16 -0
  251. package/node_modules/@bufbuild/protobuf/dist/commonjs/json-value.js +15 -0
  252. package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.d.ts +13 -0
  253. package/node_modules/@bufbuild/protobuf/dist/commonjs/merge.js +70 -0
  254. package/node_modules/@bufbuild/protobuf/dist/commonjs/package.json +4 -0
  255. package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.d.ts +98 -0
  256. package/node_modules/@bufbuild/protobuf/dist/commonjs/proto-int64.js +131 -0
  257. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.d.ts +9 -0
  258. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/error.js +36 -0
  259. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.d.ts +20 -0
  260. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/guard.js +78 -0
  261. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.d.ts +8 -0
  262. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/index.js +41 -0
  263. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.d.ts +30 -0
  264. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/names.js +115 -0
  265. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.d.ts +35 -0
  266. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/nested-types.js +110 -0
  267. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.d.ts +107 -0
  268. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/path.js +376 -0
  269. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.d.ts +19 -0
  270. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +268 -0
  271. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.d.ts +217 -0
  272. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-types.js +16 -0
  273. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.d.ts +43 -0
  274. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +546 -0
  275. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.d.ts +43 -0
  276. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/scalar.js +129 -0
  277. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.d.ts +39 -0
  278. package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/unsafe.js +149 -0
  279. package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.d.ts +98 -0
  280. package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +945 -0
  281. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.d.ts +24 -0
  282. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.js +199 -0
  283. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.d.ts +67 -0
  284. package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +391 -0
  285. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.d.ts +35 -0
  286. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/from-text.js +684 -0
  287. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.d.ts +4 -0
  288. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/index.js +21 -0
  289. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.d.ts +19 -0
  290. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/is-group-like.js +47 -0
  291. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.d.ts +91 -0
  292. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/reader.js +481 -0
  293. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.d.ts +34 -0
  294. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/to-text.js +358 -0
  295. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.d.ts +76 -0
  296. package/node_modules/@bufbuild/protobuf/dist/commonjs/txtpb/writer.js +220 -0
  297. package/node_modules/@bufbuild/protobuf/dist/commonjs/types.d.ts +135 -0
  298. package/node_modules/@bufbuild/protobuf/dist/commonjs/types.js +15 -0
  299. package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.d.ts +10 -0
  300. package/node_modules/@bufbuild/protobuf/dist/commonjs/unknown-enum.js +26 -0
  301. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.d.ts +23 -0
  302. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.js +156 -0
  303. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.d.ts +268 -0
  304. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +530 -0
  305. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.d.ts +5 -0
  306. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.js +34 -0
  307. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.d.ts +69 -0
  308. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/size-delimited.js +191 -0
  309. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.d.ts +28 -0
  310. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.js +61 -0
  311. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.d.ts +13 -0
  312. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-format.js +199 -0
  313. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.d.ts +70 -0
  314. package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.js +322 -0
  315. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.d.ts +38 -0
  316. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/any.js +75 -0
  317. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.d.ts +9 -0
  318. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/duration.js +39 -0
  319. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
  320. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/any_pb.js +27 -0
  321. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
  322. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/api_pb.js +39 -0
  323. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
  324. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/compiler/plugin_pb.js +68 -0
  325. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
  326. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/cpp_features_pb.js +60 -0
  327. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
  328. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/descriptor_pb.js +892 -0
  329. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
  330. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/duration_pb.js +27 -0
  331. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
  332. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/empty_pb.js +27 -0
  333. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
  334. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/field_mask_pb.js +27 -0
  335. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
  336. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/go_features_pb.js +126 -0
  337. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
  338. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/java_features_pb.js +106 -0
  339. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
  340. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/source_context_pb.js +27 -0
  341. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
  342. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/struct_pb.js +59 -0
  343. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
  344. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/timestamp_pb.js +27 -0
  345. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
  346. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/type_pb.js +242 -0
  347. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
  348. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/gen/google/protobuf/wrappers_pb.js +67 -0
  349. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.d.ts +19 -0
  350. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/index.js +48 -0
  351. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.d.ts +21 -0
  352. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/timestamp.js +57 -0
  353. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.d.ts +25 -0
  354. package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.js +66 -0
  355. package/node_modules/@bufbuild/protobuf/dist/esm/clone.d.ts +6 -0
  356. package/node_modules/@bufbuild/protobuf/dist/esm/clone.js +63 -0
  357. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.d.ts +1 -0
  358. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/boot.js +14 -0
  359. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.d.ts +10 -0
  360. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/enum.js +26 -0
  361. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.d.ts +9 -0
  362. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/extension.js +25 -0
  363. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.d.ts +1 -0
  364. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/file.js +14 -0
  365. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.d.ts +10 -0
  366. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/index.js +23 -0
  367. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.d.ts +10 -0
  368. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/message.js +21 -0
  369. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.d.ts +8 -0
  370. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/service.js +24 -0
  371. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.d.ts +140 -0
  372. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/symbols.js +40 -0
  373. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.d.ts +79 -0
  374. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv1/types.js +14 -0
  375. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.d.ts +63 -0
  376. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/boot.js +101 -0
  377. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.d.ts +43 -0
  378. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/embed.js +239 -0
  379. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.d.ts +29 -0
  380. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/enum.js +53 -0
  381. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.d.ts +9 -0
  382. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/extension.js +25 -0
  383. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.d.ts +7 -0
  384. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/file.js +32 -0
  385. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.d.ts +10 -0
  386. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/index.js +23 -0
  387. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.d.ts +15 -0
  388. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/message.js +21 -0
  389. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.d.ts +5 -0
  390. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/restore-json-names.js +26 -0
  391. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.d.ts +9 -0
  392. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/scalar.js +63 -0
  393. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.d.ts +8 -0
  394. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/service.js +24 -0
  395. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.d.ts +145 -0
  396. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/symbols.js +71 -0
  397. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.d.ts +85 -0
  398. package/node_modules/@bufbuild/protobuf/dist/esm/codegenv2/types.js +14 -0
  399. package/node_modules/@bufbuild/protobuf/dist/esm/create.d.ts +9 -0
  400. package/node_modules/@bufbuild/protobuf/dist/esm/create.js +256 -0
  401. package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.d.ts +634 -0
  402. package/node_modules/@bufbuild/protobuf/dist/esm/descriptors.js +50 -0
  403. package/node_modules/@bufbuild/protobuf/dist/esm/equals.d.ts +46 -0
  404. package/node_modules/@bufbuild/protobuf/dist/esm/equals.js +206 -0
  405. package/node_modules/@bufbuild/protobuf/dist/esm/extensions.d.ts +60 -0
  406. package/node_modules/@bufbuild/protobuf/dist/esm/extensions.js +159 -0
  407. package/node_modules/@bufbuild/protobuf/dist/esm/fields.d.ts +23 -0
  408. package/node_modules/@bufbuild/protobuf/dist/esm/fields.js +41 -0
  409. package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.d.ts +48 -0
  410. package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +241 -0
  411. package/node_modules/@bufbuild/protobuf/dist/esm/from-json.d.ts +73 -0
  412. package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +731 -0
  413. package/node_modules/@bufbuild/protobuf/dist/esm/index.d.ts +19 -0
  414. package/node_modules/@bufbuild/protobuf/dist/esm/index.js +29 -0
  415. package/node_modules/@bufbuild/protobuf/dist/esm/is-message.d.ts +7 -0
  416. package/node_modules/@bufbuild/protobuf/dist/esm/is-message.js +30 -0
  417. package/node_modules/@bufbuild/protobuf/dist/esm/json-value.d.ts +16 -0
  418. package/node_modules/@bufbuild/protobuf/dist/esm/json-value.js +14 -0
  419. package/node_modules/@bufbuild/protobuf/dist/esm/merge.d.ts +13 -0
  420. package/node_modules/@bufbuild/protobuf/dist/esm/merge.js +67 -0
  421. package/node_modules/@bufbuild/protobuf/dist/esm/package.json +4 -0
  422. package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.d.ts +98 -0
  423. package/node_modules/@bufbuild/protobuf/dist/esm/proto-int64.js +128 -0
  424. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.d.ts +9 -0
  425. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/error.js +31 -0
  426. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.d.ts +20 -0
  427. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/guard.js +71 -0
  428. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.d.ts +8 -0
  429. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/index.js +21 -0
  430. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.d.ts +30 -0
  431. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/names.js +109 -0
  432. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.d.ts +35 -0
  433. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/nested-types.js +105 -0
  434. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.d.ts +107 -0
  435. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/path.js +369 -0
  436. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.d.ts +19 -0
  437. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +262 -0
  438. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.d.ts +217 -0
  439. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-types.js +14 -0
  440. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.d.ts +43 -0
  441. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +541 -0
  442. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.d.ts +43 -0
  443. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/scalar.js +124 -0
  444. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.d.ts +39 -0
  445. package/node_modules/@bufbuild/protobuf/dist/esm/reflect/unsafe.js +140 -0
  446. package/node_modules/@bufbuild/protobuf/dist/esm/registry.d.ts +98 -0
  447. package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +939 -0
  448. package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.d.ts +24 -0
  449. package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +195 -0
  450. package/node_modules/@bufbuild/protobuf/dist/esm/to-json.d.ts +67 -0
  451. package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +386 -0
  452. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.d.ts +35 -0
  453. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/from-text.js +680 -0
  454. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.d.ts +4 -0
  455. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/index.js +15 -0
  456. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.d.ts +19 -0
  457. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/is-group-like.js +44 -0
  458. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.d.ts +91 -0
  459. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/reader.js +477 -0
  460. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.d.ts +34 -0
  461. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/to-text.js +355 -0
  462. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.d.ts +76 -0
  463. package/node_modules/@bufbuild/protobuf/dist/esm/txtpb/writer.js +214 -0
  464. package/node_modules/@bufbuild/protobuf/dist/esm/types.d.ts +135 -0
  465. package/node_modules/@bufbuild/protobuf/dist/esm/types.js +14 -0
  466. package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.d.ts +10 -0
  467. package/node_modules/@bufbuild/protobuf/dist/esm/unknown-enum.js +23 -0
  468. package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.d.ts +23 -0
  469. package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +152 -0
  470. package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.d.ts +268 -0
  471. package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +525 -0
  472. package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.d.ts +5 -0
  473. package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +18 -0
  474. package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.d.ts +69 -0
  475. package/node_modules/@bufbuild/protobuf/dist/esm/wire/size-delimited.js +186 -0
  476. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.d.ts +28 -0
  477. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +57 -0
  478. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.d.ts +13 -0
  479. package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-format.js +195 -0
  480. package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.d.ts +70 -0
  481. package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +313 -0
  482. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.d.ts +38 -0
  483. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/any.js +69 -0
  484. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.d.ts +9 -0
  485. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/duration.js +35 -0
  486. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.d.ts +238 -0
  487. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/any_pb.js +24 -0
  488. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.d.ts +537 -0
  489. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/api_pb.js +36 -0
  490. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.d.ts +490 -0
  491. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/compiler/plugin_pb.js +65 -0
  492. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.d.ts +91 -0
  493. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/cpp_features_pb.js +57 -0
  494. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.d.ts +4143 -0
  495. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/descriptor_pb.js +888 -0
  496. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.d.ts +161 -0
  497. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/duration_pb.js +24 -0
  498. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.d.ts +39 -0
  499. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/empty_pb.js +24 -0
  500. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.d.ts +424 -0
  501. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/field_mask_pb.js +24 -0
  502. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.d.ts +189 -0
  503. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/go_features_pb.js +123 -0
  504. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.d.ts +194 -0
  505. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/java_features_pb.js +103 -0
  506. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.d.ts +43 -0
  507. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/source_context_pb.js +24 -0
  508. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.d.ts +195 -0
  509. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/struct_pb.js +56 -0
  510. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.d.ts +222 -0
  511. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/timestamp_pb.js +24 -0
  512. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.d.ts +722 -0
  513. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/type_pb.js +239 -0
  514. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.d.ts +330 -0
  515. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/gen/google/protobuf/wrappers_pb.js +64 -0
  516. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.d.ts +19 -0
  517. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/index.js +32 -0
  518. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.d.ts +21 -0
  519. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/timestamp.js +50 -0
  520. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.d.ts +25 -0
  521. package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +61 -0
  522. package/node_modules/@bufbuild/protobuf/package.json +147 -0
  523. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +14 -0
  524. package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
  525. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/cell-runtime.ts +2 -0
  526. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/render.ts +43 -6
  527. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/types.ts +4 -0
  528. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
  529. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +59 -17
  530. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
  531. package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +14 -0
  532. package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
  533. package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +14 -0
  534. package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
  535. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +12 -1
  536. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
  537. package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
  538. package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
  539. package/node_modules/@earendil-works/pi-ai/README.md +3 -2
  540. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.d.ts +17 -0
  541. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.d.ts.map +1 -0
  542. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.js +14 -0
  543. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/deterministic-id.js.map +1 -0
  544. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.d.ts +13 -0
  545. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.d.ts.map +1 -0
  546. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.js +33 -0
  547. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-lifecycle.js.map +1 -0
  548. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.d.ts +79 -0
  549. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.d.ts.map +1 -0
  550. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.js +360 -0
  551. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/exec-modern.js.map +1 -0
  552. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.d.ts +16797 -0
  553. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.d.ts.map +1 -0
  554. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.js +3828 -0
  555. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.js.map +1 -0
  556. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.d.ts +55 -0
  557. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.d.ts.map +1 -0
  558. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.js +76 -0
  559. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/pi-args.js.map +1 -0
  560. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.d.ts +116 -0
  561. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.d.ts.map +1 -0
  562. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.js +16 -0
  563. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.js.map +1 -0
  564. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts +191 -0
  565. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts.map +1 -0
  566. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js +3316 -0
  567. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js.map +1 -0
  568. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.d.ts +29 -0
  569. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.d.ts.map +1 -0
  570. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.js +33 -0
  571. package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.lazy.js.map +1 -0
  572. package/node_modules/@earendil-works/pi-ai/dist/compat.d.ts +1 -0
  573. package/node_modules/@earendil-works/pi-ai/dist/compat.d.ts.map +1 -1
  574. package/node_modules/@earendil-works/pi-ai/dist/compat.js +3 -0
  575. package/node_modules/@earendil-works/pi-ai/dist/compat.js.map +1 -1
  576. package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.d.ts +11 -0
  577. package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.d.ts.map +1 -0
  578. package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.js +11 -0
  579. package/node_modules/@earendil-works/pi-ai/dist/cursor-agent-provider.js.map +1 -0
  580. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +3 -0
  581. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
  582. package/node_modules/@earendil-works/pi-ai/dist/index.js +2 -0
  583. package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
  584. package/node_modules/@earendil-works/pi-ai/dist/model.d.ts +6 -1
  585. package/node_modules/@earendil-works/pi-ai/dist/model.d.ts.map +1 -1
  586. package/node_modules/@earendil-works/pi-ai/dist/model.js.map +1 -1
  587. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts +6 -9
  588. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts.map +1 -1
  589. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js +42 -9
  590. package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js.map +1 -1
  591. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  592. package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
  593. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cerebras.json +1 -1
  594. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  595. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
  596. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  597. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
  598. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  599. package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
  600. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  601. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +3 -1
  602. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  603. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  604. package/node_modules/@earendil-works/pi-ai/dist/utils/block-symbols.d.ts +57 -0
  605. package/node_modules/@earendil-works/pi-ai/dist/utils/block-symbols.d.ts.map +1 -0
  606. package/node_modules/@earendil-works/pi-ai/dist/utils/block-symbols.js +57 -0
  607. package/node_modules/@earendil-works/pi-ai/dist/utils/block-symbols.js.map +1 -0
  608. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts +10 -0
  609. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
  610. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +22 -0
  611. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
  612. package/node_modules/@earendil-works/pi-ai/package.json +3 -2
  613. package/node_modules/@earendil-works/pi-pty/package.json +1 -1
  614. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  615. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
  616. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +21 -0
  617. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
  618. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +1 -1
  619. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  620. package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.d.ts +9 -0
  621. package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.d.ts.map +1 -0
  622. package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.js +82 -0
  623. package/node_modules/@earendil-works/pi-tui/dist/dollar-invocation-autocomplete.js.map +1 -0
  624. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  625. package/package.json +11 -8
@@ -0,0 +1,939 @@
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 { parseTextFormatEnumValue, parseTextFormatScalarValue, } from "./wire/text-format.js";
16
+ import { nestedTypes } from "./reflect/nested-types.js";
17
+ import { unsafeIsSetExplicit } from "./reflect/unsafe.js";
18
+ import { protoCamelCase, safeObjectProperty } from "./reflect/names.js";
19
+ /**
20
+ * Create a registry from the given inputs.
21
+ *
22
+ * An input can be:
23
+ * - Any message, enum, service, or extension descriptor, which adds just the
24
+ * descriptor for this type.
25
+ * - A file descriptor, which adds all typed defined in this file.
26
+ * - A registry, which adds all types from the registry.
27
+ *
28
+ * For duplicate descriptors (same type name), the one given last wins.
29
+ */
30
+ export function createRegistry(...input) {
31
+ return initBaseRegistry(input);
32
+ }
33
+ /**
34
+ * Create a registry that allows adding and removing descriptors.
35
+ */
36
+ export function createMutableRegistry(...input) {
37
+ const reg = initBaseRegistry(input);
38
+ return Object.assign(Object.assign({}, reg), { remove(desc) {
39
+ var _a;
40
+ if (desc.kind == "extension") {
41
+ (_a = reg.extendees.get(desc.extendee.typeName)) === null || _a === void 0 ? void 0 : _a.delete(desc.number);
42
+ }
43
+ reg.types.delete(desc.typeName);
44
+ } });
45
+ }
46
+ export function createFileRegistry(...args) {
47
+ const registry = createBaseRegistry();
48
+ if (!args.length) {
49
+ return registry;
50
+ }
51
+ if ("$typeName" in args[0] &&
52
+ args[0].$typeName == "google.protobuf.FileDescriptorSet") {
53
+ for (const file of args[0].file) {
54
+ addFile(file, registry);
55
+ }
56
+ return registry;
57
+ }
58
+ if ("$typeName" in args[0]) {
59
+ const input = args[0];
60
+ const resolve = args[1];
61
+ const seen = new Set();
62
+ function recurseDeps(file) {
63
+ const deps = [];
64
+ for (const protoFileName of file.dependency) {
65
+ if (registry.getFile(protoFileName) != undefined) {
66
+ continue;
67
+ }
68
+ if (seen.has(protoFileName)) {
69
+ continue;
70
+ }
71
+ const dep = resolve(protoFileName);
72
+ if (!dep) {
73
+ throw new Error(`Unable to resolve ${protoFileName}, imported by ${file.name}`);
74
+ }
75
+ if ("kind" in dep) {
76
+ registry.addFile(dep, false, true);
77
+ }
78
+ else {
79
+ seen.add(dep.name);
80
+ deps.push(dep);
81
+ }
82
+ }
83
+ return deps.concat(...deps.map(recurseDeps));
84
+ }
85
+ for (const file of [input, ...recurseDeps(input)].reverse()) {
86
+ addFile(file, registry);
87
+ }
88
+ }
89
+ else {
90
+ for (const fileReg of args) {
91
+ for (const file of fileReg.files) {
92
+ registry.addFile(file);
93
+ }
94
+ }
95
+ }
96
+ return registry;
97
+ }
98
+ /**
99
+ * @private
100
+ */
101
+ function createBaseRegistry() {
102
+ const types = new Map();
103
+ const extendees = new Map();
104
+ const files = new Map();
105
+ return {
106
+ kind: "registry",
107
+ types,
108
+ extendees,
109
+ [Symbol.iterator]() {
110
+ return types.values();
111
+ },
112
+ get files() {
113
+ return files.values();
114
+ },
115
+ addFile(file, skipTypes, withDeps) {
116
+ files.set(file.proto.name, file);
117
+ if (!skipTypes) {
118
+ for (const type of nestedTypes(file)) {
119
+ this.add(type);
120
+ }
121
+ }
122
+ if (withDeps) {
123
+ for (const f of file.dependencies) {
124
+ this.addFile(f, skipTypes, withDeps);
125
+ }
126
+ }
127
+ },
128
+ add(desc) {
129
+ if (desc.kind == "extension") {
130
+ let numberToExt = extendees.get(desc.extendee.typeName);
131
+ if (!numberToExt) {
132
+ extendees.set(desc.extendee.typeName,
133
+ // biome-ignore lint/suspicious/noAssignInExpressions: no
134
+ (numberToExt = new Map()));
135
+ }
136
+ numberToExt.set(desc.number, desc);
137
+ }
138
+ types.set(desc.typeName, desc);
139
+ },
140
+ get(typeName) {
141
+ return types.get(typeName);
142
+ },
143
+ getFile(fileName) {
144
+ return files.get(fileName);
145
+ },
146
+ getMessage(typeName) {
147
+ const t = types.get(typeName);
148
+ return (t === null || t === void 0 ? void 0 : t.kind) == "message" ? t : undefined;
149
+ },
150
+ getEnum(typeName) {
151
+ const t = types.get(typeName);
152
+ return (t === null || t === void 0 ? void 0 : t.kind) == "enum" ? t : undefined;
153
+ },
154
+ getExtension(typeName) {
155
+ const t = types.get(typeName);
156
+ return (t === null || t === void 0 ? void 0 : t.kind) == "extension" ? t : undefined;
157
+ },
158
+ getExtensionFor(extendee, no) {
159
+ var _a;
160
+ return (_a = extendees.get(extendee.typeName)) === null || _a === void 0 ? void 0 : _a.get(no);
161
+ },
162
+ getService(typeName) {
163
+ const t = types.get(typeName);
164
+ return (t === null || t === void 0 ? void 0 : t.kind) == "service" ? t : undefined;
165
+ },
166
+ };
167
+ }
168
+ /**
169
+ * @private
170
+ */
171
+ function initBaseRegistry(inputs) {
172
+ const registry = createBaseRegistry();
173
+ for (const input of inputs) {
174
+ switch (input.kind) {
175
+ case "registry":
176
+ for (const n of input) {
177
+ registry.add(n);
178
+ }
179
+ break;
180
+ case "file":
181
+ registry.addFile(input);
182
+ break;
183
+ default:
184
+ registry.add(input);
185
+ break;
186
+ }
187
+ }
188
+ return registry;
189
+ }
190
+ // bootstrap-inject google.protobuf.Edition.EDITION_PROTO2: const $name = $number;
191
+ const EDITION_PROTO2 = 998;
192
+ // bootstrap-inject google.protobuf.Edition.EDITION_PROTO3: const $name = $number;
193
+ const EDITION_PROTO3 = 999;
194
+ // bootstrap-inject google.protobuf.Edition.EDITION_UNSTABLE: const $name = $number;
195
+ const EDITION_UNSTABLE = 9999;
196
+ // bootstrap-inject google.protobuf.FieldDescriptorProto.Type.TYPE_STRING: const $name = $number;
197
+ const TYPE_STRING = 9;
198
+ // bootstrap-inject google.protobuf.FieldDescriptorProto.Type.TYPE_GROUP: const $name = $number;
199
+ const TYPE_GROUP = 10;
200
+ // bootstrap-inject google.protobuf.FieldDescriptorProto.Type.TYPE_MESSAGE: const $name = $number;
201
+ const TYPE_MESSAGE = 11;
202
+ // bootstrap-inject google.protobuf.FieldDescriptorProto.Type.TYPE_BYTES: const $name = $number;
203
+ const TYPE_BYTES = 12;
204
+ // bootstrap-inject google.protobuf.FieldDescriptorProto.Type.TYPE_ENUM: const $name = $number;
205
+ const TYPE_ENUM = 14;
206
+ // bootstrap-inject google.protobuf.FieldDescriptorProto.Label.LABEL_REPEATED: const $name = $number;
207
+ const LABEL_REPEATED = 3;
208
+ // bootstrap-inject google.protobuf.FieldDescriptorProto.Label.LABEL_REQUIRED: const $name = $number;
209
+ const LABEL_REQUIRED = 2;
210
+ // bootstrap-inject google.protobuf.FieldOptions.JSType.JS_STRING: const $name = $number;
211
+ const JS_STRING = 1;
212
+ // bootstrap-inject google.protobuf.MethodOptions.IdempotencyLevel.IDEMPOTENCY_UNKNOWN: const $name = $number;
213
+ const IDEMPOTENCY_UNKNOWN = 0;
214
+ // bootstrap-inject google.protobuf.FeatureSet.FieldPresence.EXPLICIT: const $name = $number;
215
+ const EXPLICIT = 1;
216
+ // bootstrap-inject google.protobuf.FeatureSet.FieldPresence.IMPLICIT: const $name = $number;
217
+ const IMPLICIT = 2;
218
+ // bootstrap-inject google.protobuf.FeatureSet.FieldPresence.LEGACY_REQUIRED: const $name = $number;
219
+ const LEGACY_REQUIRED = 3;
220
+ // bootstrap-inject google.protobuf.FeatureSet.RepeatedFieldEncoding.PACKED: const $name = $number;
221
+ const PACKED = 1;
222
+ // bootstrap-inject google.protobuf.FeatureSet.MessageEncoding.DELIMITED: const $name = $number;
223
+ const DELIMITED = 2;
224
+ // bootstrap-inject google.protobuf.FeatureSet.EnumType.OPEN: const $name = $number;
225
+ const OPEN = 1;
226
+ // bootstrap-inject google.protobuf.FeatureSet.Utf8Validation.VERIFY: const $name = $number;
227
+ const VERIFY = 2;
228
+ // biome-ignore format: want this to read well
229
+ // bootstrap-inject defaults: EDITION_PROTO2 to EDITION_2024: export const minimumEdition: SupportedEdition = $minimumEdition, maximumEdition: SupportedEdition = $maximumEdition;
230
+ // generated from protoc v34.1
231
+ export const minimumEdition = 998, maximumEdition = 1001;
232
+ const featureDefaults = {
233
+ // EDITION_PROTO2
234
+ 998: {
235
+ fieldPresence: 1, // EXPLICIT,
236
+ enumType: 2, // CLOSED,
237
+ repeatedFieldEncoding: 2, // EXPANDED,
238
+ utf8Validation: 3, // NONE,
239
+ messageEncoding: 1, // LENGTH_PREFIXED,
240
+ jsonFormat: 2, // LEGACY_BEST_EFFORT,
241
+ enforceNamingStyle: 2, // STYLE_LEGACY,
242
+ defaultSymbolVisibility: 1, // EXPORT_ALL,
243
+ },
244
+ // EDITION_PROTO3
245
+ 999: {
246
+ fieldPresence: 2, // IMPLICIT,
247
+ enumType: 1, // OPEN,
248
+ repeatedFieldEncoding: 1, // PACKED,
249
+ utf8Validation: 2, // VERIFY,
250
+ messageEncoding: 1, // LENGTH_PREFIXED,
251
+ jsonFormat: 1, // ALLOW,
252
+ enforceNamingStyle: 2, // STYLE_LEGACY,
253
+ defaultSymbolVisibility: 1, // EXPORT_ALL,
254
+ },
255
+ // EDITION_2023
256
+ 1000: {
257
+ fieldPresence: 1, // EXPLICIT,
258
+ enumType: 1, // OPEN,
259
+ repeatedFieldEncoding: 1, // PACKED,
260
+ utf8Validation: 2, // VERIFY,
261
+ messageEncoding: 1, // LENGTH_PREFIXED,
262
+ jsonFormat: 1, // ALLOW,
263
+ enforceNamingStyle: 2, // STYLE_LEGACY,
264
+ defaultSymbolVisibility: 1, // EXPORT_ALL,
265
+ },
266
+ // EDITION_2024
267
+ 1001: {
268
+ fieldPresence: 1, // EXPLICIT,
269
+ enumType: 1, // OPEN,
270
+ repeatedFieldEncoding: 1, // PACKED,
271
+ utf8Validation: 2, // VERIFY,
272
+ messageEncoding: 1, // LENGTH_PREFIXED,
273
+ jsonFormat: 1, // ALLOW,
274
+ enforceNamingStyle: 1, // STYLE2024,
275
+ defaultSymbolVisibility: 2, // EXPORT_TOP_LEVEL,
276
+ },
277
+ };
278
+ /**
279
+ * Create a descriptor for a file, add it to the registry.
280
+ */
281
+ function addFile(proto, reg) {
282
+ var _a, _b;
283
+ const file = {
284
+ kind: "file",
285
+ proto,
286
+ deprecated: (_b = (_a = proto.options) === null || _a === void 0 ? void 0 : _a.deprecated) !== null && _b !== void 0 ? _b : false,
287
+ edition: getFileEdition(proto),
288
+ name: proto.name.replace(/\.proto$/, ""),
289
+ dependencies: findFileDependencies(proto, reg),
290
+ enums: [],
291
+ messages: [],
292
+ extensions: [],
293
+ services: [],
294
+ toString() {
295
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions -- we asserted above
296
+ return `file ${proto.name}`;
297
+ },
298
+ };
299
+ const mapEntriesStore = new Map();
300
+ const mapEntries = {
301
+ get(typeName) {
302
+ return mapEntriesStore.get(typeName);
303
+ },
304
+ add(desc) {
305
+ var _a;
306
+ assert(((_a = desc.proto.options) === null || _a === void 0 ? void 0 : _a.mapEntry) === true);
307
+ mapEntriesStore.set(desc.typeName, desc);
308
+ },
309
+ };
310
+ for (const enumProto of proto.enumType) {
311
+ addEnum(enumProto, file, undefined, reg);
312
+ }
313
+ for (const messageProto of proto.messageType) {
314
+ addMessage(messageProto, file, undefined, reg, mapEntries);
315
+ }
316
+ for (const serviceProto of proto.service) {
317
+ addService(serviceProto, file, reg);
318
+ }
319
+ addExtensions(file, reg);
320
+ for (const mapEntry of mapEntriesStore.values()) {
321
+ // to create a map field, we need access to the map entry's fields
322
+ addFields(mapEntry, reg, mapEntries);
323
+ }
324
+ for (const message of file.messages) {
325
+ addFields(message, reg, mapEntries);
326
+ addExtensions(message, reg);
327
+ }
328
+ reg.addFile(file, true);
329
+ }
330
+ /**
331
+ * Create descriptors for extensions, and add them to the message / file,
332
+ * and to our cart.
333
+ * Recurses into nested types.
334
+ */
335
+ function addExtensions(desc, reg) {
336
+ switch (desc.kind) {
337
+ case "file":
338
+ for (const proto of desc.proto.extension) {
339
+ const ext = newField(proto, desc, reg);
340
+ desc.extensions.push(ext);
341
+ reg.add(ext);
342
+ }
343
+ break;
344
+ case "message":
345
+ for (const proto of desc.proto.extension) {
346
+ const ext = newField(proto, desc, reg);
347
+ desc.nestedExtensions.push(ext);
348
+ reg.add(ext);
349
+ }
350
+ for (const message of desc.nestedMessages) {
351
+ addExtensions(message, reg);
352
+ }
353
+ break;
354
+ }
355
+ }
356
+ /**
357
+ * Create descriptors for fields and oneof groups, and add them to the message.
358
+ * Recurses into nested types.
359
+ */
360
+ function addFields(message, reg, mapEntries) {
361
+ const allOneofs = message.proto.oneofDecl.map((proto) => newOneof(proto, message));
362
+ const oneofsSeen = new Set();
363
+ for (const proto of message.proto.field) {
364
+ const oneof = findOneof(proto, allOneofs);
365
+ const field = newField(proto, message, reg, oneof, mapEntries);
366
+ message.fields.push(field);
367
+ message.field[field.localName] = field;
368
+ if (oneof === undefined) {
369
+ message.members.push(field);
370
+ }
371
+ else {
372
+ oneof.fields.push(field);
373
+ if (!oneofsSeen.has(oneof)) {
374
+ oneofsSeen.add(oneof);
375
+ message.members.push(oneof);
376
+ }
377
+ }
378
+ }
379
+ for (const oneof of allOneofs.filter((o) => oneofsSeen.has(o))) {
380
+ message.oneofs.push(oneof);
381
+ }
382
+ for (const child of message.nestedMessages) {
383
+ addFields(child, reg, mapEntries);
384
+ }
385
+ }
386
+ /**
387
+ * Create a descriptor for an enumeration, and add it our cart and to the
388
+ * parent type, if any.
389
+ */
390
+ function addEnum(proto, file, parent, reg) {
391
+ var _a, _b, _c, _d, _e;
392
+ const sharedPrefix = findEnumSharedPrefix(proto.name, proto.value);
393
+ const desc = {
394
+ kind: "enum",
395
+ proto,
396
+ deprecated: (_b = (_a = proto.options) === null || _a === void 0 ? void 0 : _a.deprecated) !== null && _b !== void 0 ? _b : false,
397
+ file,
398
+ parent,
399
+ open: true,
400
+ name: proto.name,
401
+ typeName: makeTypeName(proto, parent, file),
402
+ value: {},
403
+ values: [],
404
+ sharedPrefix,
405
+ toString() {
406
+ return `enum ${this.typeName}`;
407
+ },
408
+ };
409
+ desc.open = isEnumOpen(desc);
410
+ reg.add(desc);
411
+ for (const p of proto.value) {
412
+ const name = p.name;
413
+ desc.values.push(
414
+ // biome-ignore lint/suspicious/noAssignInExpressions: no
415
+ (desc.value[p.number] = {
416
+ kind: "enum_value",
417
+ proto: p,
418
+ deprecated: (_d = (_c = p.options) === null || _c === void 0 ? void 0 : _c.deprecated) !== null && _d !== void 0 ? _d : false,
419
+ parent: desc,
420
+ name,
421
+ localName: safeObjectProperty(sharedPrefix == undefined
422
+ ? name
423
+ : name.substring(sharedPrefix.length)),
424
+ number: p.number,
425
+ toString() {
426
+ return `enum value ${desc.typeName}.${name}`;
427
+ },
428
+ }));
429
+ }
430
+ ((_e = parent === null || parent === void 0 ? void 0 : parent.nestedEnums) !== null && _e !== void 0 ? _e : file.enums).push(desc);
431
+ }
432
+ /**
433
+ * Create a descriptor for a message, including nested types, and add it to our
434
+ * cart. Note that this does not create descriptors fields.
435
+ */
436
+ function addMessage(proto, file, parent, reg, mapEntries) {
437
+ var _a, _b, _c, _d;
438
+ const desc = {
439
+ kind: "message",
440
+ proto,
441
+ deprecated: (_b = (_a = proto.options) === null || _a === void 0 ? void 0 : _a.deprecated) !== null && _b !== void 0 ? _b : false,
442
+ file,
443
+ parent,
444
+ name: proto.name,
445
+ typeName: makeTypeName(proto, parent, file),
446
+ fields: [],
447
+ field: {},
448
+ oneofs: [],
449
+ members: [],
450
+ nestedEnums: [],
451
+ nestedMessages: [],
452
+ nestedExtensions: [],
453
+ toString() {
454
+ return `message ${this.typeName}`;
455
+ },
456
+ };
457
+ if (((_c = proto.options) === null || _c === void 0 ? void 0 : _c.mapEntry) === true) {
458
+ mapEntries.add(desc);
459
+ }
460
+ else {
461
+ ((_d = parent === null || parent === void 0 ? void 0 : parent.nestedMessages) !== null && _d !== void 0 ? _d : file.messages).push(desc);
462
+ reg.add(desc);
463
+ }
464
+ for (const enumProto of proto.enumType) {
465
+ addEnum(enumProto, file, desc, reg);
466
+ }
467
+ for (const messageProto of proto.nestedType) {
468
+ addMessage(messageProto, file, desc, reg, mapEntries);
469
+ }
470
+ }
471
+ /**
472
+ * Create a descriptor for a service, including methods, and add it to our
473
+ * cart.
474
+ */
475
+ function addService(proto, file, reg) {
476
+ var _a, _b;
477
+ const desc = {
478
+ kind: "service",
479
+ proto,
480
+ deprecated: (_b = (_a = proto.options) === null || _a === void 0 ? void 0 : _a.deprecated) !== null && _b !== void 0 ? _b : false,
481
+ file,
482
+ name: proto.name,
483
+ typeName: makeTypeName(proto, undefined, file),
484
+ methods: [],
485
+ method: {},
486
+ toString() {
487
+ return `service ${this.typeName}`;
488
+ },
489
+ };
490
+ file.services.push(desc);
491
+ reg.add(desc);
492
+ for (const methodProto of proto.method) {
493
+ const method = newMethod(methodProto, desc, reg);
494
+ desc.methods.push(method);
495
+ desc.method[method.localName] = method;
496
+ }
497
+ }
498
+ /**
499
+ * Create a descriptor for a method.
500
+ */
501
+ function newMethod(proto, parent, reg) {
502
+ var _a, _b, _c, _d;
503
+ let methodKind;
504
+ if (proto.clientStreaming && proto.serverStreaming) {
505
+ methodKind = "bidi_streaming";
506
+ }
507
+ else if (proto.clientStreaming) {
508
+ methodKind = "client_streaming";
509
+ }
510
+ else if (proto.serverStreaming) {
511
+ methodKind = "server_streaming";
512
+ }
513
+ else {
514
+ methodKind = "unary";
515
+ }
516
+ const input = reg.getMessage(trimLeadingDot(proto.inputType));
517
+ const output = reg.getMessage(trimLeadingDot(proto.outputType));
518
+ assert(input, `invalid MethodDescriptorProto: input_type ${proto.inputType} not found`);
519
+ assert(output, `invalid MethodDescriptorProto: output_type ${proto.inputType} not found`);
520
+ const name = proto.name;
521
+ return {
522
+ kind: "rpc",
523
+ proto,
524
+ deprecated: (_b = (_a = proto.options) === null || _a === void 0 ? void 0 : _a.deprecated) !== null && _b !== void 0 ? _b : false,
525
+ parent,
526
+ name,
527
+ localName: safeObjectProperty(name.length
528
+ ? safeObjectProperty(name[0].toLowerCase() + name.substring(1))
529
+ : name),
530
+ methodKind,
531
+ input,
532
+ output,
533
+ idempotency: (_d = (_c = proto.options) === null || _c === void 0 ? void 0 : _c.idempotencyLevel) !== null && _d !== void 0 ? _d : IDEMPOTENCY_UNKNOWN,
534
+ toString() {
535
+ return `rpc ${parent.typeName}.${name}`;
536
+ },
537
+ };
538
+ }
539
+ /**
540
+ * Create a descriptor for a oneof group.
541
+ */
542
+ function newOneof(proto, parent) {
543
+ return {
544
+ kind: "oneof",
545
+ proto,
546
+ deprecated: false,
547
+ parent,
548
+ fields: [],
549
+ name: proto.name,
550
+ localName: safeObjectProperty(protoCamelCase(proto.name)),
551
+ toString() {
552
+ return `oneof ${parent.typeName}.${this.name}`;
553
+ },
554
+ };
555
+ }
556
+ function newField(proto, parentOrFile, reg, oneof, mapEntries) {
557
+ var _a, _b, _c;
558
+ const isExtension = mapEntries === undefined;
559
+ const field = {
560
+ kind: "field",
561
+ proto,
562
+ deprecated: (_b = (_a = proto.options) === null || _a === void 0 ? void 0 : _a.deprecated) !== null && _b !== void 0 ? _b : false,
563
+ name: proto.name,
564
+ number: proto.number,
565
+ scalar: undefined,
566
+ message: undefined,
567
+ enum: undefined,
568
+ presence: getFieldPresence(proto, oneof, isExtension, parentOrFile),
569
+ utf8Validation: isUtf8Validated(proto, parentOrFile),
570
+ listKind: undefined,
571
+ mapKind: undefined,
572
+ mapKey: undefined,
573
+ delimitedEncoding: undefined,
574
+ packed: undefined,
575
+ longAsString: false,
576
+ getDefaultValue: undefined,
577
+ };
578
+ if (isExtension) {
579
+ // extension field
580
+ const file = parentOrFile.kind == "file" ? parentOrFile : parentOrFile.file;
581
+ const parent = parentOrFile.kind == "file" ? undefined : parentOrFile;
582
+ const typeName = makeTypeName(proto, parent, file);
583
+ field.kind = "extension";
584
+ field.file = file;
585
+ field.parent = parent;
586
+ field.oneof = undefined;
587
+ field.typeName = typeName;
588
+ field.jsonName = `[${typeName}]`; // option json_name is not allowed on extension fields
589
+ field.toString = () => `extension ${typeName}`;
590
+ const extendee = reg.getMessage(trimLeadingDot(proto.extendee));
591
+ assert(extendee, `invalid FieldDescriptorProto: extendee ${proto.extendee} not found`);
592
+ field.extendee = extendee;
593
+ }
594
+ else {
595
+ // regular field
596
+ const parent = parentOrFile;
597
+ assert(parent.kind == "message");
598
+ field.parent = parent;
599
+ field.oneof = oneof;
600
+ field.localName = oneof
601
+ ? protoCamelCase(proto.name)
602
+ : safeObjectProperty(protoCamelCase(proto.name));
603
+ field.jsonName = proto.jsonName;
604
+ field.toString = () => `field ${parent.typeName}.${proto.name}`;
605
+ }
606
+ const label = proto.label;
607
+ const type = proto.type;
608
+ const jstype = (_c = proto.options) === null || _c === void 0 ? void 0 : _c.jstype;
609
+ if (label === LABEL_REPEATED) {
610
+ // list or map field
611
+ const mapEntry = type == TYPE_MESSAGE
612
+ ? mapEntries === null || mapEntries === void 0 ? void 0 : mapEntries.get(trimLeadingDot(proto.typeName))
613
+ : undefined;
614
+ if (mapEntry) {
615
+ // map field
616
+ field.fieldKind = "map";
617
+ const { key, value } = findMapEntryFields(mapEntry);
618
+ field.mapKey = key.scalar;
619
+ field.mapKind = value.fieldKind;
620
+ field.message = value.message;
621
+ field.delimitedEncoding = false; // map fields are always LENGTH_PREFIXED
622
+ field.enum = value.enum;
623
+ field.scalar = value.scalar;
624
+ return field;
625
+ }
626
+ // list field
627
+ field.fieldKind = "list";
628
+ switch (type) {
629
+ case TYPE_MESSAGE:
630
+ case TYPE_GROUP:
631
+ field.listKind = "message";
632
+ field.message = reg.getMessage(trimLeadingDot(proto.typeName));
633
+ assert(field.message);
634
+ field.delimitedEncoding = isDelimitedEncoding(proto, parentOrFile);
635
+ break;
636
+ case TYPE_ENUM:
637
+ field.listKind = "enum";
638
+ field.enum = reg.getEnum(trimLeadingDot(proto.typeName));
639
+ assert(field.enum);
640
+ break;
641
+ default:
642
+ field.listKind = "scalar";
643
+ field.scalar = type;
644
+ field.longAsString = jstype == JS_STRING;
645
+ break;
646
+ }
647
+ field.packed = isPackedField(proto, parentOrFile);
648
+ return field;
649
+ }
650
+ // singular
651
+ switch (type) {
652
+ case TYPE_MESSAGE:
653
+ case TYPE_GROUP:
654
+ field.fieldKind = "message";
655
+ field.message = reg.getMessage(trimLeadingDot(proto.typeName));
656
+ assert(field.message, `invalid FieldDescriptorProto: type_name ${proto.typeName} not found`);
657
+ field.delimitedEncoding = isDelimitedEncoding(proto, parentOrFile);
658
+ field.getDefaultValue = () => undefined;
659
+ break;
660
+ case TYPE_ENUM: {
661
+ const enumeration = reg.getEnum(trimLeadingDot(proto.typeName));
662
+ assert(enumeration !== undefined, `invalid FieldDescriptorProto: type_name ${proto.typeName} not found`);
663
+ field.fieldKind = "enum";
664
+ field.enum = reg.getEnum(trimLeadingDot(proto.typeName));
665
+ field.getDefaultValue = () => {
666
+ return unsafeIsSetExplicit(proto, "defaultValue")
667
+ ? parseTextFormatEnumValue(enumeration, proto.defaultValue)
668
+ : undefined;
669
+ };
670
+ break;
671
+ }
672
+ default: {
673
+ field.fieldKind = "scalar";
674
+ field.scalar = type;
675
+ field.longAsString = jstype == JS_STRING;
676
+ field.getDefaultValue = () => {
677
+ return unsafeIsSetExplicit(proto, "defaultValue")
678
+ ? parseTextFormatScalarValue(type, proto.defaultValue)
679
+ : undefined;
680
+ };
681
+ break;
682
+ }
683
+ }
684
+ return field;
685
+ }
686
+ /**
687
+ * Parse the "syntax" and "edition" fields, returning one of the supported
688
+ * editions.
689
+ */
690
+ function getFileEdition(proto) {
691
+ switch (proto.syntax) {
692
+ case "":
693
+ case "proto2":
694
+ return EDITION_PROTO2;
695
+ case "proto3":
696
+ return EDITION_PROTO3;
697
+ case "editions":
698
+ // EDITION_UNSTABLE is a sandbox for in-development features. Collapse
699
+ // it to maximumEdition so SupportedEdition and feature resolution do
700
+ // not leak the test-only edition to users.
701
+ if (proto.edition === EDITION_UNSTABLE) {
702
+ return maximumEdition;
703
+ }
704
+ if (proto.edition in featureDefaults) {
705
+ return proto.edition;
706
+ }
707
+ throw new Error(`${proto.name}: unsupported edition`);
708
+ default:
709
+ throw new Error(`${proto.name}: unsupported syntax "${proto.syntax}"`);
710
+ }
711
+ }
712
+ /**
713
+ * Resolve dependencies of FileDescriptorProto to DescFile.
714
+ */
715
+ function findFileDependencies(proto, reg) {
716
+ return proto.dependency.map((wantName) => {
717
+ const dep = reg.getFile(wantName);
718
+ if (!dep) {
719
+ throw new Error(`Cannot find ${wantName}, imported by ${proto.name}`);
720
+ }
721
+ return dep;
722
+ });
723
+ }
724
+ /**
725
+ * Finds a prefix shared by enum values, for example `my_enum_` for
726
+ * `enum MyEnum {MY_ENUM_A=0; MY_ENUM_B=1;}`.
727
+ */
728
+ function findEnumSharedPrefix(enumName, values) {
729
+ const prefix = camelToSnakeCase(enumName) + "_";
730
+ for (const value of values) {
731
+ if (!value.name.toLowerCase().startsWith(prefix)) {
732
+ return undefined;
733
+ }
734
+ const shortName = value.name.substring(prefix.length);
735
+ if (shortName.length == 0) {
736
+ return undefined;
737
+ }
738
+ if (/^\d/.test(shortName)) {
739
+ // identifiers must not start with numbers
740
+ return undefined;
741
+ }
742
+ }
743
+ return prefix;
744
+ }
745
+ /**
746
+ * Converts lowerCamelCase or UpperCamelCase into lower_snake_case.
747
+ * This is used to find shared prefixes in an enum.
748
+ */
749
+ function camelToSnakeCase(camel) {
750
+ return (camel.substring(0, 1) + camel.substring(1).replace(/[A-Z]/g, (c) => "_" + c)).toLowerCase();
751
+ }
752
+ /**
753
+ * Create a fully qualified name for a protobuf type or extension field.
754
+ *
755
+ * The fully qualified name for messages, enumerations, and services is
756
+ * constructed by concatenating the package name (if present), parent
757
+ * message names (for nested types), and the type name. We omit the leading
758
+ * dot added by protobuf compilers. Examples:
759
+ * - mypackage.MyMessage
760
+ * - mypackage.MyMessage.NestedMessage
761
+ *
762
+ * The fully qualified name for extension fields is constructed by
763
+ * concatenating the package name (if present), parent message names (for
764
+ * extensions declared within a message), and the field name. Examples:
765
+ * - mypackage.extfield
766
+ * - mypackage.MyMessage.extfield
767
+ */
768
+ function makeTypeName(proto, parent, file) {
769
+ let typeName;
770
+ if (parent) {
771
+ typeName = `${parent.typeName}.${proto.name}`;
772
+ }
773
+ else if (file.proto.package.length > 0) {
774
+ typeName = `${file.proto.package}.${proto.name}`;
775
+ }
776
+ else {
777
+ typeName = `${proto.name}`;
778
+ }
779
+ return typeName;
780
+ }
781
+ /**
782
+ * Remove the leading dot from a fully qualified type name.
783
+ */
784
+ function trimLeadingDot(typeName) {
785
+ return typeName.startsWith(".") ? typeName.substring(1) : typeName;
786
+ }
787
+ /**
788
+ * Did the user put the field in a oneof group?
789
+ * Synthetic oneofs for proto3 optionals are ignored.
790
+ */
791
+ function findOneof(proto, allOneofs) {
792
+ if (!unsafeIsSetExplicit(proto, "oneofIndex")) {
793
+ return undefined;
794
+ }
795
+ if (proto.proto3Optional) {
796
+ return undefined;
797
+ }
798
+ const oneof = allOneofs[proto.oneofIndex];
799
+ assert(oneof, `invalid FieldDescriptorProto: oneof #${proto.oneofIndex} for field #${proto.number} not found`);
800
+ return oneof;
801
+ }
802
+ /**
803
+ * Presence of the field.
804
+ * See https://protobuf.dev/programming-guides/field_presence/
805
+ */
806
+ function getFieldPresence(proto, oneof, isExtension, parent) {
807
+ if (proto.label == LABEL_REQUIRED) {
808
+ // proto2 required is LEGACY_REQUIRED
809
+ return LEGACY_REQUIRED;
810
+ }
811
+ if (proto.label == LABEL_REPEATED) {
812
+ // repeated fields (including maps) do not track presence
813
+ return IMPLICIT;
814
+ }
815
+ if (!!oneof || proto.proto3Optional) {
816
+ // oneof is always explicit
817
+ return EXPLICIT;
818
+ }
819
+ if (isExtension) {
820
+ // extensions always track presence
821
+ return EXPLICIT;
822
+ }
823
+ const resolved = resolveFeature("fieldPresence", { proto, parent });
824
+ if (resolved == IMPLICIT &&
825
+ (proto.type == TYPE_MESSAGE || proto.type == TYPE_GROUP)) {
826
+ // singular message field cannot be implicit
827
+ return EXPLICIT;
828
+ }
829
+ return resolved;
830
+ }
831
+ /**
832
+ * Pack this repeated field?
833
+ */
834
+ function isPackedField(proto, parent) {
835
+ if (proto.label != LABEL_REPEATED) {
836
+ return false;
837
+ }
838
+ switch (proto.type) {
839
+ case TYPE_STRING:
840
+ case TYPE_BYTES:
841
+ case TYPE_GROUP:
842
+ case TYPE_MESSAGE:
843
+ // length-delimited types cannot be packed
844
+ return false;
845
+ }
846
+ const o = proto.options;
847
+ if (o && unsafeIsSetExplicit(o, "packed")) {
848
+ // prefer the field option over edition features
849
+ return o.packed;
850
+ }
851
+ return (PACKED ==
852
+ resolveFeature("repeatedFieldEncoding", {
853
+ proto,
854
+ parent,
855
+ }));
856
+ }
857
+ /**
858
+ * Find the key and value fields of a synthetic map entry message.
859
+ */
860
+ function findMapEntryFields(mapEntry) {
861
+ const key = mapEntry.fields.find((f) => f.number === 1);
862
+ const value = mapEntry.fields.find((f) => f.number === 2);
863
+ assert(key &&
864
+ key.fieldKind == "scalar" &&
865
+ key.scalar != ScalarType.BYTES &&
866
+ key.scalar != ScalarType.FLOAT &&
867
+ key.scalar != ScalarType.DOUBLE &&
868
+ value &&
869
+ value.fieldKind != "list" &&
870
+ value.fieldKind != "map");
871
+ return { key, value };
872
+ }
873
+ /**
874
+ * Enumerations can be open or closed.
875
+ * See https://protobuf.dev/programming-guides/enum/
876
+ */
877
+ function isEnumOpen(desc) {
878
+ var _a;
879
+ return (OPEN ==
880
+ resolveFeature("enumType", {
881
+ proto: desc.proto,
882
+ parent: (_a = desc.parent) !== null && _a !== void 0 ? _a : desc.file,
883
+ }));
884
+ }
885
+ /**
886
+ * Encode the message delimited (a.k.a. proto2 group encoding), or
887
+ * length-prefixed?
888
+ */
889
+ function isDelimitedEncoding(proto, parent) {
890
+ if (proto.type == TYPE_GROUP) {
891
+ return true;
892
+ }
893
+ return (DELIMITED ==
894
+ resolveFeature("messageEncoding", {
895
+ proto,
896
+ parent,
897
+ }));
898
+ }
899
+ /**
900
+ * Reject invalid UTF-8 when reading string fields from the binary wire format?
901
+ * Driven by the resolved `utf8_validation` feature: VERIFY (proto3 / editions
902
+ * 2023+ default) enforces; NONE (proto2 default) does not.
903
+ */
904
+ function isUtf8Validated(proto, parent) {
905
+ return (VERIFY ==
906
+ resolveFeature("utf8Validation", {
907
+ proto,
908
+ parent,
909
+ }));
910
+ }
911
+ function resolveFeature(name, ref) {
912
+ var _a, _b;
913
+ const featureSet = (_a = ref.proto.options) === null || _a === void 0 ? void 0 : _a.features;
914
+ if (featureSet) {
915
+ const val = featureSet[name];
916
+ if (val != 0) {
917
+ return val;
918
+ }
919
+ }
920
+ if ("kind" in ref) {
921
+ if (ref.kind == "message") {
922
+ return resolveFeature(name, (_b = ref.parent) !== null && _b !== void 0 ? _b : ref.file);
923
+ }
924
+ const editionDefaults = featureDefaults[ref.edition];
925
+ if (!editionDefaults) {
926
+ throw new Error(`feature default for edition ${ref.edition} not found`);
927
+ }
928
+ return editionDefaults[name];
929
+ }
930
+ return resolveFeature(name, ref.parent);
931
+ }
932
+ /**
933
+ * Assert that condition is truthy or throw error (with message)
934
+ */
935
+ function assert(condition, msg) {
936
+ if (!condition) {
937
+ throw new Error(msg);
938
+ }
939
+ }