@moxxy/sdk 0.44.0 → 0.45.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 (242) hide show
  1. package/dist/agent-account-limit.d.ts +41 -0
  2. package/dist/agent-account-limit.d.ts.map +1 -0
  3. package/dist/agent-account-limit.js +64 -0
  4. package/dist/agent-account-limit.js.map +1 -0
  5. package/dist/agent-computer-use.d.ts +10 -0
  6. package/dist/agent-computer-use.d.ts.map +1 -0
  7. package/dist/agent-computer-use.js +24 -0
  8. package/dist/agent-computer-use.js.map +1 -0
  9. package/dist/agent-context-window.d.ts +22 -0
  10. package/dist/agent-context-window.d.ts.map +1 -0
  11. package/dist/agent-context-window.js +40 -0
  12. package/dist/agent-context-window.js.map +1 -0
  13. package/dist/agent-no-reply.d.ts +11 -0
  14. package/dist/agent-no-reply.d.ts.map +1 -0
  15. package/dist/agent-no-reply.js +13 -0
  16. package/dist/agent-no-reply.js.map +1 -0
  17. package/dist/agent-step.d.ts +14 -0
  18. package/dist/agent-step.d.ts.map +1 -0
  19. package/dist/agent-step.js +26 -0
  20. package/dist/agent-step.js.map +1 -0
  21. package/dist/agent-work.d.ts +34 -0
  22. package/dist/agent-work.d.ts.map +1 -0
  23. package/dist/agent-work.js +80 -0
  24. package/dist/agent-work.js.map +1 -0
  25. package/dist/attachment-payload.d.ts +1 -1
  26. package/dist/attachment-payload.js +1 -1
  27. package/dist/auto-approve.d.ts +9 -0
  28. package/dist/auto-approve.d.ts.map +1 -1
  29. package/dist/auto-approve.js +18 -0
  30. package/dist/auto-approve.js.map +1 -1
  31. package/dist/channel-auth.d.ts +3 -3
  32. package/dist/channel-auth.d.ts.map +1 -1
  33. package/dist/channel-auth.js +1 -1
  34. package/dist/channel.d.ts +1 -1
  35. package/dist/client-session.d.ts +9 -5
  36. package/dist/client-session.d.ts.map +1 -1
  37. package/dist/computer-control.d.ts +11 -11
  38. package/dist/computer-control.d.ts.map +1 -1
  39. package/dist/computer-control.js +1 -1
  40. package/dist/computer-control.js.map +1 -1
  41. package/dist/conversation-history.d.ts +50 -0
  42. package/dist/conversation-history.d.ts.map +1 -0
  43. package/dist/conversation-history.js +227 -0
  44. package/dist/conversation-history.js.map +1 -0
  45. package/dist/cron.d.ts +58 -0
  46. package/dist/cron.d.ts.map +1 -0
  47. package/dist/cron.js +320 -0
  48. package/dist/cron.js.map +1 -0
  49. package/dist/define.d.ts +2 -1
  50. package/dist/define.d.ts.map +1 -1
  51. package/dist/define.js +1 -0
  52. package/dist/define.js.map +1 -1
  53. package/dist/event-store.d.ts +1 -1
  54. package/dist/event-store.d.ts.map +1 -1
  55. package/dist/event-store.js +1 -0
  56. package/dist/event-store.js.map +1 -1
  57. package/dist/events.d.ts +17 -1
  58. package/dist/events.d.ts.map +1 -1
  59. package/dist/file-diff.d.ts +31 -0
  60. package/dist/file-diff.d.ts.map +1 -0
  61. package/dist/file-diff.js +196 -0
  62. package/dist/file-diff.js.map +1 -0
  63. package/dist/index.d.ts +22 -7
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +16 -4
  66. package/dist/index.js.map +1 -1
  67. package/dist/mode/agent-step-loop.d.ts +13 -0
  68. package/dist/mode/agent-step-loop.d.ts.map +1 -0
  69. package/dist/mode/agent-step-loop.js +578 -0
  70. package/dist/mode/agent-step-loop.js.map +1 -0
  71. package/dist/mode/checkpoint-gate.d.ts +25 -0
  72. package/dist/mode/checkpoint-gate.d.ts.map +1 -0
  73. package/dist/mode/checkpoint-gate.js +150 -0
  74. package/dist/mode/checkpoint-gate.js.map +1 -0
  75. package/dist/mode/checkpoint.d.ts +6 -0
  76. package/dist/mode/checkpoint.d.ts.map +1 -1
  77. package/dist/mode/collect-stream.d.ts +2 -0
  78. package/dist/mode/collect-stream.d.ts.map +1 -1
  79. package/dist/mode/collect-stream.js +1 -1
  80. package/dist/mode/collect-stream.js.map +1 -1
  81. package/dist/mode/project-messages.d.ts.map +1 -1
  82. package/dist/mode/project-messages.js +9 -67
  83. package/dist/mode/project-messages.js.map +1 -1
  84. package/dist/mode/react-loop-options.d.ts +113 -0
  85. package/dist/mode/react-loop-options.d.ts.map +1 -0
  86. package/dist/mode/react-loop-options.js +2 -0
  87. package/dist/mode/react-loop-options.js.map +1 -0
  88. package/dist/mode/react-loop.d.ts +2 -99
  89. package/dist/mode/react-loop.d.ts.map +1 -1
  90. package/dist/mode/react-loop.js +7 -145
  91. package/dist/mode/react-loop.js.map +1 -1
  92. package/dist/mode.d.ts +19 -7
  93. package/dist/mode.d.ts.map +1 -1
  94. package/dist/mode.js +1 -1
  95. package/dist/mode.js.map +1 -1
  96. package/dist/npm-registry.d.ts +22 -0
  97. package/dist/npm-registry.d.ts.map +1 -0
  98. package/dist/npm-registry.js +54 -0
  99. package/dist/npm-registry.js.map +1 -0
  100. package/dist/permission.d.ts +31 -0
  101. package/dist/permission.d.ts.map +1 -1
  102. package/dist/process-invocation.d.ts +2 -0
  103. package/dist/process-invocation.d.ts.map +1 -1
  104. package/dist/process-invocation.js +2 -2
  105. package/dist/process-invocation.js.map +1 -1
  106. package/dist/process-tree.d.ts +9 -0
  107. package/dist/process-tree.d.ts.map +1 -0
  108. package/dist/process-tree.js +40 -0
  109. package/dist/process-tree.js.map +1 -0
  110. package/dist/provider-login-bridge.js +1 -1
  111. package/dist/provider-login-bridge.js.map +1 -1
  112. package/dist/provider.d.ts +408 -0
  113. package/dist/provider.d.ts.map +1 -1
  114. package/dist/question-draft.d.ts +19 -0
  115. package/dist/question-draft.d.ts.map +1 -0
  116. package/dist/question-draft.js +30 -0
  117. package/dist/question-draft.js.map +1 -0
  118. package/dist/question.d.ts +204 -0
  119. package/dist/question.d.ts.map +1 -0
  120. package/dist/question.js +141 -0
  121. package/dist/question.js.map +1 -0
  122. package/dist/questions.d.ts +7 -0
  123. package/dist/questions.d.ts.map +1 -0
  124. package/dist/questions.js +7 -0
  125. package/dist/questions.js.map +1 -0
  126. package/dist/resolvers.d.ts +14 -1
  127. package/dist/resolvers.d.ts.map +1 -1
  128. package/dist/resolvers.js +33 -21
  129. package/dist/resolvers.js.map +1 -1
  130. package/dist/schemas.d.ts +53 -53
  131. package/dist/schemas.d.ts.map +1 -1
  132. package/dist/schemas.js +3 -2
  133. package/dist/schemas.js.map +1 -1
  134. package/dist/server.d.ts +2 -0
  135. package/dist/server.d.ts.map +1 -1
  136. package/dist/server.js +3 -0
  137. package/dist/server.js.map +1 -1
  138. package/dist/session-like.d.ts +19 -1
  139. package/dist/session-like.d.ts.map +1 -1
  140. package/dist/starting-model.d.ts +12 -0
  141. package/dist/starting-model.d.ts.map +1 -0
  142. package/dist/starting-model.js +9 -0
  143. package/dist/starting-model.js.map +1 -0
  144. package/dist/tool-dispatch.d.ts.map +1 -1
  145. package/dist/tool-dispatch.js +10 -4
  146. package/dist/tool-dispatch.js.map +1 -1
  147. package/dist/tool-display.d.ts +79 -3
  148. package/dist/tool-display.d.ts.map +1 -1
  149. package/dist/tool-display.js +117 -3
  150. package/dist/tool-display.js.map +1 -1
  151. package/dist/tool-modes.d.ts +1 -1
  152. package/dist/tool-modes.d.ts.map +1 -1
  153. package/dist/tool-modes.js +8 -2
  154. package/dist/tool-modes.js.map +1 -1
  155. package/dist/tool-output.d.ts +15 -0
  156. package/dist/tool-output.d.ts.map +1 -0
  157. package/dist/tool-output.js +39 -0
  158. package/dist/tool-output.js.map +1 -0
  159. package/dist/tool.d.ts +14 -1
  160. package/dist/tool.d.ts.map +1 -1
  161. package/dist/tunnel.d.ts +3 -3
  162. package/dist/tunnel.d.ts.map +1 -1
  163. package/dist/tunnel.js +2 -2
  164. package/dist/workflow-approval.d.ts +9 -9
  165. package/dist/workflow-approval.d.ts.map +1 -1
  166. package/dist/workflow-approval.js +1 -1
  167. package/dist/workflow-approval.js.map +1 -1
  168. package/package.json +33 -5
  169. package/src/agent-account-limit.test.ts +87 -0
  170. package/src/agent-account-limit.ts +89 -0
  171. package/src/agent-computer-use.test.ts +26 -0
  172. package/src/agent-computer-use.ts +29 -0
  173. package/src/agent-context-window.ts +51 -0
  174. package/src/agent-no-reply.ts +16 -0
  175. package/src/agent-step.ts +26 -0
  176. package/src/agent-work.ts +102 -0
  177. package/src/attachment-payload.ts +1 -1
  178. package/src/auto-approve.test.ts +13 -1
  179. package/src/auto-approve.ts +19 -0
  180. package/src/channel-auth.ts +3 -3
  181. package/src/channel.ts +1 -1
  182. package/src/client-session.ts +9 -2
  183. package/src/computer-control.ts +1 -1
  184. package/src/conversation-history.test.ts +184 -0
  185. package/src/conversation-history.ts +272 -0
  186. package/src/cron.test.ts +280 -0
  187. package/src/cron.ts +355 -0
  188. package/src/define.test.ts +1 -1
  189. package/src/define.ts +3 -1
  190. package/src/event-store.ts +2 -1
  191. package/src/events.ts +17 -1
  192. package/src/file-diff.test.ts +103 -0
  193. package/src/file-diff.ts +208 -0
  194. package/src/index.ts +121 -1
  195. package/src/json-file-store.test.ts +1 -1
  196. package/src/loop-helpers.test.ts +15 -0
  197. package/src/mode/agent-step-loop.ts +645 -0
  198. package/src/mode/checkpoint-gate.ts +198 -0
  199. package/src/mode/checkpoint.ts +6 -0
  200. package/src/mode/collect-stream.ts +1 -1
  201. package/src/mode/project-messages.test.ts +11 -0
  202. package/src/mode/project-messages.ts +8 -61
  203. package/src/mode/react-loop-options.ts +124 -0
  204. package/src/mode/react-loop.ts +10 -296
  205. package/src/mode.ts +19 -7
  206. package/src/npm-registry.test.ts +95 -0
  207. package/src/npm-registry.ts +57 -0
  208. package/src/permission.ts +30 -0
  209. package/src/process-invocation.test.ts +25 -0
  210. package/src/process-invocation.ts +8 -3
  211. package/src/process-tree.ts +37 -0
  212. package/src/provider-login-bridge.ts +1 -1
  213. package/src/provider-schema-constraints.test.ts +1 -1
  214. package/src/provider-utils.test.ts +1 -1
  215. package/src/provider.ts +346 -0
  216. package/src/question-draft.test.ts +57 -0
  217. package/src/question-draft.ts +47 -0
  218. package/src/question.test.ts +130 -0
  219. package/src/question.ts +229 -0
  220. package/src/questions.ts +6 -0
  221. package/src/resolvers.test.ts +84 -1
  222. package/src/resolvers.ts +40 -27
  223. package/src/schemas.test.ts +5 -0
  224. package/src/schemas.ts +3 -2
  225. package/src/server.ts +3 -0
  226. package/src/session-like.ts +19 -1
  227. package/src/skill-mentions.test.ts +1 -1
  228. package/src/starting-model.test.ts +19 -0
  229. package/src/starting-model.ts +11 -0
  230. package/src/token-efficiency.test.ts +1 -1
  231. package/src/tool-dispatch.ts +10 -4
  232. package/src/tool-display.test.ts +119 -0
  233. package/src/tool-display.ts +162 -4
  234. package/src/tool-gating.test.ts +1 -1
  235. package/src/tool-icon.test.ts +1 -1
  236. package/src/tool-modes.test.ts +18 -1
  237. package/src/tool-modes.ts +6 -2
  238. package/src/tool-output.test.ts +46 -0
  239. package/src/tool-output.ts +46 -0
  240. package/src/tool.ts +14 -1
  241. package/src/tunnel.ts +3 -3
  242. package/src/workflow-approval.ts +1 -1
@@ -2,6 +2,8 @@ import { type ChildProcess, type ExecFileSyncOptions, type SpawnOptions } from '
2
2
  export type ExecutableTarget = {
3
3
  readonly kind: 'direct';
4
4
  readonly command: string;
5
+ /** Environment the program needs, set over the caller's. */
6
+ readonly env?: Readonly<Record<string, string>>;
5
7
  } | {
6
8
  readonly kind: 'node';
7
9
  readonly command: string;
@@ -1 +1 @@
1
- {"version":3,"file":"process-invocation.d.ts","sourceRoot":"","sources":["../src/process-invocation.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAW5B,MAAM,MAAM,gBAAgB,GACxB;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACrD;IACE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ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@ -100,7 +100,7 @@ export function resolveExecutableTarget(name, opts = {}) {
100
100
  /** Spawn a resolved target with an argv array and an explicitly shell-free API. */
101
101
  export function spawnExecutableTarget(target, args, opts = {}) {
102
102
  const argv = target.kind === 'node' ? [target.entry, ...args] : [...args];
103
- const targetEnv = target.kind === 'node' ? target.env : {};
103
+ const targetEnv = target.env ?? {};
104
104
  return spawn(target.command, argv, {
105
105
  ...opts,
106
106
  env: { ...process.env, ...opts.env, ...targetEnv },
@@ -110,7 +110,7 @@ export function spawnExecutableTarget(target, args, opts = {}) {
110
110
  /** Synchronous counterpart for build scripts that must finish one command at a time. */
111
111
  export function execExecutableTargetSync(target, args, opts = {}) {
112
112
  const argv = target.kind === 'node' ? [target.entry, ...args] : [...args];
113
- const targetEnv = target.kind === 'node' ? target.env : {};
113
+ const targetEnv = target.env ?? {};
114
114
  execFileSync(target.command, argv, {
115
115
  ...opts,
116
116
  env: { ...process.env, ...opts.env, ...targetEnv },
@@ -1 +1 @@
1
- {"version":3,"file":"process-invocation.js","sourceRoot":"","sources":["../src/process-invocation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,KAAK,GAIN,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AACtD,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAC5D,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AACpE,MAAM,eAAe,GAAG,IAAI,GAAG,CAAe,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AA8BhF;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAClC,IAAY,EACZ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,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC;AAED,SAAS,MAAM,CAAC,IAAY;IAC1B,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,kBAAkB,CAAC,UAAkB;IAC5C,OAAO,IAAI,KAAK,CACd,qDAAqD,UAAU,KAAK;QAClE,8FAA8F;QAC9F,8BAA8B,CACjC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { type ChildProcess } from 'node:child_process';
2
+ /**
3
+ * Signal the child's whole process group, not just the shell. The child must
4
+ * be spawned `detached` on POSIX so it leads its own group; a negative-pid kill
5
+ * then reaches every descendant (`sh -c 'sleep 1000 & wait'`, build workers,
6
+ * …) instead of orphaning them.
7
+ */
8
+ export declare function killTree(child: ChildProcess, signal: NodeJS.Signals): void;
9
+ //# sourceMappingURL=process-tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process-tree.d.ts","sourceRoot":"","sources":["../src/process-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAG9D;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CA0B1E"}
@@ -0,0 +1,40 @@
1
+ import { spawn } from 'node:child_process';
2
+ import * as path from 'node:path';
3
+ /**
4
+ * Signal the child's whole process group, not just the shell. The child must
5
+ * be spawned `detached` on POSIX so it leads its own group; a negative-pid kill
6
+ * then reaches every descendant (`sh -c 'sleep 1000 & wait'`, build workers,
7
+ * …) instead of orphaning them.
8
+ */
9
+ export function killTree(child, signal) {
10
+ if (child.pid === undefined)
11
+ return;
12
+ if (process.platform === 'win32') {
13
+ // Windows has no process groups; taskkill /T walks the tree down from the
14
+ // shell. Always forced: a console program has no SIGTERM handler to run.
15
+ if (child.exitCode !== null || child.signalCode !== null)
16
+ return;
17
+ const taskkill = path.win32.join(process.env.SystemRoot ?? 'C:\\Windows', 'System32', 'taskkill.exe');
18
+ spawn(taskkill, ['/PID', String(child.pid), '/T', '/F'], { stdio: 'ignore', windowsHide: true }).on('error', () => {
19
+ child.kill(signal);
20
+ });
21
+ return;
22
+ }
23
+ try {
24
+ // Deliberately *no* "child already exited" guard here: the group outlives
25
+ // its leader (SIGTERM may kill the shell while a TERM-ignoring descendant
26
+ // lives on), and the pgid stays valid — and un-reusable — while any
27
+ // member survives. ESRCH below covers the fully-gone case.
28
+ process.kill(-child.pid, signal);
29
+ }
30
+ catch (e) {
31
+ // ESRCH: the group is already gone — nothing to do. Anything else
32
+ // (e.g. EPERM, or the child somehow not leading a group): fall back to
33
+ // signalling the shell itself so we at least keep the old behavior.
34
+ if (e.code !== 'ESRCH') {
35
+ if (child.exitCode === null && child.signalCode === null)
36
+ child.kill(signal);
37
+ }
38
+ }
39
+ }
40
+ //# sourceMappingURL=process-tree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process-tree.js","sourceRoot":"","sources":["../src/process-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAmB,EAAE,MAAsB;IAClE,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS;QAAE,OAAO;IACpC,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,0EAA0E;QAC1E,yEAAyE;QACzE,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,IAAI,KAAK,CAAC,UAAU,KAAK,IAAI;YAAE,OAAO;QACjE,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,aAAa,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;QACtG,KAAK,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YAChH,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IACD,IAAI,CAAC;QACH,0EAA0E;QAC1E,0EAA0E;QAC1E,oEAAoE;QACpE,2DAA2D;QAC3D,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,kEAAkE;QAClE,uEAAuE;QACvE,oEAAoE;QACpE,IAAK,CAA2B,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YAClD,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,IAAI,KAAK,CAAC,UAAU,KAAK,IAAI;gBAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC/E,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -16,7 +16,7 @@
16
16
  * format in a package both the CLI producer and the desktop consumer already
17
17
  * depend on, so the two ends can never drift.
18
18
  */
19
- import { z } from 'zod';
19
+ import { z } from 'zod/v3';
20
20
  /** The byte that brackets a prompt marker. Absent from normal CLI output. */
21
21
  const NUL = '\u0000';
22
22
  /** Tag distinguishing a login-prompt marker from any other NUL-bracketed run. */
@@ -1 +1 @@
1
- {"version":3,"file":"provider-login-bridge.js","sourceRoot":"","sources":["../src/provider-login-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,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;YAC3B,CAAC;YACD,OAAO,GAAG,CAAC;QACb,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,5 +1,9 @@
1
1
  import type { HostedTool, ToolDef } from './tool.js';
2
2
  import type { ReasoningReplayItem } from './events.js';
3
+ import type { StopReason } from './provider-utils.js';
4
+ import type { QuestionAskOptions, QuestionItem, QuestionOutcome } from './question.js';
5
+ import type { AgentAccountLimit } from './agent-account-limit.js';
6
+ import type { Skill } from './skill.js';
3
7
  export interface ProviderMessage {
4
8
  readonly role: 'system' | 'user' | 'assistant' | 'tool_result';
5
9
  readonly content: ReadonlyArray<ContentBlock>;
@@ -217,6 +221,14 @@ export interface ModelDescriptor {
217
221
  export interface LLMProvider {
218
222
  readonly name: string;
219
223
  readonly models: ReadonlyArray<ModelDescriptor>;
224
+ /**
225
+ * The model a new conversation starts on while the person chose no default
226
+ * for this provider: a light one, so an unset default does not spend their
227
+ * plan on the biggest model. Ignored when the provider does not list it.
228
+ */
229
+ readonly starterModel?: string;
230
+ /** For an agent connection, the agent's name as the person knows it ("Codex"), the same as its `ProviderDef.agentName`. */
231
+ readonly agentName?: string;
220
232
  /**
221
233
  * Optional provider-owned metadata preparation for a dynamically selected
222
234
  * model. The runtime awaits it before it calculates context budgets, so a
@@ -227,6 +239,41 @@ export interface LLMProvider {
227
239
  readonly signal?: AbortSignal;
228
240
  }): Promise<void>;
229
241
  stream(req: ProviderRequest): AsyncIterable<ProviderEvent>;
242
+ /**
243
+ * Present on an agent connection: run one turn of the vendor's own coding
244
+ * agent. The shared loop then calls this instead of {@link stream} for the
245
+ * conversation's turns; `stream` still serves one-shot text calls.
246
+ */
247
+ agentStep?(req: AgentStepRequest): AsyncIterable<AgentStepEvent>;
248
+ /**
249
+ * On an agent connection: the plan and goal the vendor's agent keeps itself
250
+ * (Claude, Codex), handed back as `plan` and `goal` events. Moxxy's plan and
251
+ * goal modes steer an agent without them like any model: through
252
+ * `plan_complete` / `goal_complete` it calls over MCP, and a nudge when it
253
+ * stops without one.
254
+ */
255
+ readonly agentOwns?: AgentOwnModes;
256
+ /**
257
+ * On an agent connection whose agent can start a turn by itself (Claude after
258
+ * a task it ran in the background finished): tell the listener when it does
259
+ * while no Moxxy turn is running, so the conversation opens a turn for it
260
+ * (`origin.kind: 'agent'`) whose `agentStep` reads the agent's turn
261
+ * (`continuesAgentTurn`). Returns the unsubscribe.
262
+ */
263
+ onAgentTurn?(listener: (start: AgentTurnStart) => void): () => void;
264
+ /**
265
+ * On an agent connection: what the agent's background work does while no
266
+ * Moxxy turn runs (its helpers' steps, `background_work` as it changes), for
267
+ * the conversation to record at once rather than at its next turn. Returns
268
+ * the unsubscribe.
269
+ */
270
+ onAgentActivity?(listener: (activity: AgentActivity) => void): () => void;
271
+ /**
272
+ * On an agent connection: stop one work the agent runs in the background in
273
+ * the conversation (`AgentBackgroundWork.id`). Resolves `false` when the
274
+ * agent has no such work running.
275
+ */
276
+ stopBackgroundWork?(sessionId: string, workId: string): Promise<boolean>;
230
277
  countTokens(req: Pick<ProviderRequest, 'model' | 'messages' | 'system' | 'tools'>): Promise<number>;
231
278
  }
232
279
  export type ProviderKeyValidation = {
@@ -373,9 +420,74 @@ export interface ProviderOAuthStatus {
373
420
  /** Actionable status detail shown by CLI and desktop surfaces. */
374
421
  readonly message?: string;
375
422
  }
423
+ /**
424
+ * Where an agent connection's CLI stands on this computer:
425
+ * - `missing`: not found, so the connection cannot work until it is installed;
426
+ * - `update-required`: older than the oldest version Moxxy was checked against;
427
+ * - `update-available`: works, and the vendor has published a newer one;
428
+ * - `current`: works, and nothing newer is known;
429
+ * - `unknown`: found, but its version could not be read.
430
+ */
431
+ export type AgentCliState = 'missing' | 'update-required' | 'update-available' | 'current' | 'unknown';
432
+ /**
433
+ * Where an agent CLI came from, by where its file really is: the vendor's
434
+ * installer, Homebrew, a global npm install, inside an app (which updates it
435
+ * itself), or none of these.
436
+ */
437
+ export type AgentCliOrigin = 'installer' | 'homebrew' | 'npm' | 'app' | 'unknown';
438
+ /** The last check of an agent connection's CLI, as every surface shows it. */
439
+ export interface AgentCliReport {
440
+ readonly state: AgentCliState;
441
+ /** The CLI's command ("codex"), which also names it to `moxxy agents`. */
442
+ readonly command: string;
443
+ /** The version found on this computer; null when missing or unreadable. */
444
+ readonly installed: string | null;
445
+ /** The file that was checked, which a conversation also runs; absent when missing. */
446
+ readonly path?: string;
447
+ /** Where that file came from; absent when missing. */
448
+ readonly origin?: AgentCliOrigin;
449
+ /** The vendor's latest published version; null when the registry could not be asked. */
450
+ readonly latest: string | null;
451
+ /** The oldest version Moxxy works with. */
452
+ readonly minimum: string;
453
+ /** When the check ran, in epoch milliseconds. */
454
+ readonly checkedAt: number;
455
+ /** Whether the agent is signed in; absent when the CLI is missing or the connection does not say. */
456
+ readonly signedIn?: boolean;
457
+ /** Who it is signed in as, in the agent's words (Claude's e-mail, "ChatGPT" for Codex); null when it does not say. */
458
+ readonly account?: string | null;
459
+ }
460
+ /** How an agent connection's CLI is checked; the host runs it at start and every hour. */
461
+ export interface ProviderAgentCli {
462
+ /** `refresh` asks the vendor's registry again instead of trusting a recent answer. */
463
+ check(opts?: {
464
+ readonly refresh?: boolean;
465
+ }): Promise<AgentCliReport>;
466
+ /**
467
+ * The models the agent offers the signed-in account now, as its own picker
468
+ * lists them. Asked after a check finds the agent installed and signed in;
469
+ * the connection's built-in `models` stay the answer until it succeeds.
470
+ */
471
+ models?(): Promise<ReadonlyArray<ModelDescriptor>>;
472
+ }
376
473
  export interface ProviderDef {
377
474
  readonly name: string;
378
475
  readonly models: ReadonlyArray<ModelDescriptor>;
476
+ /** What {@link LLMProvider.starterModel} says, known before the provider is built. */
477
+ readonly starterModel?: string;
478
+ /** For an agent connection, the agent's name as the person knows it ("Codex"), which surfaces use to say what it does. */
479
+ readonly agentName?: string;
480
+ /** For an agent connection, how its CLI is checked for presence and updates. */
481
+ readonly agentCli?: ProviderAgentCli;
482
+ /**
483
+ * For an agent connection, whether the agent as the person set it up acts
484
+ * without asking in `cwd` (`undefined` when it cannot tell). Read as a
485
+ * conversation starts on the connection, so its auto-approve is the truth
486
+ * from the first moment; a switch the conversation recorded always wins.
487
+ */
488
+ ownAutoApprove?(opts: {
489
+ readonly cwd: string;
490
+ }): Promise<boolean | undefined>;
379
491
  /**
380
492
  * True when the provider can return its current model catalog at runtime.
381
493
  * Hosts use this capability signal to offer live discovery instead of
@@ -403,4 +515,300 @@ export interface ProviderDef {
403
515
  */
404
516
  readonly auth?: ProviderAuthDescriptor;
405
517
  }
518
+ /**
519
+ * Agent connections: the vendor's own coding agent (Claude, Codex, OpenCode)
520
+ * does the turn, unmodified. A provider that runs one implements
521
+ * `LLMProvider.agentStep`; the shared loop then runs one agent turn instead of
522
+ * "call the model, run the tools, repeat" and records what the agent did as
523
+ * ordinary Moxxy events. Everything the agent needs from Moxxy (its tools, the
524
+ * person's approval, a Question) goes through {@link AgentStepHost}.
525
+ */
526
+ /** One turn of the vendor's agent. */
527
+ export interface AgentStepRequest {
528
+ /** The Moxxy conversation, so an adapter keeps one live agent per conversation. */
529
+ readonly sessionId: string;
530
+ /** The model the person picked, exactly as the agent names it. */
531
+ readonly model: string;
532
+ /** The person's message for this turn (or the loop's follow-up), with its images and documents. */
533
+ readonly prompt: ReadonlyArray<ContentBlock>;
534
+ readonly cwd: string;
535
+ /** The active Moxxy mode (`default`, `plan`, `goal`, …), mapped by the adapter onto the agent's own. */
536
+ readonly mode: string;
537
+ /** Moxxy tools this mode offers; the adapter lends the ones the agent lacks over Moxxy's MCP server. */
538
+ readonly tools: ReadonlyArray<ToolDef>;
539
+ /**
540
+ * Every Moxxy tool of the conversation, in any mode. Agents read their tool
541
+ * list once (Codex as a thread opens, Claude as it starts), so the adapter
542
+ * lists these and refuses, with the reason, a call to one `tools` lacks.
543
+ */
544
+ readonly allTools?: ReadonlyArray<ToolDef>;
545
+ /** The conversation's Moxxy skills now; the adapter offers the agent those meant for it, through Moxxy's MCP server. */
546
+ readonly skills?: ReadonlyArray<Skill>;
547
+ /** The agent's own session from an earlier turn of this conversation, to resume. */
548
+ readonly resumeSessionId?: string;
549
+ /**
550
+ * The conversation before this turn, from Moxxy's record, for an agent that
551
+ * starts a new session of its own while the conversation already has turns
552
+ * (its earlier session is gone, or it joins partway). `undefined` when no
553
+ * turn came before. Built only when called.
554
+ */
555
+ readonly earlierConversation?: () => string | undefined;
556
+ /**
557
+ * The turns that ran on another connection since this agent's own last turn
558
+ * of the conversation, from Moxxy's record, for an agent that goes on in its
559
+ * own session: it was away for them. `undefined` when it missed none or
560
+ * never ran here. Built only when called.
561
+ */
562
+ readonly missedTurns?: () => string | undefined;
563
+ /** The conversation's auto-approve, one state with the agent's approval policy. */
564
+ readonly autoApprove: boolean;
565
+ /**
566
+ * The conversation recorded a switch: the adapter keeps `autoApprove` as it
567
+ * is, never the agent's own setup over it. Until one is recorded, the agent
568
+ * runs and shows the way the person set it up.
569
+ */
570
+ readonly autoApproveRecorded?: boolean;
571
+ /**
572
+ * The switch in force is the agent's own setup Moxxy took on, not the
573
+ * person's choice; an agent whose own setup still asks the person about
574
+ * something (OpenCode: work outside the project) keeps asking then.
575
+ */
576
+ readonly autoApproveFromAgent?: boolean;
577
+ readonly reasoning?: {
578
+ readonly effort?: ReasoningEffort;
579
+ } | boolean;
580
+ /** The person asked for fast mode; the adapter runs the agent on its own faster tier, where it has one. */
581
+ readonly fast?: boolean;
582
+ readonly signal: AbortSignal;
583
+ readonly host: AgentStepHost;
584
+ /**
585
+ * The turn is one the agent started by itself (see `onAgentTurn`): read the
586
+ * agent's turn through to its end and send it nothing; `prompt` is only the
587
+ * marker Moxxy recorded for it.
588
+ */
589
+ readonly continuesAgentTurn?: true;
590
+ }
591
+ /** The agent started a turn by itself in a Moxxy conversation. */
592
+ export interface AgentTurnStart {
593
+ /** The Moxxy conversation (`AgentStepRequest.sessionId`). */
594
+ readonly sessionId: string;
595
+ /** What the agent took up, for the marker that opens the turn ("List files finished in the background"). */
596
+ readonly name: string;
597
+ /** The background work whose end it took up (`AgentBackgroundWork.id`), when the agent says. */
598
+ readonly workId?: string;
599
+ }
600
+ /** What Moxxy does for the agent during its turn. */
601
+ export interface AgentStepHost {
602
+ /** Run a Moxxy tool the agent called (over MCP) through Moxxy's hooks, permissions and log. */
603
+ runTool(call: AgentToolCall): Promise<AgentToolOutcome>;
604
+ /**
605
+ * Decide whether the agent may run one of its own tools. The person answers
606
+ * unless auto-approve or a standing rule does; with `policyOnly` only hooks
607
+ * and standing rules (`permissions.json`) are consulted, never the person;
608
+ * with `askPerson` the person answers even while auto-approve is on.
609
+ */
610
+ approve(request: AgentApprovalRequest): Promise<AgentApprovalDecision>;
611
+ /** Show the agent's Question in every Moxxy window of the conversation. */
612
+ ask(questions: ReadonlyArray<QuestionItem>, opts?: QuestionAskOptions): Promise<QuestionOutcome>;
613
+ }
614
+ export interface AgentToolCall {
615
+ readonly callId: string;
616
+ readonly name: string;
617
+ readonly input: unknown;
618
+ }
619
+ export type AgentToolOutcome = {
620
+ readonly ok: true;
621
+ readonly output: unknown;
622
+ } | {
623
+ readonly ok: false;
624
+ readonly message: string;
625
+ /** The person refused a tool whose refusal ends the turn: stop the agent's turn. */
626
+ readonly endsTurn?: boolean;
627
+ };
628
+ export interface AgentApprovalRequest extends AgentToolCall {
629
+ readonly description?: string;
630
+ readonly policyOnly?: boolean;
631
+ /** The agent's own setting would have asked the person about this call, and auto-approve was not their choice. */
632
+ readonly askPerson?: boolean;
633
+ }
634
+ export type AgentApprovalDecision = {
635
+ readonly allow: true; /** The person allowed it for the rest of the session. */
636
+ readonly always?: boolean;
637
+ } | {
638
+ readonly allow: false;
639
+ readonly reason: string;
640
+ };
641
+ export type AgentGoalStatus = 'active' | 'complete';
642
+ export interface AgentOwnModes {
643
+ readonly plan?: boolean;
644
+ readonly goal?: boolean;
645
+ }
646
+ /**
647
+ * Work an agent connection's agent runs in the background: a command it left
648
+ * running, or a helper agent going on after the turn that started it.
649
+ */
650
+ export interface AgentBackgroundWork {
651
+ /** The agent's id for it; a helper's is the `id` of its `subagent_*` events. */
652
+ readonly id: string;
653
+ readonly kind: 'command' | 'agent';
654
+ /** What it does, as the agent names it ("npm run dev", "inspect folder"). */
655
+ readonly label: string;
656
+ }
657
+ /**
658
+ * A time the agent of an agent connection set itself to come back to the
659
+ * conversation by itself (Claude's ScheduleWakeup, `/loop`, CronCreate).
660
+ */
661
+ export interface AgentScheduledWakeup {
662
+ /** The agent's id for it. */
663
+ readonly id: string;
664
+ /** What the agent is told when it comes back. */
665
+ readonly prompt: string;
666
+ /** When it comes back next (epoch ms); null when it cannot be told. */
667
+ readonly dueAtMs: number | null;
668
+ /** Comes back on every match of its schedule, not once. */
669
+ readonly recurring: boolean;
670
+ }
671
+ /** How a background work ended. */
672
+ export type AgentWorkEnd = 'completed' | 'failed' | 'stopped';
673
+ /** What the agent's background work did while no Moxxy turn ran, for the conversation `sessionId`. */
674
+ export interface AgentActivity {
675
+ readonly sessionId: string;
676
+ readonly events: ReadonlyArray<AgentStepEvent>;
677
+ }
678
+ /** What the agent did, in the order it did it. */
679
+ export type AgentStepEvent = {
680
+ readonly type: 'text_delta';
681
+ readonly delta: string;
682
+ } | {
683
+ readonly type: 'reasoning_delta';
684
+ readonly delta: string;
685
+ }
686
+ /** A finished assistant message; `tool_use` when the agent went on to call tools. */
687
+ | {
688
+ readonly type: 'message';
689
+ readonly text: string;
690
+ readonly stopReason?: StopReason;
691
+ } | {
692
+ readonly type: 'reasoning';
693
+ readonly text: string;
694
+ }
695
+ /** A tool the agent runs itself (its Bash, Edit, …). */
696
+ | {
697
+ readonly type: 'tool_call';
698
+ readonly callId: string;
699
+ readonly name: string;
700
+ readonly input: unknown;
701
+ } | {
702
+ readonly type: 'tool_result';
703
+ readonly callId: string;
704
+ readonly ok: boolean;
705
+ readonly output?: unknown;
706
+ readonly error?: string;
707
+ }
708
+ /** The agent's own session id, kept to resume it. */
709
+ | {
710
+ readonly type: 'session';
711
+ readonly sessionId: string;
712
+ }
713
+ /**
714
+ * The agent's real approval policy; it becomes the conversation's auto-approve.
715
+ * `elsewhere` when it changed without Moxxy (a hook, another client, the agent itself).
716
+ */
717
+ | {
718
+ readonly type: 'auto_approve';
719
+ readonly enabled: boolean;
720
+ readonly elsewhere?: true;
721
+ }
722
+ /**
723
+ * Something outside Moxxy let the agent act without asking while auto-approve
724
+ * was off, and the connection set it back: only the person turns auto-approve on.
725
+ */
726
+ | {
727
+ readonly type: 'auto_approve_restored';
728
+ }
729
+ /** The state of the agent's own goal after its turn: still open, or met. */
730
+ | {
731
+ readonly type: 'goal';
732
+ readonly status: AgentGoalStatus;
733
+ }
734
+ /** The agent's own finished plan (Markdown), waiting for the person to carry it out. */
735
+ | {
736
+ readonly type: 'plan';
737
+ readonly text: string;
738
+ }
739
+ /**
740
+ * A helper agent the agent started itself (Claude's Agent tool, a Codex subagent, OpenCode's task),
741
+ * its tool calls, and its end. `id` ties them together; it need not be a Moxxy session.
742
+ */
743
+ /** `toolsUnseen` when the agent does not report the subagent's own tool calls (OpenCode). */
744
+ | {
745
+ readonly type: 'subagent_started';
746
+ readonly id: string;
747
+ readonly label: string;
748
+ readonly agentType: string;
749
+ readonly prompt?: string;
750
+ readonly toolsUnseen?: true;
751
+ } | {
752
+ readonly type: 'subagent_tool_call';
753
+ readonly id: string;
754
+ readonly name: string;
755
+ readonly input: unknown;
756
+ }
757
+ /** What a subagent said as it worked, before its answer. */
758
+ | {
759
+ readonly type: 'subagent_message';
760
+ readonly id: string;
761
+ readonly text: string;
762
+ } | {
763
+ readonly type: 'subagent_completed';
764
+ readonly id: string;
765
+ readonly text: string;
766
+ readonly tokensUsed?: number;
767
+ readonly error?: string;
768
+ /** It ended because it was stopped (by the person, or by the agent), not because it failed. */
769
+ readonly stopped?: true;
770
+ }
771
+ /** Everything the agent runs in the background now; it replaces the list before, so a missed end cannot leave work shown running. */
772
+ | {
773
+ readonly type: 'background_work';
774
+ readonly work: ReadonlyArray<AgentBackgroundWork>;
775
+ }
776
+ /** Every time the agent set itself to come back; it replaces the list before. Not recorded in the log: it is what is planned now. */
777
+ | {
778
+ readonly type: 'scheduled_wakeups';
779
+ readonly wakeups: ReadonlyArray<AgentScheduledWakeup>;
780
+ }
781
+ /** One background work ended; `output` is what a command printed last. */
782
+ | {
783
+ readonly type: 'background_work_ended';
784
+ readonly id: string;
785
+ readonly kind: AgentBackgroundWork['kind'];
786
+ readonly label: string;
787
+ readonly status: AgentWorkEnd;
788
+ readonly summary?: string;
789
+ readonly output?: string;
790
+ }
791
+ /** How much of the person's account the agent may still use; a reached limit ends the turn without a raw error. */
792
+ | {
793
+ readonly type: 'account_limit';
794
+ readonly limit: AgentAccountLimit;
795
+ } | {
796
+ readonly type: 'usage';
797
+ readonly usage: TokenUsage;
798
+ }
799
+ /** How many tokens the agent's context holds now, when its usage is not per call (a whole turn's total). */
800
+ | {
801
+ readonly type: 'context_used';
802
+ readonly tokens: number;
803
+ }
804
+ /** The context window the agent runs the model with, as it reports it after a response. */
805
+ | {
806
+ readonly type: 'context_window';
807
+ readonly model: string;
808
+ readonly tokens: number;
809
+ } | {
810
+ readonly type: 'error';
811
+ readonly message: string;
812
+ readonly retryable: boolean;
813
+ };
406
814
  //# sourceMappingURL=provider.d.ts.map