@nimiplatform/sdk 0.15.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (488) hide show
  1. package/CHANGELOG.md +500 -1
  2. package/README.md +181 -346
  3. package/dist/core/ai/capability-configuration.d.ts +15 -0
  4. package/dist/core/ai/capability-configuration.d.ts.map +1 -1
  5. package/dist/core/ai/capability-configuration.js +36 -0
  6. package/dist/core/ai/capability-configuration.js.map +1 -1
  7. package/dist/core/ai/embeddings.d.ts +6 -0
  8. package/dist/core/ai/embeddings.d.ts.map +1 -1
  9. package/dist/core/ai/embeddings.js +33 -4
  10. package/dist/core/ai/embeddings.js.map +1 -1
  11. package/dist/core/ai/index.d.ts +4 -0
  12. package/dist/core/ai/index.d.ts.map +1 -1
  13. package/dist/core/ai/index.js +3 -0
  14. package/dist/core/ai/index.js.map +1 -1
  15. package/dist/core/ai/local-app-model.d.ts +15 -4
  16. package/dist/core/ai/local-app-model.d.ts.map +1 -1
  17. package/dist/core/ai/local-app-model.js +57 -18
  18. package/dist/core/ai/local-app-model.js.map +1 -1
  19. package/dist/core/ai/music-input-wire.d.ts +4 -0
  20. package/dist/core/ai/music-input-wire.d.ts.map +1 -0
  21. package/dist/core/ai/music-input-wire.js +9 -0
  22. package/dist/core/ai/music-input-wire.js.map +1 -0
  23. package/dist/core/ai/music-input.d.ts +44 -0
  24. package/dist/core/ai/music-input.d.ts.map +1 -0
  25. package/dist/core/ai/music-input.js +69 -0
  26. package/dist/core/ai/music-input.js.map +1 -0
  27. package/dist/core/ai/reasoning.d.ts +32 -0
  28. package/dist/core/ai/reasoning.d.ts.map +1 -0
  29. package/dist/core/ai/reasoning.js +74 -0
  30. package/dist/core/ai/reasoning.js.map +1 -0
  31. package/dist/core/ai/runtime-model.d.ts +2 -19
  32. package/dist/core/ai/runtime-model.d.ts.map +1 -1
  33. package/dist/core/ai/runtime-model.js +3 -47
  34. package/dist/core/ai/runtime-model.js.map +1 -1
  35. package/dist/core/ai/speech-input.d.ts +9 -0
  36. package/dist/core/ai/speech-input.d.ts.map +1 -0
  37. package/dist/core/ai/speech-input.js +16 -0
  38. package/dist/core/ai/speech-input.js.map +1 -0
  39. package/dist/core/ai/text-runner.js +11 -4
  40. package/dist/core/ai/text-runner.js.map +1 -1
  41. package/dist/core/app/desktop-open.d.ts +11 -5
  42. package/dist/core/app/desktop-open.d.ts.map +1 -1
  43. package/dist/core/app/desktop-open.js +24 -16
  44. package/dist/core/app/desktop-open.js.map +1 -1
  45. package/dist/core/app/index.d.ts +32 -5
  46. package/dist/core/app/index.d.ts.map +1 -1
  47. package/dist/core/app/index.js +19 -1
  48. package/dist/core/app/index.js.map +1 -1
  49. package/dist/core/app/local-app-agent-introduction.d.ts +33 -0
  50. package/dist/core/app/local-app-agent-introduction.d.ts.map +1 -0
  51. package/dist/core/app/local-app-agent-introduction.js +94 -0
  52. package/dist/core/app/local-app-agent-introduction.js.map +1 -0
  53. package/dist/core/app/local-app-agent-work-input.d.ts +24 -0
  54. package/dist/core/app/local-app-agent-work-input.d.ts.map +1 -0
  55. package/dist/core/app/local-app-agent-work-input.js +50 -0
  56. package/dist/core/app/local-app-agent-work-input.js.map +1 -0
  57. package/dist/core/app/local-app-audio-separation.d.ts +9 -0
  58. package/dist/core/app/local-app-audio-separation.d.ts.map +1 -1
  59. package/dist/core/app/local-app-audio-separation.js +64 -3
  60. package/dist/core/app/local-app-audio-separation.js.map +1 -1
  61. package/dist/core/app/local-app-bytes.d.ts +10 -0
  62. package/dist/core/app/local-app-bytes.d.ts.map +1 -0
  63. package/dist/core/app/local-app-bytes.js +27 -0
  64. package/dist/core/app/local-app-bytes.js.map +1 -0
  65. package/dist/core/app/local-app-music-transcription.d.ts +43 -0
  66. package/dist/core/app/local-app-music-transcription.d.ts.map +1 -0
  67. package/dist/core/app/local-app-music-transcription.js +94 -0
  68. package/dist/core/app/local-app-music-transcription.js.map +1 -0
  69. package/dist/core/app/local-app-music.d.ts +50 -0
  70. package/dist/core/app/local-app-music.d.ts.map +1 -0
  71. package/dist/core/app/local-app-music.js +135 -0
  72. package/dist/core/app/local-app-music.js.map +1 -0
  73. package/dist/core/app/local-app-runtime-platform-activity-view.d.ts +59 -0
  74. package/dist/core/app/local-app-runtime-platform-activity-view.d.ts.map +1 -0
  75. package/dist/core/app/local-app-runtime-platform-activity-view.js +285 -0
  76. package/dist/core/app/local-app-runtime-platform-activity-view.js.map +1 -0
  77. package/dist/core/app/local-app-runtime-platform-activity.d.ts +219 -0
  78. package/dist/core/app/local-app-runtime-platform-activity.d.ts.map +1 -0
  79. package/dist/core/app/local-app-runtime-platform-activity.js +753 -0
  80. package/dist/core/app/local-app-runtime-platform-activity.js.map +1 -0
  81. package/dist/core/app/local-app-runtime-platform-agent-references.d.ts +4 -0
  82. package/dist/core/app/local-app-runtime-platform-agent-references.d.ts.map +1 -1
  83. package/dist/core/app/local-app-runtime-platform-agent-references.js +21 -9
  84. package/dist/core/app/local-app-runtime-platform-agent-references.js.map +1 -1
  85. package/dist/core/app/local-app-runtime-platform-agent-work.d.ts +88 -0
  86. package/dist/core/app/local-app-runtime-platform-agent-work.d.ts.map +1 -0
  87. package/dist/core/app/local-app-runtime-platform-agent-work.js +165 -0
  88. package/dist/core/app/local-app-runtime-platform-agent-work.js.map +1 -0
  89. package/dist/core/app/local-app-runtime-platform-ai-config.d.ts.map +1 -1
  90. package/dist/core/app/local-app-runtime-platform-ai-config.js +55 -1
  91. package/dist/core/app/local-app-runtime-platform-ai-config.js.map +1 -1
  92. package/dist/core/app/local-app-runtime-platform-ai.d.ts +154 -36
  93. package/dist/core/app/local-app-runtime-platform-ai.d.ts.map +1 -1
  94. package/dist/core/app/local-app-runtime-platform-ai.js +738 -121
  95. package/dist/core/app/local-app-runtime-platform-ai.js.map +1 -1
  96. package/dist/core/app/local-app-runtime-platform-assets.d.ts.map +1 -1
  97. package/dist/core/app/local-app-runtime-platform-assets.js +37 -12
  98. package/dist/core/app/local-app-runtime-platform-assets.js.map +1 -1
  99. package/dist/core/app/local-app-runtime-platform-configure.d.ts +38 -4
  100. package/dist/core/app/local-app-runtime-platform-configure.d.ts.map +1 -1
  101. package/dist/core/app/local-app-runtime-platform-configure.js +130 -28
  102. package/dist/core/app/local-app-runtime-platform-configure.js.map +1 -1
  103. package/dist/core/app/local-app-runtime-platform-conversation.d.ts +74 -10
  104. package/dist/core/app/local-app-runtime-platform-conversation.d.ts.map +1 -1
  105. package/dist/core/app/local-app-runtime-platform-conversation.js +176 -29
  106. package/dist/core/app/local-app-runtime-platform-conversation.js.map +1 -1
  107. package/dist/core/app/local-app-runtime-platform-direct-agent-work.d.ts +5 -0
  108. package/dist/core/app/local-app-runtime-platform-direct-agent-work.d.ts.map +1 -0
  109. package/dist/core/app/local-app-runtime-platform-direct-agent-work.js +38 -0
  110. package/dist/core/app/local-app-runtime-platform-direct-agent-work.js.map +1 -0
  111. package/dist/core/app/local-app-runtime-platform-direct-conversation.d.ts +4 -1
  112. package/dist/core/app/local-app-runtime-platform-direct-conversation.d.ts.map +1 -1
  113. package/dist/core/app/local-app-runtime-platform-direct-conversation.js +64 -11
  114. package/dist/core/app/local-app-runtime-platform-direct-conversation.js.map +1 -1
  115. package/dist/core/app/local-app-runtime-platform-direct-realm-realtime.d.ts +2 -0
  116. package/dist/core/app/local-app-runtime-platform-direct-realm-realtime.d.ts.map +1 -1
  117. package/dist/core/app/local-app-runtime-platform-direct-realm-realtime.js +10 -2
  118. package/dist/core/app/local-app-runtime-platform-direct-realm-realtime.js.map +1 -1
  119. package/dist/core/app/local-app-runtime-platform-integration.d.ts +128 -0
  120. package/dist/core/app/local-app-runtime-platform-integration.d.ts.map +1 -0
  121. package/dist/core/app/local-app-runtime-platform-integration.js +263 -0
  122. package/dist/core/app/local-app-runtime-platform-integration.js.map +1 -0
  123. package/dist/core/app/local-app-runtime-platform-life.d.ts +33 -0
  124. package/dist/core/app/local-app-runtime-platform-life.d.ts.map +1 -0
  125. package/dist/core/app/local-app-runtime-platform-life.js +59 -0
  126. package/dist/core/app/local-app-runtime-platform-life.js.map +1 -0
  127. package/dist/core/app/local-app-runtime-platform-proactive.d.ts +28 -0
  128. package/dist/core/app/local-app-runtime-platform-proactive.d.ts.map +1 -0
  129. package/dist/core/app/local-app-runtime-platform-proactive.js +42 -0
  130. package/dist/core/app/local-app-runtime-platform-proactive.js.map +1 -0
  131. package/dist/core/app/local-app-runtime-platform-realm-realtime.d.ts +6 -2
  132. package/dist/core/app/local-app-runtime-platform-realm-realtime.d.ts.map +1 -1
  133. package/dist/core/app/local-app-runtime-platform-realm-realtime.js +15 -4
  134. package/dist/core/app/local-app-runtime-platform-realm-realtime.js.map +1 -1
  135. package/dist/core/app/local-app-runtime-platform-validation.d.ts +2 -0
  136. package/dist/core/app/local-app-runtime-platform-validation.d.ts.map +1 -1
  137. package/dist/core/app/local-app-runtime-platform-validation.js +42 -3
  138. package/dist/core/app/local-app-runtime-platform-validation.js.map +1 -1
  139. package/dist/core/app/local-app-runtime-platform-vision.d.ts +1 -1
  140. package/dist/core/app/local-app-runtime-platform-vision.d.ts.map +1 -1
  141. package/dist/core/app/local-app-runtime-platform-vision.js +5 -5
  142. package/dist/core/app/local-app-runtime-platform-vision.js.map +1 -1
  143. package/dist/core/app/local-app-runtime-platform.d.ts +22 -17
  144. package/dist/core/app/local-app-runtime-platform.d.ts.map +1 -1
  145. package/dist/core/app/local-app-runtime-platform.js +22 -8
  146. package/dist/core/app/local-app-runtime-platform.js.map +1 -1
  147. package/dist/core/app/local-app-speaker-embedding.d.ts +6 -0
  148. package/dist/core/app/local-app-speaker-embedding.d.ts.map +1 -0
  149. package/dist/core/app/local-app-speaker-embedding.js +14 -0
  150. package/dist/core/app/local-app-speaker-embedding.js.map +1 -0
  151. package/dist/core/app/local-app-text-decision.d.ts +114 -0
  152. package/dist/core/app/local-app-text-decision.d.ts.map +1 -0
  153. package/dist/core/app/local-app-text-decision.js +444 -0
  154. package/dist/core/app/local-app-text-decision.js.map +1 -0
  155. package/dist/core/app/local-app-text.d.ts +7 -1
  156. package/dist/core/app/local-app-text.d.ts.map +1 -1
  157. package/dist/core/app/local-app-text.js +16 -15
  158. package/dist/core/app/local-app-text.js.map +1 -1
  159. package/dist/core/app/local-app-transcription.d.ts +11 -0
  160. package/dist/core/app/local-app-transcription.d.ts.map +1 -1
  161. package/dist/core/app/local-app-transcription.js +22 -2
  162. package/dist/core/app/local-app-transcription.js.map +1 -1
  163. package/dist/core/app/local-app-voice-convert.d.ts +61 -0
  164. package/dist/core/app/local-app-voice-convert.d.ts.map +1 -0
  165. package/dist/core/app/local-app-voice-convert.js +133 -0
  166. package/dist/core/app/local-app-voice-convert.js.map +1 -0
  167. package/dist/core/app/runtime-account-realm-source-readiness.generated.d.ts +2 -2
  168. package/dist/core/app/runtime-account-realm-source-readiness.generated.d.ts.map +1 -1
  169. package/dist/core/app/runtime-account-realm-source-readiness.generated.js +17 -12
  170. package/dist/core/app/runtime-account-realm-source-readiness.generated.js.map +1 -1
  171. package/dist/core/text-stream-cleanup.d.ts +3 -0
  172. package/dist/core/text-stream-cleanup.d.ts.map +1 -0
  173. package/dist/core/text-stream-cleanup.js +19 -0
  174. package/dist/core/text-stream-cleanup.js.map +1 -0
  175. package/dist/core-generated/realm-client.d.ts.map +1 -1
  176. package/dist/core-generated/realm-client.js +43 -103
  177. package/dist/core-generated/realm-client.js.map +1 -1
  178. package/dist/core-generated/realm-typed-client.d.ts +339 -457
  179. package/dist/core-generated/realm-typed-client.d.ts.map +1 -1
  180. package/dist/core-generated/realm-typed-client.js +72 -208
  181. package/dist/core-generated/realm-typed-client.js.map +1 -1
  182. package/dist/core-generated/runtime-client.d.ts.map +1 -1
  183. package/dist/core-generated/runtime-client.js +388 -12
  184. package/dist/core-generated/runtime-client.js.map +1 -1
  185. package/dist/core-generated/runtime-protobuf/google/protobuf/field_mask.d.ts +16 -18
  186. package/dist/core-generated/runtime-protobuf/google/protobuf/field_mask.d.ts.map +1 -1
  187. package/dist/core-generated/runtime-protobuf/google/protobuf/field_mask.js.map +1 -1
  188. package/dist/core-generated/runtime-protobuf/google/protobuf/struct.d.ts +33 -22
  189. package/dist/core-generated/runtime-protobuf/google/protobuf/struct.d.ts.map +1 -1
  190. package/dist/core-generated/runtime-protobuf/google/protobuf/struct.js +8 -3
  191. package/dist/core-generated/runtime-protobuf/google/protobuf/struct.js.map +1 -1
  192. package/dist/core-generated/runtime-protobuf/google/protobuf/timestamp.d.ts +3 -3
  193. package/dist/core-generated/runtime-protobuf/runtime/v1/account.d.ts +31 -0
  194. package/dist/core-generated/runtime-protobuf/runtime/v1/account.d.ts.map +1 -1
  195. package/dist/core-generated/runtime-protobuf/runtime/v1/account.js +49 -5
  196. package/dist/core-generated/runtime-protobuf/runtime/v1/account.js.map +1 -1
  197. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_configure.d.ts +147 -4
  198. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_configure.d.ts.map +1 -1
  199. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_configure.js +327 -14
  200. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_configure.js.map +1 -1
  201. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_life.d.ts +167 -0
  202. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_life.d.ts.map +1 -0
  203. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_life.js +312 -0
  204. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_life.js.map +1 -0
  205. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_service.d.ts +606 -148
  206. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_service.d.ts.map +1 -1
  207. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_service.js +1631 -722
  208. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_service.js.map +1 -1
  209. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_source_materialization.d.ts +9 -1
  210. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_source_materialization.d.ts.map +1 -1
  211. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_source_materialization.js +8 -0
  212. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_source_materialization.js.map +1 -1
  213. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_work.d.ts +625 -0
  214. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_work.d.ts.map +1 -0
  215. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_work.js +1369 -0
  216. package/dist/core-generated/runtime-protobuf/runtime/v1/agent_work.js.map +1 -0
  217. package/dist/core-generated/runtime-protobuf/runtime/v1/ai.d.ts +1872 -106
  218. package/dist/core-generated/runtime-protobuf/runtime/v1/ai.d.ts.map +1 -1
  219. package/dist/core-generated/runtime-protobuf/runtime/v1/ai.js +4718 -1513
  220. package/dist/core-generated/runtime-protobuf/runtime/v1/ai.js.map +1 -1
  221. package/dist/core-generated/runtime-protobuf/runtime/v1/app.d.ts +40 -0
  222. package/dist/core-generated/runtime-protobuf/runtime/v1/app.d.ts.map +1 -1
  223. package/dist/core-generated/runtime-protobuf/runtime/v1/app.js +72 -3
  224. package/dist/core-generated/runtime-protobuf/runtime/v1/app.js.map +1 -1
  225. package/dist/core-generated/runtime-protobuf/runtime/v1/app_activity.d.ts +859 -0
  226. package/dist/core-generated/runtime-protobuf/runtime/v1/app_activity.d.ts.map +1 -0
  227. package/dist/core-generated/runtime-protobuf/runtime/v1/app_activity.js +1663 -0
  228. package/dist/core-generated/runtime-protobuf/runtime/v1/app_activity.js.map +1 -0
  229. package/dist/core-generated/runtime-protobuf/runtime/v1/audit.d.ts +712 -0
  230. package/dist/core-generated/runtime-protobuf/runtime/v1/audit.d.ts.map +1 -1
  231. package/dist/core-generated/runtime-protobuf/runtime/v1/audit.js +1461 -0
  232. package/dist/core-generated/runtime-protobuf/runtime/v1/audit.js.map +1 -1
  233. package/dist/core-generated/runtime-protobuf/runtime/v1/auth.d.ts +20 -0
  234. package/dist/core-generated/runtime-protobuf/runtime/v1/auth.d.ts.map +1 -1
  235. package/dist/core-generated/runtime-protobuf/runtime/v1/auth.js +38 -0
  236. package/dist/core-generated/runtime-protobuf/runtime/v1/auth.js.map +1 -1
  237. package/dist/core-generated/runtime-protobuf/runtime/v1/capability_configuration.d.ts +548 -0
  238. package/dist/core-generated/runtime-protobuf/runtime/v1/capability_configuration.d.ts.map +1 -1
  239. package/dist/core-generated/runtime-protobuf/runtime/v1/capability_configuration.js +1309 -242
  240. package/dist/core-generated/runtime-protobuf/runtime/v1/capability_configuration.js.map +1 -1
  241. package/dist/core-generated/runtime-protobuf/runtime/v1/cognition_memory.d.ts +67 -4
  242. package/dist/core-generated/runtime-protobuf/runtime/v1/cognition_memory.d.ts.map +1 -1
  243. package/dist/core-generated/runtime-protobuf/runtime/v1/cognition_memory.js +101 -10
  244. package/dist/core-generated/runtime-protobuf/runtime/v1/cognition_memory.js.map +1 -1
  245. package/dist/core-generated/runtime-protobuf/runtime/v1/common.d.ts +150 -1
  246. package/dist/core-generated/runtime-protobuf/runtime/v1/common.d.ts.map +1 -1
  247. package/dist/core-generated/runtime-protobuf/runtime/v1/common.js +149 -0
  248. package/dist/core-generated/runtime-protobuf/runtime/v1/common.js.map +1 -1
  249. package/dist/core-generated/runtime-protobuf/runtime/v1/connector.d.ts +81 -0
  250. package/dist/core-generated/runtime-protobuf/runtime/v1/connector.d.ts.map +1 -1
  251. package/dist/core-generated/runtime-protobuf/runtime/v1/connector.js +166 -5
  252. package/dist/core-generated/runtime-protobuf/runtime/v1/connector.js.map +1 -1
  253. package/dist/core-generated/runtime-protobuf/runtime/v1/development.d.ts +53 -0
  254. package/dist/core-generated/runtime-protobuf/runtime/v1/development.d.ts.map +1 -1
  255. package/dist/core-generated/runtime-protobuf/runtime/v1/development.js +118 -0
  256. package/dist/core-generated/runtime-protobuf/runtime/v1/development.js.map +1 -1
  257. package/dist/core-generated/runtime-protobuf/runtime/v1/integration.d.ts +1293 -0
  258. package/dist/core-generated/runtime-protobuf/runtime/v1/integration.d.ts.map +1 -0
  259. package/dist/core-generated/runtime-protobuf/runtime/v1/integration.js +2898 -0
  260. package/dist/core-generated/runtime-protobuf/runtime/v1/integration.js.map +1 -0
  261. package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime.d.ts +166 -0
  262. package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime.d.ts.map +1 -1
  263. package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime.js +217 -4
  264. package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime.js.map +1 -1
  265. package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime_recommendation.d.ts +8 -0
  266. package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime_recommendation.d.ts.map +1 -1
  267. package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime_recommendation.js +9 -1
  268. package/dist/core-generated/runtime-protobuf/runtime/v1/local_runtime_recommendation.js.map +1 -1
  269. package/dist/core-generated/runtime-protobuf/runtime/v1/realm_realtime.d.ts +181 -8
  270. package/dist/core-generated/runtime-protobuf/runtime/v1/realm_realtime.d.ts.map +1 -1
  271. package/dist/core-generated/runtime-protobuf/runtime/v1/realm_realtime.js +402 -18
  272. package/dist/core-generated/runtime-protobuf/runtime/v1/realm_realtime.js.map +1 -1
  273. package/dist/core-generated/runtime-protobuf/runtime/v1/runtime_service_control.d.ts +110 -0
  274. package/dist/core-generated/runtime-protobuf/runtime/v1/runtime_service_control.d.ts.map +1 -1
  275. package/dist/core-generated/runtime-protobuf/runtime/v1/runtime_service_control.js +213 -0
  276. package/dist/core-generated/runtime-protobuf/runtime/v1/runtime_service_control.js.map +1 -1
  277. package/dist/core-generated/runtime-public-client.d.ts.map +1 -1
  278. package/dist/core-generated/runtime-public-client.js +364 -20
  279. package/dist/core-generated/runtime-public-client.js.map +1 -1
  280. package/dist/core-generated/runtime-public-rpc-auth-posture.d.ts.map +1 -1
  281. package/dist/core-generated/runtime-public-rpc-auth-posture.js +46 -3
  282. package/dist/core-generated/runtime-public-rpc-auth-posture.js.map +1 -1
  283. package/dist/core-generated/runtime-public-wire-codecs.d.ts +56 -10
  284. package/dist/core-generated/runtime-public-wire-codecs.d.ts.map +1 -1
  285. package/dist/core-generated/runtime-public-wire-codecs.js +56 -10
  286. package/dist/core-generated/runtime-public-wire-codecs.js.map +1 -1
  287. package/dist/core-generated/runtime-rpc-auth-posture.d.ts.map +1 -1
  288. package/dist/core-generated/runtime-rpc-auth-posture.js +49 -2
  289. package/dist/core-generated/runtime-rpc-auth-posture.js.map +1 -1
  290. package/dist/core-generated/runtime-typed-client.d.ts +86 -26
  291. package/dist/core-generated/runtime-typed-client.d.ts.map +1 -1
  292. package/dist/core-generated/runtime-typed-client.js +487 -11
  293. package/dist/core-generated/runtime-typed-client.js.map +1 -1
  294. package/dist/core-generated/runtime-wire-codecs.d.ts +60 -10
  295. package/dist/core-generated/runtime-wire-codecs.d.ts.map +1 -1
  296. package/dist/core-generated/runtime-wire-codecs.js +61 -11
  297. package/dist/core-generated/runtime-wire-codecs.js.map +1 -1
  298. package/dist/features/generation/index.d.ts +14 -2
  299. package/dist/features/generation/index.d.ts.map +1 -1
  300. package/dist/features/generation/index.js +14 -1
  301. package/dist/features/generation/index.js.map +1 -1
  302. package/dist/features/generation/media-params.d.ts +0 -3
  303. package/dist/features/generation/media-params.d.ts.map +1 -1
  304. package/dist/features/generation/media-params.js +8 -6
  305. package/dist/features/generation/media-params.js.map +1 -1
  306. package/dist/features/generation/runtime-generation-build.d.ts +0 -1
  307. package/dist/features/generation/runtime-generation-build.d.ts.map +1 -1
  308. package/dist/features/generation/runtime-generation-build.js +6 -1
  309. package/dist/features/generation/runtime-generation-build.js.map +1 -1
  310. package/dist/features/generation/runtime-image-generation.d.ts +5 -1
  311. package/dist/features/generation/runtime-image-generation.d.ts.map +1 -1
  312. package/dist/features/generation/runtime-image-generation.js +4 -0
  313. package/dist/features/generation/runtime-image-generation.js.map +1 -1
  314. package/dist/features/generation/runtime-job-builders.d.ts +0 -1
  315. package/dist/features/generation/runtime-job-builders.d.ts.map +1 -1
  316. package/dist/features/generation/runtime-job-builders.js +8 -10
  317. package/dist/features/generation/runtime-job-builders.js.map +1 -1
  318. package/dist/realm/account-settings.d.ts +5 -3
  319. package/dist/realm/account-settings.d.ts.map +1 -1
  320. package/dist/realm/account-settings.js +3 -3
  321. package/dist/realm/account-settings.js.map +1 -1
  322. package/dist/realm/generated.d.ts +1 -1
  323. package/dist/realm/generated.d.ts.map +1 -1
  324. package/dist/realm/generated.js.map +1 -1
  325. package/dist/realm/index.d.ts +4 -4
  326. package/dist/realm/index.d.ts.map +1 -1
  327. package/dist/realm/index.js +8 -17
  328. package/dist/realm/index.js.map +1 -1
  329. package/dist/realm/media-delivery.d.ts +4 -0
  330. package/dist/realm/media-delivery.d.ts.map +1 -0
  331. package/dist/realm/media-delivery.js +65 -0
  332. package/dist/realm/media-delivery.js.map +1 -0
  333. package/dist/realm/resource-upload.d.ts +12 -3
  334. package/dist/realm/resource-upload.d.ts.map +1 -1
  335. package/dist/realm/resource-upload.js +93 -241
  336. package/dist/realm/resource-upload.js.map +1 -1
  337. package/dist/realm/social-types.d.ts +1 -15
  338. package/dist/realm/social-types.d.ts.map +1 -1
  339. package/dist/realm/social.d.ts +3 -17
  340. package/dist/realm/social.d.ts.map +1 -1
  341. package/dist/realm/social.js +0 -175
  342. package/dist/realm/social.js.map +1 -1
  343. package/dist/runtime/chatgpt-plan.d.ts +7 -0
  344. package/dist/runtime/chatgpt-plan.d.ts.map +1 -0
  345. package/dist/runtime/chatgpt-plan.js +15 -0
  346. package/dist/runtime/chatgpt-plan.js.map +1 -0
  347. package/dist/runtime/config-projections.d.ts +12 -0
  348. package/dist/runtime/config-projections.d.ts.map +1 -1
  349. package/dist/runtime/config-projections.js +11 -3
  350. package/dist/runtime/config-projections.js.map +1 -1
  351. package/dist/runtime/connector-auth-acquisition-client.d.ts +3 -6
  352. package/dist/runtime/connector-auth-acquisition-client.d.ts.map +1 -1
  353. package/dist/runtime/connector-auth-acquisition-client.js +18 -11
  354. package/dist/runtime/connector-auth-acquisition-client.js.map +1 -1
  355. package/dist/runtime/connector-auth-acquisition-profiles.generated.d.ts +10 -11
  356. package/dist/runtime/connector-auth-acquisition-profiles.generated.d.ts.map +1 -1
  357. package/dist/runtime/connector-auth-acquisition-profiles.generated.js +13 -14
  358. package/dist/runtime/connector-auth-acquisition-profiles.generated.js.map +1 -1
  359. package/dist/runtime/connector-auth-acquisition.d.ts +26 -19
  360. package/dist/runtime/connector-auth-acquisition.d.ts.map +1 -1
  361. package/dist/runtime/connector-auth-acquisition.js +352 -269
  362. package/dist/runtime/connector-auth-acquisition.js.map +1 -1
  363. package/dist/runtime/connector-auth-profiles.generated.d.ts +1 -1
  364. package/dist/runtime/connector-auth-profiles.generated.d.ts.map +1 -1
  365. package/dist/runtime/connector-auth-profiles.generated.js +4 -4
  366. package/dist/runtime/connector-auth-profiles.generated.js.map +1 -1
  367. package/dist/runtime/connector-inventory.d.ts +19 -3
  368. package/dist/runtime/connector-inventory.d.ts.map +1 -1
  369. package/dist/runtime/connector-inventory.js +77 -25
  370. package/dist/runtime/connector-inventory.js.map +1 -1
  371. package/dist/runtime/desktop-audit.js +4 -1
  372. package/dist/runtime/desktop-audit.js.map +1 -1
  373. package/dist/runtime/desktop-first-party-runtime.d.ts +8 -1
  374. package/dist/runtime/desktop-first-party-runtime.d.ts.map +1 -1
  375. package/dist/runtime/desktop-first-party-runtime.js +80 -2
  376. package/dist/runtime/desktop-first-party-runtime.js.map +1 -1
  377. package/dist/runtime/first-party-protected-runtime-profiles.generated.d.ts +174 -10
  378. package/dist/runtime/first-party-protected-runtime-profiles.generated.d.ts.map +1 -1
  379. package/dist/runtime/first-party-protected-runtime-profiles.generated.js +45 -4
  380. package/dist/runtime/first-party-protected-runtime-profiles.generated.js.map +1 -1
  381. package/dist/runtime/generated.d.ts +2 -2
  382. package/dist/runtime/generated.d.ts.map +1 -1
  383. package/dist/runtime/generated.js +1 -1
  384. package/dist/runtime/generated.js.map +1 -1
  385. package/dist/runtime/host.d.ts +3 -0
  386. package/dist/runtime/host.d.ts.map +1 -1
  387. package/dist/runtime/host.js +4 -0
  388. package/dist/runtime/host.js.map +1 -1
  389. package/dist/runtime/index.d.ts +1 -0
  390. package/dist/runtime/index.d.ts.map +1 -1
  391. package/dist/runtime/index.js +12 -10
  392. package/dist/runtime/index.js.map +1 -1
  393. package/dist/runtime/machine-loadouts.d.ts +18 -0
  394. package/dist/runtime/machine-loadouts.d.ts.map +1 -1
  395. package/dist/runtime/machine-loadouts.js +26 -0
  396. package/dist/runtime/machine-loadouts.js.map +1 -1
  397. package/dist/runtime/node-grpc-errors.js +3 -3
  398. package/dist/runtime/node-grpc-errors.js.map +1 -1
  399. package/dist/runtime/node-grpc.d.ts.map +1 -1
  400. package/dist/runtime/node-grpc.js +24 -4
  401. package/dist/runtime/node-grpc.js.map +1 -1
  402. package/dist/runtime/product-control-projection.d.ts.map +1 -1
  403. package/dist/runtime/product-control-projection.js +11 -2
  404. package/dist/runtime/product-control-projection.js.map +1 -1
  405. package/dist/runtime/product-control-types.d.ts +13 -2
  406. package/dist/runtime/product-control-types.d.ts.map +1 -1
  407. package/dist/runtime/product-control-types.js.map +1 -1
  408. package/dist/runtime/reason-messages.d.ts +6 -0
  409. package/dist/runtime/reason-messages.d.ts.map +1 -1
  410. package/dist/runtime/reason-messages.js +17 -2
  411. package/dist/runtime/reason-messages.js.map +1 -1
  412. package/dist/runtime/runtime-agent-inspect-projection.d.ts +2 -3
  413. package/dist/runtime/runtime-agent-inspect-projection.d.ts.map +1 -1
  414. package/dist/runtime/runtime-agent-inspect-projection.js +2 -27
  415. package/dist/runtime/runtime-agent-inspect-projection.js.map +1 -1
  416. package/dist/runtime/runtime-agent-inspect-types.d.ts +4 -32
  417. package/dist/runtime/runtime-agent-inspect-types.d.ts.map +1 -1
  418. package/dist/runtime/runtime-local-environment-client-projections.d.ts.map +1 -1
  419. package/dist/runtime/runtime-local-environment-client-projections.js +19 -19
  420. package/dist/runtime/runtime-local-environment-client-projections.js.map +1 -1
  421. package/dist/runtime/runtime-local-environment-client-types.d.ts +48 -21
  422. package/dist/runtime/runtime-local-environment-client-types.d.ts.map +1 -1
  423. package/dist/runtime/runtime-local-environment-client-values.d.ts +3 -1
  424. package/dist/runtime/runtime-local-environment-client-values.d.ts.map +1 -1
  425. package/dist/runtime/runtime-local-environment-client-values.js +43 -0
  426. package/dist/runtime/runtime-local-environment-client-values.js.map +1 -1
  427. package/dist/runtime/runtime-local-environment-client.d.ts.map +1 -1
  428. package/dist/runtime/runtime-local-environment-client.js +27 -4
  429. package/dist/runtime/runtime-local-environment-client.js.map +1 -1
  430. package/dist/runtime/runtime-local-recommendation-types.d.ts +3 -0
  431. package/dist/runtime/runtime-local-recommendation-types.d.ts.map +1 -1
  432. package/dist/runtime/runtime-local-recommendation.d.ts.map +1 -1
  433. package/dist/runtime/runtime-local-recommendation.js +1 -0
  434. package/dist/runtime/runtime-local-recommendation.js.map +1 -1
  435. package/dist/runtime/runtime-method-modules.d.ts +1 -1
  436. package/dist/runtime/runtime-method-modules.d.ts.map +1 -1
  437. package/dist/runtime/runtime-method-modules.js +4 -2
  438. package/dist/runtime/runtime-method-modules.js.map +1 -1
  439. package/dist/runtime/scenario-jobs.d.ts +23 -1
  440. package/dist/runtime/scenario-jobs.d.ts.map +1 -1
  441. package/dist/runtime/scenario-jobs.js +227 -264
  442. package/dist/runtime/scenario-jobs.js.map +1 -1
  443. package/dist/runtime/shared-local-agent-ai-config.d.ts.map +1 -1
  444. package/dist/runtime/shared-local-agent-ai-config.js +3 -0
  445. package/dist/runtime/shared-local-agent-ai-config.js.map +1 -1
  446. package/dist/runtime/wire-types/agent-participation-enums.d.ts +3 -1
  447. package/dist/runtime/wire-types/agent-participation-enums.d.ts.map +1 -1
  448. package/dist/runtime/wire-types/agent-participation-enums.js +3 -1
  449. package/dist/runtime/wire-types/agent-participation-enums.js.map +1 -1
  450. package/dist/runtime/wire-types/agent-participation-types.d.ts +8 -4
  451. package/dist/runtime/wire-types/agent-participation-types.d.ts.map +1 -1
  452. package/dist/runtime/wire-types/ai-scenario-enums.d.ts +130 -3
  453. package/dist/runtime/wire-types/ai-scenario-enums.d.ts.map +1 -1
  454. package/dist/runtime/wire-types/ai-scenario-enums.js +149 -0
  455. package/dist/runtime/wire-types/ai-scenario-enums.js.map +1 -1
  456. package/dist/runtime/wire-types/ai-scenario-types.d.ts +10 -8
  457. package/dist/runtime/wire-types/ai-scenario-types.d.ts.map +1 -1
  458. package/dist/runtime/wire-types/identity-app-enums.d.ts +47 -0
  459. package/dist/runtime/wire-types/identity-app-enums.d.ts.map +1 -1
  460. package/dist/runtime/wire-types/identity-app-enums.js +55 -0
  461. package/dist/runtime/wire-types/identity-app-enums.js.map +1 -1
  462. package/dist/runtime/wire-types/identity-app-types.d.ts +8 -6
  463. package/dist/runtime/wire-types/identity-app-types.d.ts.map +1 -1
  464. package/dist/runtime/wire-types/local-memory-enums.d.ts +40 -1
  465. package/dist/runtime/wire-types/local-memory-enums.d.ts.map +1 -1
  466. package/dist/runtime/wire-types/local-memory-enums.js +44 -0
  467. package/dist/runtime/wire-types/local-memory-enums.js.map +1 -1
  468. package/dist/runtime/wire-types/reason-code-enums.d.ts +29 -1
  469. package/dist/runtime/wire-types/reason-code-enums.d.ts.map +1 -1
  470. package/dist/runtime/wire-types/reason-code-enums.js +28 -0
  471. package/dist/runtime/wire-types/reason-code-enums.js.map +1 -1
  472. package/dist/types/errors.d.ts +1 -1
  473. package/dist/types/errors.d.ts.map +1 -1
  474. package/dist/types/errors.js +2 -2
  475. package/dist/types/errors.js.map +1 -1
  476. package/dist/types/reason-code.d.ts +2 -0
  477. package/dist/types/reason-code.d.ts.map +1 -1
  478. package/dist/types/reason-code.js +2 -0
  479. package/dist/types/reason-code.js.map +1 -1
  480. package/dist/types/sha256.d.ts +6 -1
  481. package/dist/types/sha256.d.ts.map +1 -1
  482. package/dist/types/sha256.js +60 -25
  483. package/dist/types/sha256.js.map +1 -1
  484. package/package.json +5 -5
  485. package/dist/realm/feed.d.ts +0 -4
  486. package/dist/realm/feed.d.ts.map +0 -1
  487. package/dist/realm/feed.js +0 -10
  488. package/dist/realm/feed.js.map +0 -1
package/README.md CHANGED
@@ -1,83 +1,80 @@
1
1
  # @nimiplatform/sdk
2
2
 
3
- Public TypeScript clients and contracts for Nimi Apps and integrations.
4
- The package includes runnable JavaScript and TypeScript declarations under
5
- `dist/`; use the public exports instead of importing Runtime internals.
3
+ The official TypeScript SDK for the Nimi Platform.
6
4
 
7
- ## Developing a Nimi App
5
+ `@nimiplatform/sdk` provides strongly-typed clients, capability contracts, and runtime interfaces for building privacy-preserving, AI-native desktop applications. Through a unified capability-intent architecture, applications can seamlessly harness both on-device local models and cloud AI providers without managing API keys or low-level transport protocols.
8
6
 
9
- Start with the lifecycle guide included in `@nimiplatform/app-tools`.
10
- `nimi-app --help` prints its location before initialization. Select the matched
11
- SDK/Kit versions from that package's `nimiScaffoldVersions` and retain the
12
- project lockfile. See [migration notes](CHANGELOG.md) before upgrading.
7
+ ---
13
8
 
14
- An installed or development App consumes a `NimiLocalAppClient` from
15
- `@nimiplatform/sdk/app`, bound to the standard Kit shell in its supervised Host.
16
- Kit's Electron main/preload and renderer guides describe that construction.
17
- App-owned Node business work can use the same Host's `bridge.services`.
18
- The App does not supply Nimi credentials, account identity, a Runtime endpoint,
19
- or a provider/model override to these protected calls.
9
+ ## 1. Core Architecture & Mental Model
10
+
11
+ ### The Host-Bound Client
12
+ Standard Nimi Apps run inside a desktop host supervised by Nimi Desktop (the current host of Nimi Home). Instead of requiring applications to manage secrets or connect directly to local ports, the host injects a secure IPC bridge.
13
+
14
+ ```ts
15
+ import { createNimiClient, type NimiLocalAppClient } from '@nimiplatform/sdk';
16
+ import { createNimiLocalAppStandardShellSurface } from '@nimiplatform/kit/shell/renderer/bridge';
17
+
18
+ // Scaffolded apps export this singleton from src/shell/auth/local-app-client.ts
19
+ const client: NimiLocalAppClient = createNimiClient({
20
+ localApp: { standardShell: createNimiLocalAppStandardShellSurface() },
21
+ });
22
+ ```
23
+
24
+ - **Host-managed credentials**: No API tokens, account IDs, or private network addresses are embedded in your frontend code.
25
+ - **Dynamic Routing**: The local Runtime resolves whether an action is fulfilled by a selected local model or a supported cloud provider based on user preference.
26
+ - **Fail-Closed Boundaries**: Direct standalone clients (`createNimiClient({ appId, runtime })`) are reserved for external server daemons or test scripts; Runtime strictly rejects app-scoped operations from unverified gRPC origins.
27
+
28
+ ---
29
+
30
+ ## 2. Quickstart: Text Generation
31
+
32
+ ### Single-Turn Text Generation
33
+ The simplest way to generate text using the user's preferred model:
34
+
35
+ ```ts
36
+ const { text } = await client.ai.text.generateCandidate({
37
+ messages: [
38
+ { role: 'user', text: 'Summarize the core tenets of local-first computing.' }
39
+ ],
40
+ });
41
+ console.log(text);
42
+ ```
43
+
44
+ ### Multi-Step Tool Loops & Structured Output
45
+ For multi-turn tool calling, structured JSON output, or multimodal inputs, bind the local app text model:
20
46
 
21
47
  ```ts
22
48
  import type { NimiLocalAppClient } from '@nimiplatform/sdk/app';
23
49
  import { createNimiLocalAppTextModel } from '@nimiplatform/sdk/ai';
24
50
 
25
- export async function answer(
51
+ export async function answerWithTools(
26
52
  client: NimiLocalAppClient,
27
53
  question: string,
28
54
  signal: AbortSignal,
29
55
  ) {
30
- return createNimiLocalAppTextModel(client.ai).generateText({
31
- messages: [{ role: 'user', content: [{ type: 'text', text: question }] }],
56
+ const model = createNimiLocalAppTextModel(client.ai);
57
+
58
+ return await model.generateText({
59
+ messages: [
60
+ { role: 'user', content: [{ type: 'text', text: question }] }
61
+ ],
62
+ responseFormat: { type: 'json-object' },
32
63
  signal,
33
64
  });
34
65
  }
35
66
  ```
36
67
 
37
- The model executes one step. The App owns tool handlers and subsequent steps,
38
- preserves ordered `outputItems` as `turnItems`, appends matching tool results,
39
- and forwards cancellation. Preserve opaque `reasoning-continuity` bytes and
40
- order without decoding or displaying them. Only complete successful output
41
- can be treated as a finished result; partial JSON is not a validated object.
42
-
43
- SDK 0.14.0's Local App binding supports function tools, tool choice,
44
- structured `responseFormat` and user image parts with Kit/native 0.10.0 and a
45
- matching Runtime. HTTP(S) image file parts and owned image `artifact-ref` parts
46
- preserve their order with text. Upload local image bytes through
47
- `client.ai.artifacts.upload`; do not put file paths or data URLs in model
48
- requests. SDK 0.12.0 / Kit 0.8.0 retain their text-only binding. Other media
49
- methods have separate contracts, and each selected execution configuration
50
- must support the requested modality and controls.
51
-
52
- ## Local App speech support boundaries
53
-
54
- SDK 0.14.0 with Kit/native 0.10.0 and the matching Runtime carries a typed
55
- `job.transcription` on completed `speech-transcribe` jobs. It contains `status`
56
- (`transcribed` or `no-speech`), original `text`, model-reported `language` and
57
- ordered `words` with `text`, `startSeconds` and `endSeconds`. Plain transcription
58
- resources can leave language and words empty. Aligned results also leave
59
- `language` empty when recognition did not report it; real words and timestamps
60
- can still be present. Requesting `timestamps: true`
61
- requires a resource with actual alignment support; unsupported requests fail.
62
- The request's `language` is an input hint, not a detected-language result.
63
-
64
- DashScope's `qwen-audio-3.0-asr-flash-streaming` and admitted
65
- `fun-asr-realtime` models also execute finite `speech-transcribe` Jobs. The
66
- matching Runtime accepts mono PCM WAV up to 300 seconds and 32 MiB, waits for
67
- the provider's successful terminal event, and publishes its final text and
68
- actual word times. Partial hypotheses are not completed results. Detected
69
- language remains empty because this protocol does not report it; empty output
70
- is an error, not an inferred `no-speech`. Prompt, response-format and diarization
71
- controls are unsupported. The provider's WebSocket transport does not turn
72
- these Jobs into public realtime sessions. Longer audio remains App chunking.
73
-
74
- For the local Qwen3 aligned recipe, an explicit supported input language can
75
- guide the aligner when recognition returns text without a language label.
76
- That hint is never copied into the result's `language`. Without a reported
77
- language or an explicit supported hint, alignment fails; an unsupported
78
- reported language is not overridden by the hint. Apps can use their selected
79
- source language for downstream processing while retaining missing detection
80
- as unknown.
68
+ - **Tool Execution & Turn History**: The application owns tool handlers and subsequent conversation turns. Preserve ordered `outputItems` as `turnItems` on the next tool step, along with matching tool results.
69
+ - **Reasoning Continuity**: Preserve opaque `reasoning-continuity` payloads byte-for-byte in their original order. Do not decode or display them.
70
+ - **Validation**: Treat a response as complete only after successful completion—check the finish reason and validate the returned JSON against your business schema.
71
+
72
+ ---
73
+
74
+ ## 3. Advanced Capabilities
75
+
76
+ ### Audio Transcription (`audio.transcribe`)
77
+ Read completed speech-to-text results. Word timing is available only when the selected resource supports alignment:
81
78
 
82
79
  ```ts
83
80
  const { job } = await client.ai.scenarioJobs.get(jobId);
@@ -85,307 +82,145 @@ if (job.status === 'completed' && job.scenarioType === 'speech-transcribe') {
85
82
  const transcript = job.transcription;
86
83
  if (transcript?.status === 'transcribed') {
87
84
  for (const word of transcript.words) {
88
- console.log(word.text, word.startSeconds, word.endSeconds);
85
+ console.log(`${word.text} [${word.startSeconds}s - ${word.endSeconds}s]`);
89
86
  }
90
87
  }
91
88
  }
92
89
  ```
93
90
 
94
- `transcriptionText` remains the same original text for text-only consumers.
95
- Use the typed result rather than decoding artifact JSON. `no-speech` has empty
96
- text, language and words; it is distinct from invalid input and inference
97
- failure. The complete result is limited to 1 MiB and 16,384 alignment units.
98
-
99
- The local Qwen3 Transformers aligned recipe captures both the recognition
100
- model and its forced aligner in the selected Loadout. It accepts at most 300
101
- seconds per request and supports zh/en/yue/fr/de/it/ja/ko/pt/ru/es. Times are
102
- actual model alignment relative to the submitted audio's zero point, with
103
- pauses retained. The current aligner has 80 ms resolution. Units can be CJK
104
- characters; they are not guaranteed to be linguistic words. Text retains
105
- punctuation. For longer media, the App splits input and adds each source chunk
106
- offset exactly once; Runtime does not own App chunking or subtitle assembly.
107
- This route does not provide diarization, speaker counts, or a standalone
108
- alignment operation for caller-supplied transcripts.
109
-
110
- The local Faster Whisper recipe instead captures a CTranslate2 Whisper model
111
- and a Silero ONNX voice activity detector. It also accepts up to 300 seconds
112
- and returns real word times on the original input timeline; it does not offer
113
- diarization or prompts. A caller-specified language is a hint, not detected
114
- language, so that result field stays empty when the request fixes the language.
115
- The recognizer receives the full audio: VAD alone cannot discard weak or
116
- synthetic speech. No-speech requires both no recognized segments and no speech
117
- detected by the captured VAD. Empty recognition after detected speech fails.
118
- Neither recipe guarantees error-free subtitles; retain source timing and use
119
- the App's proofreading workflow when recognition or alignment is inaccurate.
120
-
121
- Select the intended Loadout for `audio.transcribe` in Nimi's model configuration first.
122
- The App's AIConfig Local intent is the route marker `local: {}` and carries no
123
- Loadout reference; the machine's current selection is captured at new Job
124
- admission. `listOptions({ kind: 'local-loadouts', capabilityContract:
125
- 'audio.transcribe' })` exposes that current selection, not every saved Loadout.
126
-
127
- Local `audio-separate` jobs consume `mimeType` and the same bytes/HTTPS URI
128
- `audioSource` shape as transcription. Choose the Demucs separation Loadout for
129
- `audio.separate` in Nimi, then declare that capability's `local: {}` App intent.
130
- The initial Driver accepts at most 300 seconds and 32 MiB per input. Split longer
131
- sources in the App while retaining their offsets and complete timeline.
132
-
133
- A completed Job's `audioSeparation` names `vocalsArtifactId` and
134
- `backgroundArtifactId`. Both refer to that Job's audio artifacts and preserve
135
- the input zero point, duration and pauses; background is the model's summed
136
- non-vocal sources. Read sample rate and channel count from the artifact records.
137
- The current Driver produces float WAV audio, which can exceed inline limits.
138
- Receive it through `client.storage.assets.adoptArtifact`. Use the returned
139
- record's `relativePath` for reads, previews and removal: Runtime normalizes the
140
- filename extension to the actual artifact media type, so the requested path is
141
- not necessarily the stored path. For example, requesting `transfers/result`
142
- for a WAV artifact returns `transfers/result.wav`.
91
+ - **Supported Engines**: Supports local Qwen3 aligned recipes (with 80ms resolution across CJK and European languages) and Faster Whisper with Silero VAD.
92
+ - **Resource Limits & Semantics**: Local Qwen3 aligned and Demucs routes accept bounded audio up to 300 seconds, though exact limits and available controls depend on the selected resource. Note that Qwen3 alignment units may be individual CJK characters rather than linguistic words, and a language hint is not a detected-language result.
93
+
94
+ For the local Qwen3 aligned recipe, supported language hints are `zh`, `en`, `yue`, `fr`, `de`, `it`, `ja`, `ko`, `pt`, `ru`, and `es`. Alignment uses the input audio timeline; keep pauses and add chunk offsets exactly once when assembling longer media. The complete transcription result is bounded to 1 MiB and 16,384 alignment units. An absent detected language remains unknown, even when a language hint was supplied.
95
+
96
+ ### Audio Separation (`audio.separate`)
97
+ Separate vocals and accompaniment using local Demucs models:
98
+
99
+ ```ts
100
+ // Submit separation job
101
+ const { job } = await client.ai.scenarioJobs.submit({
102
+ type: 'audio-separate',
103
+ mimeType: 'audio/wav',
104
+ audioSource: { type: 'bytes', bytes: audioBuffer },
105
+ });
106
+
107
+ // Save job.jobId. Once observation reports completion, read the final result.
108
+ const { job: completed } = await client.ai.scenarioJobs.get(job.jobId);
109
+ if (completed.status === 'completed' && completed.audioSeparation) {
110
+ const vocals = await client.storage.assets.adoptArtifact({
111
+ artifactId: completed.audioSeparation.vocalsArtifactId,
112
+ relativePath: 'audio/vocals.wav',
113
+ });
114
+ // Use vocals.relativePath: the stored extension may be normalized.
115
+ console.log(vocals.relativePath);
116
+ }
117
+ ```
118
+
119
+ When handling separation outputs:
120
+ - Adopt both separation outputs before presenting a complete pair.
121
+ - Read sample rate and channel count from the artifact records, and retain the source timeline when splitting longer audio.
122
+ - Treat failed or canceled Jobs as incomplete—never present them as a partial success.
123
+
124
+ ### Custom Voice Creation & Synthesis (`voice.create` & `audio.synthesize`)
125
+ Clone a voice from reference audio or design a new persona via natural language:
143
126
 
144
127
  ```ts
145
- const adopted = await client.storage.assets.adoptArtifact({ artifactId, relativePath });
146
- const received = await client.storage.assets.read({ relativePath: adopted.relativePath });
128
+ // Create a voice persona from audio reference
129
+ const { job } = await client.ai.scenarioJobs.submit({
130
+ type: 'voice-create',
131
+ creationSource: 'reference-audio',
132
+ referenceAudio: { type: 'bytes', bytes: sampleAudioBytes },
133
+ referenceAudioMime: 'audio/wav',
134
+ languageHints: [],
135
+ preferredName: 'My voice',
136
+ text: '', // Follow the selected resource’s referenceAudioInput.textMode.
137
+
138
+ });
139
+
140
+ // After observing completion, retrieve the voice asset separately from the Job.
141
+ const result = await client.ai.scenarioJobs.get(job.jobId);
142
+ if (result.job.status === 'completed' && result.asset?.status === 'active') {
143
+ await client.ai.scenarioJobs.submit({
144
+ type: 'speech-synthesize',
145
+ text: 'Hello world, speaking in the newly created voice!',
146
+ language: '', audioFormat: 'wav', emotion: '',
147
+ voiceRef: { type: 'voice-asset', id: result.asset.voiceAssetId },
148
+ timingMode: 'none', voiceRenderHints: null,
149
+ });
150
+ }
147
151
  ```
148
152
 
149
- Consume `received.body` fully before committing the App's result. If the asset
150
- was a temporary transfer, remove `adopted.relativePath` only after reception.
151
- Treat the pair as complete in the App only after both outputs have been received.
152
- Do not infer roles from filenames, replace background with the input mix, or
153
- count a canceled/failed Job as a partial success.
154
-
155
- Check required inputs and outputs before migrating a workflow. A missing
156
- configuration, an implementation defect in an existing contract, and a required
157
- new capability are different integration outcomes. Report the expected result
158
- and actual supported interface rather than silently dropping a core feature.
159
-
160
- ### Interactive dictation with finite transcription jobs
161
-
162
- An App that already implements windowed dictation can submit its bounded audio
163
- windows as `speech-transcribe` Jobs. Capture, silence detection, window offsets,
164
- draft display, utterance commits and document storage remain App-owned. Show
165
- only actual recognized text as a draft; a later window may revise it. Serialize
166
- or bound pending work so a slower recognizer cannot create an unbounded queue.
167
- Pause capture without inventing a transcript, drain the final window on an
168
- explicit stop, and cancel in-flight Jobs on discard. Ignore late results from a
169
- discarded capture generation and retain already committed utterances without
170
- appending them again in the final document.
171
-
172
- This composition does not make a finite recognizer a native streaming Driver.
173
- Verify its actual latency and pause/stop/cancel behavior in the App. The separate
174
- `client.ai.realtime` interface implements `realtime.interact`; its presence does
175
- not establish a local, transcription-only route. Do not silently substitute a
176
- Cloud conversation model for local dictation.
177
-
178
- ### Creating and reusing voices
179
-
180
- SDK 0.15.0 and Kit/native 0.11.0 expose optional `referenceAudioInput` on
181
- AIConfig effective Local resources and Cloud targets, also present in their
182
- options. Read it from the selected `voice.create` resource. It contains
183
- `supportsBytes`, `supportsUri`, `textMode` (`unsupported`, `optional`, or
184
- `required`) and `mimeTypes`. Missing metadata means unknown or inapplicable;
185
- an empty MIME list means formats are not enumerated. Neither means arbitrary
186
- input support. Runtime still validates the actual request at admission.
187
-
188
- When `textMode` is `unsupported`, pass `text: ''` in the SDK's reference-audio
189
- spec and keep any transcript in App storage. When optional, send the actual
190
- reference transcript if available; when required, request one before creating
191
- the voice. Do not select these behaviors by provider/model name. Local Qwen3
192
- reference workflows accept both public URI and bytes with optional text; the
193
- Runtime captures a URI into private bytes and empty text uses the model's
194
- reference-only mode. Choosing URI input never uploads an existing local file.
195
-
196
- Submit `voice-create` through `client.ai.scenarioJobs` with exactly one
197
- `creationSource`: `reference-audio` (audio bytes or HTTPS URI, MIME type and
198
- optional reference transcript in `text`) or `text-description` (instruction and
199
- preview text). Read the completed Job with `get(jobId)` to obtain `asset` and
200
- `voiceReference`. For synthesis, pass the returned asset identity as
201
- `voiceRef: { type: 'voice-asset', id: asset.voiceAssetId }` in a
202
- `speech-synthesize` Job. Creation success is not proof that playable audio was
203
- generated; the local Qwen3 creation paths return a voice handle and
204
- requires a synthesis Job to produce the preview audio.
205
-
206
- Both operations use their own committed capability configuration. The selected
207
- `voice.create` implementation must support `input.audio` or `input.text` for the
208
- requested source. Separate local Qwen3 clone and design recipes require their
209
- respective Loadouts; synthesis also needs a compatible selected Loadout. A source
210
- field does not switch a model or route. Expose unmet configuration to the user instead
211
- of retrying through a different engine. Existing engine-specific seed, sampling
212
- or guidance controls must not be silently mapped to unrelated public fields.
213
-
214
- For DashScope Qwen-Audio 3.0 voices, select the same current TTS model for
215
- `voice.create` and `audio.synthesize`. Both Plus and Flash use the provider's
216
- voice-enrollment and SpeechSynthesizer protocols. Reference-audio creation
217
- requires a publicly reachable HTTP(S) URI; inline bytes and a local file path
218
- are not supported by this provider workflow. Nimi does not publish an App's
219
- private audio to obtain a URL. Preserve the user's reference URI explicitly,
220
- or select a configuration that accepts bytes. A cloned voice's target model
221
- must match later synthesis. The current provider accepts 16-bit WAV, MP3 or
222
- M4A, at least 16 kHz, at most 60 seconds and 10 MB; it recommends 10–20 seconds
223
- with at least five seconds of continuous clear speech. Stereo uses the first
224
- channel. The reference transcript is unsupported for this workflow; retain it
225
- as business metadata rather than submitting it as a model prompt. Check the
226
- [provider's reference requirements](https://help.aliyun.com/zh/model-studio/voice-cloning-user-guide)
227
- when preparing a new sample. Voice design accepts an English or Chinese
228
- description of at most 500 characters and a preview of 15–200 characters in
229
- the same supported language. Synthesis supports additional languages,
230
- including Spanish; that does not expand the design preview's language range.
231
- The App keeps voice metadata and audition/export files in its business storage.
232
-
233
- The current local Qwen3 synthesis Driver accepts WAV output and no timing mode
234
- beyond `none`. It rejects supplied `speed`, `pitch`, `volume`, `sampleRateHz` and
235
- `voiceRenderHints`, including explicit neutral values such as `speed: 1`. Omit
236
- those fields. When the product's playback speed or delivery format is a
237
- deterministic media-editing operation, preserve it in the App after generation
238
- (for example, FFmpeg tempo conversion), using the actual decoded audio format.
239
- That post-processing is distinct from a model's acoustic generation control.
240
-
241
- Qwen3 Base reference-voice synthesis does not provide per-utterance style or
242
- emotion instructions. The CustomVoice preset path maps `emotion` to its own
243
- natural-language instruction; this does not establish support for Base voice
244
- assets. A `voice-create` design instruction describes the voice being created,
245
- not a later utterance's prosody. Other engines' inline expression tokens, such
246
- as OmniVoice's `[laughter]` or `[question-en]`, have no defined Qwen3 mapping.
247
- Keep unsupported model-specific controls explicit instead of silently mapping
248
- them to another field or assuming literal text will produce the intended effect.
249
-
250
- For a library that mixes cloned and designed voices, select the explicit
251
- **Qwen3 design and reference voice library** recipe for `voice.create`. Bind its
252
- Base and VoiceDesign models independently, and select that same Base ModelAsset
253
- for `audio.synthesize`. The library admits both source features in one captured
254
- configuration. A `text-description` Job requires nonempty `previewText`, runs
255
- VoiceDesign to create real reference audio, then returns a Base-compatible voice
256
- asset containing that reference. Reference-audio creation uses the supplied
257
- audio. Both kinds of asset subsequently synthesize with Base, so a story or
258
- batch can mix them without changing the machine selection. Wait for creation to
259
- complete before requesting audition audio; design creation now includes model
260
- execution and follows the ordinary Job timeout and cancellation lifecycle.
261
-
262
- Keep business voice names, descriptions, original reference audio and transcript,
263
- and saved previews in App storage. A Runtime VoiceAsset is not the App's voice
264
- library record or a permanent audio backup. Save the `voiceAssetId` actually
265
- used for an approved take and reuse it to synthesize with that same voice;
266
- there is no requirement to clone every audition again. Runtime revalidates its
267
- owner, status and target compatibility. An expired or incompatible asset fails
268
- explicitly rather than causing hidden recreation, upload or route switching.
269
- This retains the voice identity, not identical audio or prosody on every take.
270
-
271
- If the user instead chooses actual sample audio as a new reference, or edits,
272
- denoises or replaces the reference, invalidate the previous reference/asset
273
- association and use `reference-audio` creation for that new input. A cached
274
- source VoiceAsset does not represent edited output audio. Preserve the actual
275
- chosen audio and transcript in either workflow, distinguish the two actions in
276
- the product, and apply normal resource eligibility and configuration checks.
277
-
278
- ## Persisting results and resuming jobs
279
-
280
- Runtime Job storage is bounded execution state, not the App's project database.
281
- The current Runtime retains terminal Jobs for up to 30 minutes and applies a
282
- count limit. Save complete validated results in App-managed storage while the
283
- Job is available; adopt output artifacts when the project needs to retain them.
284
- Persisting only a Job ID does not preserve its result or artifact bytes.
285
-
286
- When resuming a project, reuse complete App-owned results. If a step has only
287
- an old Job ID, and the normal public Job read explicitly returns `not-found`,
288
- record that reference as unavailable. An explicit continue/retry action may
289
- then submit that unfinished step again from its original input and save the new
290
- ID. Do not poll a missing Job indefinitely, mark it completed, or rerun already
291
- completed project steps. Permission, session and transport errors are different
292
- failures and must not trigger the missing-Job recovery path.
293
-
294
- ## Structured text
295
-
296
- `createNimiLocalAppTextModel(client.ai)` binds text generation to an installed
297
- App's protected session. Its name does not restrict execution to a local model:
298
- the App's committed AI configuration chooses Local or Cloud.
299
-
300
- Request JSON with `responseFormat: { type: 'json-object' }` and consume it only
301
- after `generateText` completes. A configured route is not proof that every text
302
- behavior is available; unsupported behavior fails before dispatch, and malformed
303
- model output remains a failure. Do not extract a plausible JSON fragment or
304
- change providers automatically to turn that failure into success.
305
-
306
- The matching development Runtime admits DeepSeek `deepseek-flash` (currently
307
- served by V4.1 Flash), `deepseek-v4-flash` and `deepseek-v4-pro`. These provider
308
- API names are not immutable weight-version pins. Record the exact configured
309
- target and test date when comparing results; prefer the current `deepseek-flash`
310
- name for new Flash selections.
311
-
312
- The exact adapters support JSON-object output or native function-tool calls,
313
- including streamed completion, complete tool arguments and tool-result turns.
314
- These are separate admitted combinations: do not combine tools and JSON output.
315
- Thinking is disabled; requested reasoning, JSON Schema, media input, `topK` and
316
- `seed` are not admitted by this slice. The App still uses the same model interface
317
- and AI configuration; it never calls DeepSeek directly or executes a model's
318
- tool request inside Runtime.
319
-
320
- ## Language analysis
321
-
322
- Use the `text.annotate` AI configuration capability and submit an asynchronous
323
- `text-annotate` Job through the existing scenario Job API:
153
+ Before building your form, inspect `referenceAudioInput` on the selected `voice.create` resource: it declares the supported input forms and whether reference text is required, optional, or unsupported (the example above passes empty text, so choose a resource that admits it). Also ensure that voice creation and synthesis use compatible selected resources—a created asset does not guarantee that every synthesis route can render it.
154
+
155
+ ### Language Analysis (`text.annotate`)
156
+ Perform part-of-speech tagging, lemmatization, and syntactic dependency parsing:
324
157
 
325
158
  ```ts
326
159
  const { job } = await client.ai.scenarioJobs.submit({
327
160
  type: 'text-annotate',
328
161
  language: 'en',
329
- texts: ['A sentence to analyze.'],
162
+ texts: ['Nimi puts personal sovereignty at the center of modern computing.'],
330
163
  });
331
- // Subscribe or get this Job through the same scenarioJobs service.
332
- // Read job.textAnnotation only after status === 'completed'.
164
+
165
+ // Completed job contains structured token annotations with exact Unicode scalar offsets
333
166
  ```
334
167
 
335
- `texts` is an ordered batch of
336
- 1–64 strings, including empty strings, totaling at most 512 KiB of UTF-8.
337
- The completed Job's `textAnnotation.documents` preserves that batch order and
338
- the exact original text and whitespace. Each document contains:
339
-
340
- - `text`, `language` and an ordered `tokens` array.
341
- - Each token's `text`, `start`, `end`, `headIndex`, `partOfSpeech`, `dependency`
342
- and `isPunctuation`.
343
- - `sentences`, each with `startToken` and exclusive `endToken`.
344
-
345
- Token `start`/`end` count **Unicode scalar values**, not UTF-8 bytes or JavaScript
346
- UTF-16 code units. Python can slice its original string directly; JavaScript can
347
- use `Array.from(document.text).slice(start, end).join('')`. Token array positions
348
- are their indices, heads are document-local, and a span's original text extends
349
- from its first token's start to its last token's end. Sentence spans partition
350
- the token array. Empty documents have no tokens or sentences.
351
-
352
- The initial local spaCy implementation uses the original md 3.8.0 pipelines for
353
- en/de/es/fr/it/ru/zh/ja. The active Nimi model configuration must contain the
354
- pipeline for the requested language. `language` validates that choice; it does
355
- not override machine selection. Model installation and dependency preparation
356
- belong to Nimi, and inference never downloads a model in the App. A batch is
357
- bounded to 65536 tokens and a 16 MiB normalized result; oversized or failed analysis
358
- returns failure rather than partial annotations. Keep subtitle splitting rules,
359
- translation, time matching, project state and repeated analysis in the App.
360
- These annotations contain no audio timestamps or generated replacement text.
361
-
362
- This addition requires a matching development Runtime, SDK, Kit and native
363
- package set. Keep using the documented local tarball workflow during iteration;
364
- package publication is not a development prerequisite.
365
-
366
- ## Public entry points
367
-
368
- | Import | Purpose |
369
- | --- | --- |
370
- | `@nimiplatform/sdk/app` | Host-bound App client, standard shell contracts and typed App operations. |
371
- | `@nimiplatform/sdk/ai` | Model interfaces and the Local App text model binding. |
372
- | `@nimiplatform/sdk/contracts` | Shared messages, content parts, tool and ordered result values. |
373
- | `@nimiplatform/sdk/ai-runner` | External-host execution helpers; they do not move App workflow state into Runtime. |
374
- | `@nimiplatform/sdk/runtime` | Public Runtime clients for their explicitly supported consumer contexts. This is not a Local App authorization bypass. |
375
- | `@nimiplatform/sdk/realm` | Public Realm clients for their supported contexts; App Realm operations use the App client. |
376
-
377
- The installed package's `exports` and `.d.ts` files define the exact callable
378
- surface. Framework adapters are separate packages; do not infer that an
379
- adapter is publicly available from a source-workspace directory.
380
-
381
- For Vercel AI SDK 6 Apps, `@nimiplatform/sdk-adapter-vercel-ai` 0.2.0 provides
382
- `createNimiLocalAppVercelLanguageModel({ ai: client.ai })` for `streamText` and
383
- the existing UI/tool-loop protocol. Read its package README before mapping
384
- images or conversation history; preserve text/tool provider metadata for opaque
385
- continuity. It uses SDK 0.14.0 and the matched Kit/native carrier above.
386
-
387
- Source and issue reporting: [nimiplatform/nimi](https://github.com/nimiplatform/nimi).
388
- Include the selected SDK, Kit, App Tools and Runtime versions, the actual App
389
- operation, expected/observed behavior, and a bounded reproduction.
168
+ ### Structured Text Decisions (`text.decide`)
169
+ Score probability distributions over state-dependent choices or boolean hypotheses:
170
+
171
+ ```ts
172
+ const { output } = await client.ai.scenario.execute({
173
+ type: 'text-decide',
174
+ state: { json: { gameRound: 3, playerChips: 450 } },
175
+ questions: [
176
+ {
177
+ id: 'next_action',
178
+ instructions: { text: 'Choose the optimal next action.' },
179
+ kind: 'choice',
180
+ candidates: [{ id: 'raise' }, { id: 'call' }, { id: 'fold' }],
181
+ },
182
+ {
183
+ id: 'opponent_bluffing',
184
+ instructions: { text: 'Is the opponent likely bluffing?' },
185
+ kind: 'boolean',
186
+ },
187
+ ],
188
+ }, { timeoutMs: 10_000 });
189
+ ```
190
+
191
+ ---
192
+
193
+ ## 4. Public Subpaths & Modules
194
+
195
+ | Subpath | Description |
196
+ | :--- | :--- |
197
+ | `@nimiplatform/sdk` | Core entry point; exports `createNimiClient` |
198
+ | `@nimiplatform/sdk/app` | Host-bound app client types, shell contracts, and app operations |
199
+ | `@nimiplatform/sdk/ai` | AI model interfaces, text model bindings, and artifact utilities |
200
+ | `@nimiplatform/sdk/contracts` | Common message schemas, content parts, and tool definitions |
201
+ | `@nimiplatform/sdk/runtime` | Strongly-typed Runtime client for authorized external processes |
202
+ | `@nimiplatform/sdk/realm` | Standalone Realm client for user identities, worlds, and characters |
203
+ | `@nimiplatform/sdk/types` | Portable TypeScript types, schemas, and standardized error codes |
204
+ | `@nimiplatform/sdk-adapter-vercel-ai` | Separate adapter package for Vercel AI SDK 7 integration |
205
+
206
+ ---
207
+
208
+ ## 5. Protected Conversation Quotation and Source Reads
209
+
210
+ For LocalAgent chat, use `client.conversation.readMessage({ agentHandle, conversationAnchorId, messageId })` to prepare a quote or navigate to a canonical source in the current authorized Conversation. A readable stable text message returns `quoteText` and `quoteFormat`; other message kinds return both as `null`. The bounded `window` and its `readWatermark` are navigation data, not a replacement live snapshot.
211
+
212
+ Send the user’s own text or attachment parts with an optional `quote` containing only `sourceMessageId`, the returned format, and a half-open UTF-8 byte range. Runtime supplies the confirmed author, partial state and excerpt. A quote does not replace required input parts, permit cross-Conversation access, or alter regeneration inputs. Preserve the entire original request envelope when reconciling an uncertain submission. See the current migration notes for the matching source carrier requirement.
213
+
214
+ ## 6. Async Job Observation & Cancellation
215
+
216
+ Long-running generation tasks (audio transcription, separation, voice cloning) are managed as asynchronous scenario jobs:
217
+
218
+ - **Polling & Events**: Observe jobs with `client.ai.scenarioJobs.get(jobId)` or stream progress via observers.
219
+ - **Cancellation**: Call `client.ai.scenarioJobs.cancel(jobId)` to cancel an asynchronous Job, or pass an `AbortSignal` to control supported synchronous calls and model steps. Always inspect the returned state—a cancellation request does not guarantee that a remote provider has stopped computing or billing.
220
+ - **Artifact Custody**: Execution artifacts are temporary. Adopt completed outputs with `client.storage.assets.adoptArtifact` and use its returned path. While recovery-enabled Jobs expose `recoveryExpiresAt`, retention windows vary—persist durable App assets for later reopening rather than assuming every Job shares the same retention period.
221
+
222
+ ---
223
+
224
+ ## License
390
225
 
391
226
  Licensed under [Apache-2.0](LICENSE).
@@ -1,3 +1,5 @@
1
+ import { type NimiSpeechInputCapabilities } from './speech-input.js';
2
+ import type { NimiMusicInputCapabilities } from './music-input.js';
1
3
  import { type NimiVoiceReferenceInputCapabilities } from './voice-reference-input.js';
2
4
  import type { AIConfig, AIConfigCapabilityIntent, AIConfigOwner, GetAppAIConfigRequest, GetAppAIConfigResponse, ListAppAIConfigOptionsRequest, ListAppAIConfigOptionsResponse, OverwriteAppAIConfigRequest, OverwriteAppAIConfigResponse } from '../../core-generated/runtime-protobuf/runtime/v1/capability_configuration.js';
3
5
  import type { RuntimeTypedCallOptions } from '../../core-generated/runtime-typed-client.js';
@@ -21,6 +23,8 @@ export type NimiSharedLocalAgentAIConfigSnapshot = NimiAIConfigSnapshot & {
21
23
  };
22
24
  export type NimiAIConfigEffectiveState = 'ready' | 'missing' | 'blocked' | 'unavailable';
23
25
  export type NimiAIConfigEffectiveSelection = {
26
+ readonly reasoningInput?: import('./reasoning.js').NimiReasoningInputCapabilities;
27
+ readonly textReplay?: NimiTextReplayCompatibility;
24
28
  readonly capabilityContract: string;
25
29
  readonly state: NimiAIConfigEffectiveState;
26
30
  readonly resource: {
@@ -32,6 +36,13 @@ export type NimiAIConfigEffectiveSelection = {
32
36
  } | null;
33
37
  readonly reasons: readonly string[];
34
38
  };
39
+ export type NimiTextReplayCompatibility = {
40
+ readonly acceptedCarriers: readonly {
41
+ readonly kind: string;
42
+ readonly version: number;
43
+ readonly executionModes: readonly ('sync' | 'stream')[];
44
+ }[];
45
+ };
35
46
  export type NimiAIConfigOverwriteInput = {
36
47
  readonly expectedRevision: string;
37
48
  readonly capabilities: readonly NimiPortableAppAIConfigIntent[];
@@ -78,6 +89,8 @@ export type NimiSharedLocalAgentAIConfigOptionsQuery = NimiAIConfigOptionsQuery
78
89
  };
79
90
  export type NimiAIConfigLocalLoadoutOption = {
80
91
  readonly referenceAudioInput?: NimiVoiceReferenceInputCapabilities;
92
+ readonly musicInput?: NimiMusicInputCapabilities;
93
+ readonly speechInput?: NimiSpeechInputCapabilities;
81
94
  readonly loadoutRef: string;
82
95
  readonly label: string;
83
96
  readonly capabilityContract: string;
@@ -101,6 +114,8 @@ export type NimiAIConfigCloudConnectorOption = {
101
114
  };
102
115
  export type NimiAIConfigCloudTargetOption = {
103
116
  readonly referenceAudioInput?: NimiVoiceReferenceInputCapabilities;
117
+ readonly musicInput?: NimiMusicInputCapabilities;
118
+ readonly speechInput?: NimiSpeechInputCapabilities;
104
119
  readonly connectorRef: string;
105
120
  readonly label: string;
106
121
  readonly capabilityContract: string;