@agent-watch-ai/edge 0.2.5 → 0.4.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 (348) hide show
  1. package/CHANGELOG.md +558 -0
  2. package/README.md +222 -97
  3. package/SECURITY.md +72 -0
  4. package/dist/billing/session-billing.d.ts +19 -0
  5. package/dist/billing/session-billing.js +52 -0
  6. package/dist/cli/args.d.ts +10 -0
  7. package/dist/cli/args.js +20 -0
  8. package/dist/cli/constants/cli.constants.d.ts +52 -4
  9. package/dist/cli/constants/cli.constants.js +56 -5
  10. package/dist/cli/context.d.ts +33 -2
  11. package/dist/cli/context.js +84 -14
  12. package/dist/cli/doctor.js +321 -33
  13. package/dist/cli/hook-check.d.ts +23 -0
  14. package/dist/cli/hook-check.js +114 -0
  15. package/dist/cli/hook.js +118 -7
  16. package/dist/cli/index.d.ts +3 -1
  17. package/dist/cli/index.js +3 -1
  18. package/dist/cli/misc.d.ts +11 -0
  19. package/dist/cli/misc.js +80 -4
  20. package/dist/cli/npx-install.d.ts +37 -0
  21. package/dist/cli/npx-install.js +79 -0
  22. package/dist/cli/open-browser.d.ts +39 -0
  23. package/dist/cli/open-browser.js +62 -0
  24. package/dist/cli/setup.d.ts +17 -8
  25. package/dist/cli/setup.js +553 -103
  26. package/dist/cli/status.js +82 -13
  27. package/dist/cli/toggle.d.ts +9 -0
  28. package/dist/cli/toggle.js +117 -0
  29. package/dist/cli/types/cli.types.d.ts +43 -3
  30. package/dist/cli/ui.d.ts +7 -0
  31. package/dist/cli/ui.js +10 -1
  32. package/dist/cli/uninstall.js +39 -2
  33. package/dist/cli/update.d.ts +17 -0
  34. package/dist/cli/update.js +76 -0
  35. package/dist/cli.js +110 -12
  36. package/dist/config/config-store.d.ts +57 -0
  37. package/dist/config/config-store.js +250 -12
  38. package/dist/config/config.d.ts +53 -6
  39. package/dist/config/config.js +66 -6
  40. package/dist/config/constants/config.constants.d.ts +116 -6
  41. package/dist/config/constants/config.constants.js +131 -8
  42. package/dist/config/destination.d.ts +24 -0
  43. package/dist/config/destination.js +33 -0
  44. package/dist/config/index.d.ts +7 -4
  45. package/dist/config/index.js +5 -3
  46. package/dist/config/repo-config.d.ts +11 -7
  47. package/dist/config/repo-config.js +64 -15
  48. package/dist/config/root-config.d.ts +72 -0
  49. package/dist/config/root-config.js +170 -0
  50. package/dist/config/schemas/config.schema.d.ts +831 -84
  51. package/dist/config/schemas/config.schema.js +398 -16
  52. package/dist/config/types/config.types.d.ts +15 -1
  53. package/dist/config/types/destination.types.d.ts +8 -0
  54. package/dist/core/async.d.ts +36 -0
  55. package/dist/core/async.js +68 -0
  56. package/dist/core/index.d.ts +1 -1
  57. package/dist/core/index.js +1 -1
  58. package/dist/core/object.d.ts +5 -0
  59. package/dist/core/object.js +9 -4
  60. package/dist/core/pipe.d.ts +0 -13
  61. package/dist/core/pipe.js +1 -9
  62. package/dist/core/types/core.types.d.ts +9 -0
  63. package/dist/core/types/core.types.js +0 -3
  64. package/dist/core/which.d.ts +14 -0
  65. package/dist/core/which.js +43 -3
  66. package/dist/credentials/budget.d.ts +9 -0
  67. package/dist/credentials/budget.js +16 -0
  68. package/dist/credentials/command-runner.d.ts +16 -0
  69. package/dist/credentials/command-runner.js +37 -0
  70. package/dist/credentials/constants/credentials.constants.d.ts +119 -0
  71. package/dist/credentials/constants/credentials.constants.js +120 -0
  72. package/dist/credentials/credential-status.d.ts +14 -0
  73. package/dist/credentials/credential-status.js +38 -0
  74. package/dist/credentials/credentials.d.ts +86 -0
  75. package/dist/credentials/credentials.js +278 -0
  76. package/dist/credentials/device-api.d.ts +73 -0
  77. package/dist/credentials/device-api.js +161 -0
  78. package/dist/credentials/device-state.d.ts +31 -0
  79. package/dist/credentials/device-state.js +51 -0
  80. package/dist/credentials/identity.d.ts +73 -0
  81. package/dist/credentials/identity.js +101 -0
  82. package/dist/credentials/index.d.ts +7 -0
  83. package/dist/credentials/index.js +5 -0
  84. package/dist/credentials/migration.d.ts +46 -0
  85. package/dist/credentials/migration.js +164 -0
  86. package/dist/credentials/schemas/device-api.schema.d.ts +77 -0
  87. package/dist/credentials/schemas/device-api.schema.js +33 -0
  88. package/dist/credentials/schemas/device-state.schema.d.ts +51 -0
  89. package/dist/credentials/schemas/device-state.schema.js +20 -0
  90. package/dist/credentials/secret-store.d.ts +54 -0
  91. package/dist/credentials/secret-store.js +217 -0
  92. package/dist/credentials/sign-in.d.ts +31 -0
  93. package/dist/credentials/sign-in.js +105 -0
  94. package/dist/credentials/token-refresher.d.ts +39 -0
  95. package/dist/credentials/token-refresher.js +185 -0
  96. package/dist/credentials/types/credentials.types.d.ts +206 -0
  97. package/dist/credentials/types/credentials.types.js +1 -0
  98. package/dist/enforcement/constants/enforcement.constants.d.ts +47 -1
  99. package/dist/enforcement/constants/enforcement.constants.js +56 -0
  100. package/dist/enforcement/decision-cache.d.ts +20 -1
  101. package/dist/enforcement/decision-cache.js +65 -2
  102. package/dist/enforcement/decision-client.d.ts +9 -8
  103. package/dist/enforcement/decision-client.js +64 -17
  104. package/dist/enforcement/enforcement.d.ts +23 -2
  105. package/dist/enforcement/enforcement.js +107 -17
  106. package/dist/enforcement/index.d.ts +4 -3
  107. package/dist/enforcement/index.js +3 -2
  108. package/dist/enforcement/types/enforcement.types.d.ts +66 -2
  109. package/dist/enrollment/constants/enrollment.constants.d.ts +2 -6
  110. package/dist/enrollment/constants/enrollment.constants.js +2 -6
  111. package/dist/enrollment/enrollment.d.ts +16 -0
  112. package/dist/enrollment/enrollment.js +54 -0
  113. package/dist/enrollment/index.d.ts +3 -7
  114. package/dist/enrollment/index.js +1 -1
  115. package/dist/enrollment/types/enrollment.types.d.ts +9 -13
  116. package/dist/events/constants/enrich.constants.d.ts +15 -0
  117. package/dist/events/constants/enrich.constants.js +15 -0
  118. package/dist/events/constants/events.constants.d.ts +6 -2
  119. package/dist/events/constants/events.constants.js +5 -1
  120. package/dist/events/enrich.js +92 -10
  121. package/dist/events/event-id.d.ts +0 -8
  122. package/dist/events/event-id.js +0 -10
  123. package/dist/events/index.d.ts +2 -2
  124. package/dist/events/index.js +1 -1
  125. package/dist/events/product-event.d.ts +9 -6
  126. package/dist/events/types/repo-snapshot.types.d.ts +7 -0
  127. package/dist/events/types/session-billing.types.d.ts +16 -0
  128. package/dist/events/types/session-billing.types.js +1 -0
  129. package/dist/feature/constants/feature.constants.d.ts +7 -0
  130. package/dist/feature/constants/feature.constants.js +7 -0
  131. package/dist/feature/index.d.ts +1 -1
  132. package/dist/feature/index.js +1 -1
  133. package/dist/feature/ticket-candidates.d.ts +14 -0
  134. package/dist/feature/ticket-candidates.js +26 -8
  135. package/dist/git/blob-hash.d.ts +21 -0
  136. package/dist/git/blob-hash.js +69 -0
  137. package/dist/git/checkout-root.d.ts +27 -0
  138. package/dist/git/checkout-root.js +75 -0
  139. package/dist/git/constants/git.constants.d.ts +160 -0
  140. package/dist/git/constants/git.constants.js +181 -0
  141. package/dist/git/fingerprint.d.ts +74 -0
  142. package/dist/git/fingerprint.js +219 -0
  143. package/dist/git/gate-checkout.d.ts +44 -0
  144. package/dist/git/gate-checkout.js +201 -0
  145. package/dist/git/git-context.d.ts +45 -0
  146. package/dist/git/git-context.js +61 -3
  147. package/dist/git/index.d.ts +4 -2
  148. package/dist/git/index.js +2 -1
  149. package/dist/git/manifest-repository.d.ts +13 -0
  150. package/dist/git/manifest-repository.js +92 -0
  151. package/dist/git/repo-snapshot.d.ts +29 -3
  152. package/dist/git/repo-snapshot.js +110 -7
  153. package/dist/git/repository-root.d.ts +39 -0
  154. package/dist/git/repository-root.js +131 -0
  155. package/dist/git/types/git.types.d.ts +55 -0
  156. package/dist/git/types/repository-root.types.d.ts +11 -0
  157. package/dist/git/types/repository-root.types.js +1 -0
  158. package/dist/git/types/snapshot.types.d.ts +9 -0
  159. package/dist/pipeline/constants/pipeline.constants.d.ts +10 -0
  160. package/dist/pipeline/constants/pipeline.constants.js +10 -0
  161. package/dist/pipeline/hook-pipeline.js +410 -33
  162. package/dist/pipeline/types/pipeline.types.d.ts +39 -4
  163. package/dist/privacy/constants/privacy.constants.js +15 -1
  164. package/dist/privacy/index.d.ts +1 -0
  165. package/dist/privacy/index.js +1 -0
  166. package/dist/privacy/product-capture.d.ts +12 -0
  167. package/dist/privacy/product-capture.js +75 -0
  168. package/dist/privacy/sanitizer.d.ts +21 -3
  169. package/dist/privacy/sanitizer.js +52 -8
  170. package/dist/process/ancestors.d.ts +39 -0
  171. package/dist/process/ancestors.js +121 -0
  172. package/dist/process/constants/process.constants.d.ts +34 -0
  173. package/dist/process/constants/process.constants.js +34 -0
  174. package/dist/process/index.d.ts +7 -0
  175. package/dist/process/index.js +2 -0
  176. package/dist/process/types/process.types.d.ts +23 -0
  177. package/dist/process/types/process.types.js +1 -0
  178. package/dist/providers/antigravity/antigravity.adapter.d.ts +12 -1
  179. package/dist/providers/antigravity/antigravity.adapter.js +21 -3
  180. package/dist/providers/antigravity/antigravity.detect.d.ts +0 -9
  181. package/dist/providers/antigravity/antigravity.detect.js +1 -1
  182. package/dist/providers/antigravity/antigravity.provider.js +3 -2
  183. package/dist/providers/antigravity/constants/antigravity.constants.d.ts +2 -0
  184. package/dist/providers/antigravity/constants/antigravity.constants.js +2 -0
  185. package/dist/providers/claude/claude.adapter.d.ts +11 -1
  186. package/dist/providers/claude/claude.adapter.js +26 -5
  187. package/dist/providers/claude/claude.otel.d.ts +32 -18
  188. package/dist/providers/claude/claude.otel.js +81 -6
  189. package/dist/providers/claude/claude.provider.js +5 -2
  190. package/dist/providers/claude/constants/claude.constants.d.ts +2 -0
  191. package/dist/providers/claude/constants/claude.constants.js +2 -0
  192. package/dist/providers/claude/constants/claude.otel.constants.d.ts +4 -0
  193. package/dist/providers/claude/constants/claude.otel.constants.js +8 -0
  194. package/dist/providers/codex/codex.adapter.d.ts +15 -1
  195. package/dist/providers/codex/codex.adapter.js +29 -5
  196. package/dist/providers/codex/codex.otel.d.ts +36 -3
  197. package/dist/providers/codex/codex.otel.js +199 -32
  198. package/dist/providers/codex/codex.provider.js +5 -2
  199. package/dist/providers/codex/constants/codex.constants.d.ts +2 -0
  200. package/dist/providers/codex/constants/codex.constants.js +16 -0
  201. package/dist/providers/codex/constants/codex.otel.constants.d.ts +10 -0
  202. package/dist/providers/codex/constants/codex.otel.constants.js +10 -0
  203. package/dist/providers/constants/provider.constants.d.ts +8 -3
  204. package/dist/providers/constants/provider.constants.js +8 -3
  205. package/dist/providers/cursor/constants/cursor.constants.d.ts +9 -0
  206. package/dist/providers/cursor/constants/cursor.constants.js +9 -0
  207. package/dist/providers/cursor/cursor.adapter.d.ts +33 -1
  208. package/dist/providers/cursor/cursor.adapter.js +129 -4
  209. package/dist/providers/cursor/cursor.detect.d.ts +0 -7
  210. package/dist/providers/cursor/cursor.detect.js +1 -1
  211. package/dist/providers/cursor/cursor.provider.js +5 -2
  212. package/dist/providers/gemini/constants/gemini.constants.d.ts +9 -0
  213. package/dist/providers/gemini/constants/gemini.constants.js +9 -0
  214. package/dist/providers/gemini/constants/gemini.otel.constants.d.ts +9 -1
  215. package/dist/providers/gemini/constants/gemini.otel.constants.js +9 -0
  216. package/dist/providers/gemini/gemini.adapter.d.ts +14 -1
  217. package/dist/providers/gemini/gemini.adapter.js +25 -5
  218. package/dist/providers/gemini/gemini.detect.d.ts +0 -7
  219. package/dist/providers/gemini/gemini.detect.js +1 -1
  220. package/dist/providers/gemini/gemini.otel.d.ts +30 -21
  221. package/dist/providers/gemini/gemini.otel.js +166 -22
  222. package/dist/providers/gemini/gemini.provider.js +2 -1
  223. package/dist/providers/index.d.ts +1 -1
  224. package/dist/providers/index.js +1 -1
  225. package/dist/providers/loaders.d.ts +10 -0
  226. package/dist/providers/loaders.js +40 -0
  227. package/dist/providers/provider.d.ts +11 -0
  228. package/dist/providers/provider.js +1 -1
  229. package/dist/providers/registry.d.ts +11 -8
  230. package/dist/providers/registry.js +11 -15
  231. package/dist/providers/shared/bearer-rewrite.d.ts +19 -0
  232. package/dist/providers/shared/bearer-rewrite.js +46 -0
  233. package/dist/providers/shared/constants/hook-refusal.constants.d.ts +7 -0
  234. package/dist/providers/shared/constants/hook-refusal.constants.js +7 -0
  235. package/dist/providers/shared/constants/shell-directories.constants.d.ts +30 -0
  236. package/dist/providers/shared/constants/shell-directories.constants.js +39 -0
  237. package/dist/providers/shared/constants/tooling.constants.d.ts +24 -2
  238. package/dist/providers/shared/constants/tooling.constants.js +25 -3
  239. package/dist/providers/shared/event-builder.d.ts +12 -14
  240. package/dist/providers/shared/event-builder.js +20 -14
  241. package/dist/providers/shared/exporter-allowlist.d.ts +20 -0
  242. package/dist/providers/shared/exporter-allowlist.js +49 -0
  243. package/dist/providers/shared/hook-config.d.ts +2 -21
  244. package/dist/providers/shared/hook-config.js +5 -4
  245. package/dist/providers/shared/hook-refusal.d.ts +12 -0
  246. package/dist/providers/shared/hook-refusal.js +17 -1
  247. package/dist/providers/shared/install-record.d.ts +12 -2
  248. package/dist/providers/shared/install-record.js +5 -2
  249. package/dist/providers/shared/shell-directories.d.ts +24 -0
  250. package/dist/providers/shared/shell-directories.js +90 -0
  251. package/dist/providers/shared/tooling.d.ts +40 -1
  252. package/dist/providers/shared/tooling.js +70 -1
  253. package/dist/providers/shared/types/adapter.types.d.ts +1 -2
  254. package/dist/providers/types/provider.types.d.ts +81 -1
  255. package/dist/snapshot/constants/snapshot.constants.d.ts +32 -0
  256. package/dist/snapshot/constants/snapshot.constants.js +33 -0
  257. package/dist/snapshot/snapshot-event.js +52 -11
  258. package/dist/snapshot/snapshot-pipeline.js +1 -1
  259. package/dist/snapshot/types/snapshot.types.d.ts +2 -0
  260. package/dist/storage/atomic-file.d.ts +21 -0
  261. package/dist/storage/atomic-file.js +20 -1
  262. package/dist/storage/constants/storage.constants.d.ts +19 -0
  263. package/dist/storage/constants/storage.constants.js +19 -0
  264. package/dist/storage/disabled.d.ts +13 -0
  265. package/dist/storage/disabled.js +24 -0
  266. package/dist/storage/index.d.ts +2 -0
  267. package/dist/storage/index.js +2 -0
  268. package/dist/storage/paths.js +3 -2
  269. package/dist/storage/schemas/storage.schema.d.ts +72 -0
  270. package/dist/storage/schemas/storage.schema.js +6 -0
  271. package/dist/storage/sweep-marker.d.ts +19 -0
  272. package/dist/storage/sweep-marker.js +55 -0
  273. package/dist/storage/types/storage.types.d.ts +2 -0
  274. package/dist/storage/uninstalled.d.ts +58 -0
  275. package/dist/storage/uninstalled.js +107 -0
  276. package/dist/transport/auth-block.d.ts +66 -0
  277. package/dist/transport/auth-block.js +129 -0
  278. package/dist/transport/constants/transport.constants.d.ts +82 -3
  279. package/dist/transport/constants/transport.constants.js +83 -4
  280. package/dist/transport/cooldown.js +8 -1
  281. package/dist/transport/delivery.d.ts +14 -6
  282. package/dist/transport/delivery.js +80 -55
  283. package/dist/transport/http-transport.d.ts +1 -0
  284. package/dist/transport/http-transport.js +52 -10
  285. package/dist/transport/index.d.ts +6 -3
  286. package/dist/transport/index.js +3 -0
  287. package/dist/transport/queue-partition.d.ts +91 -0
  288. package/dist/transport/queue-partition.js +143 -0
  289. package/dist/transport/queue.d.ts +99 -20
  290. package/dist/transport/queue.js +210 -69
  291. package/dist/transport/response-body.d.ts +25 -0
  292. package/dist/transport/response-body.js +64 -0
  293. package/dist/transport/send.d.ts +11 -0
  294. package/dist/transport/send.js +17 -0
  295. package/dist/transport/types/delivery-flow.types.d.ts +19 -0
  296. package/dist/transport/types/delivery-flow.types.js +1 -0
  297. package/dist/transport/types/transport.types.d.ts +45 -0
  298. package/dist/turns/claude-transcript.d.ts +19 -1
  299. package/dist/turns/claude-transcript.js +46 -1
  300. package/dist/turns/codex-originator.d.ts +11 -0
  301. package/dist/turns/codex-originator.js +31 -0
  302. package/dist/turns/codex-transcript.d.ts +30 -0
  303. package/dist/turns/codex-transcript.js +88 -0
  304. package/dist/turns/constants/turns.constants.d.ts +141 -5
  305. package/dist/turns/constants/turns.constants.js +155 -5
  306. package/dist/turns/file-identity.d.ts +27 -0
  307. package/dist/turns/file-identity.js +48 -0
  308. package/dist/turns/gemini-transcript.d.ts +30 -0
  309. package/dist/turns/gemini-transcript.js +96 -0
  310. package/dist/turns/index.d.ts +3 -3
  311. package/dist/turns/index.js +1 -1
  312. package/dist/turns/inherited-checkout.d.ts +54 -0
  313. package/dist/turns/inherited-checkout.js +155 -0
  314. package/dist/turns/native-session-titles.d.ts +26 -0
  315. package/dist/turns/native-session-titles.js +102 -0
  316. package/dist/turns/transcript.d.ts +3 -2
  317. package/dist/turns/transcript.js +5 -1
  318. package/dist/turns/turn-state.d.ts +224 -3
  319. package/dist/turns/turn-state.js +456 -21
  320. package/dist/turns/turn-summary.d.ts +1 -14
  321. package/dist/turns/turn-summary.js +87 -51
  322. package/dist/turns/turn-tracker.d.ts +21 -2
  323. package/dist/turns/turn-tracker.js +379 -56
  324. package/dist/turns/types/transcript.types.d.ts +5 -0
  325. package/dist/turns/types/turn-state.types.d.ts +116 -5
  326. package/dist/turns/types/turn-summary.types.d.ts +64 -14
  327. package/dist/turns/types/turn-tracker.types.d.ts +27 -1
  328. package/dist/turns/work-checkout.d.ts +67 -0
  329. package/dist/turns/work-checkout.js +700 -0
  330. package/dist/untraced/constants/untraced.constants.d.ts +31 -0
  331. package/dist/untraced/constants/untraced.constants.js +63 -0
  332. package/dist/untraced/untraced.d.ts +35 -0
  333. package/dist/untraced/untraced.js +105 -0
  334. package/dist/update/constants/update.constants.d.ts +18 -0
  335. package/dist/update/constants/update.constants.js +20 -0
  336. package/dist/update/update-check.d.ts +52 -0
  337. package/dist/update/update-check.js +113 -0
  338. package/docs/AUDIT_PROMPT.md +129 -0
  339. package/docs/DATA_HANDLING.md +655 -0
  340. package/docs/ENTERPRISE_DEPLOYMENT.md +194 -0
  341. package/docs/PERFORMANCE.md +81 -0
  342. package/package.json +14 -4
  343. package/dist/enrollment/enrollment-provider.d.ts +0 -5
  344. package/dist/enrollment/manual-enrollment.d.ts +0 -32
  345. package/dist/enrollment/manual-enrollment.js +0 -72
  346. package/example/README.md +0 -43
  347. package/example/server.mjs +0 -240
  348. /package/dist/{enrollment/enrollment-provider.js → config/types/destination.types.js} +0 -0
@@ -1,34 +1,60 @@
1
1
  import { z } from 'zod';
2
2
  /**
3
- * Everything is captured by default so the backend gets full turn context
4
- * (prompts, responses, tool I/O, tokens); users opt out per field. Secrets are
5
- * still scrubbed by the sanitizer regardless of these flags.
3
+ * Content is opt-IN; metadata stays on.
4
+ *
5
+ * `promptText` carries what the developer typed, bounded and scrubbed, so the
6
+ * backend can tell what a session with no repository was about. `toolInput` and
7
+ * `toolOutput` carry what went into and came out of a tool. `sessionTitle`
8
+ * carries the session's name and generated title. All four are
9
+ * material an IT review will not wave through, so nothing ships them unless
10
+ * someone deliberately turned them on. The agent's response text has no flag:
11
+ * it never leaves the machine. An older config's `prompts` / `responses` keys
12
+ * are stripped here, and the next `setup` removes them from the file.
13
+ *
14
+ * `git` and `files` are a different kind of thing: they gate the
15
+ * repo/branch/SHA and the per-file *path*, which is metadata about where work
16
+ * happened, not the work itself — and it is what feature and project
17
+ * attribution is made of, so it stays on by default.
18
+ *
19
+ * Independent of all of them: `contentEvidence()` still records a length and a
20
+ * SHA-256 of prompts and responses, and the sanitizer scrubs secrets from
21
+ * whatever does get sent.
22
+ *
23
+ * The content flags are gated a second time by the global
24
+ * `contentCaptureConsent` marker below: a config carrying `promptText: true`
25
+ * without it collects nothing, which is what keeps an upgrade of an older
26
+ * install from silently starting to ship content.
6
27
  */
7
28
  export declare const captureSchema: z.ZodObject<{
8
- prompts: z.ZodDefault<z.ZodBoolean>;
9
- responses: z.ZodDefault<z.ZodBoolean>;
10
- toolInput: z.ZodDefault<z.ZodBoolean>;
11
- toolOutput: z.ZodDefault<z.ZodBoolean>;
12
- git: z.ZodDefault<z.ZodBoolean>;
13
- files: z.ZodDefault<z.ZodBoolean>;
14
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
15
- prompts: z.ZodDefault<z.ZodBoolean>;
16
- responses: z.ZodDefault<z.ZodBoolean>;
17
- toolInput: z.ZodDefault<z.ZodBoolean>;
18
- toolOutput: z.ZodDefault<z.ZodBoolean>;
19
- git: z.ZodDefault<z.ZodBoolean>;
20
- files: z.ZodDefault<z.ZodBoolean>;
21
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
22
- prompts: z.ZodDefault<z.ZodBoolean>;
23
- responses: z.ZodDefault<z.ZodBoolean>;
29
+ promptText: z.ZodDefault<z.ZodBoolean>;
24
30
  toolInput: z.ZodDefault<z.ZodBoolean>;
25
31
  toolOutput: z.ZodDefault<z.ZodBoolean>;
32
+ /** The provider's native session name/title, scrubbed and bounded. A generated title can paraphrase the first prompt; the edge never derives one from the prompt. */
33
+ sessionTitle: z.ZodDefault<z.ZodBoolean>;
26
34
  git: z.ZodDefault<z.ZodBoolean>;
27
35
  files: z.ZodDefault<z.ZodBoolean>;
28
- }, z.ZodTypeAny, "passthrough">>;
36
+ /** MCP server and tool names in `tools_used`; false folds them into `mcp`. Metadata, not content. */
37
+ mcpNames: z.ZodDefault<z.ZodBoolean>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ promptText: boolean;
40
+ toolInput: boolean;
41
+ toolOutput: boolean;
42
+ sessionTitle: boolean;
43
+ git: boolean;
44
+ files: boolean;
45
+ mcpNames: boolean;
46
+ }, {
47
+ promptText?: boolean | undefined;
48
+ toolInput?: boolean | undefined;
49
+ toolOutput?: boolean | undefined;
50
+ sessionTitle?: boolean | undefined;
51
+ git?: boolean | undefined;
52
+ files?: boolean | undefined;
53
+ mcpNames?: boolean | undefined;
54
+ }>;
29
55
  /** Tuning for the in-hook send and the machine-global offline queue. */
30
56
  export declare const deliverySchema: z.ZodObject<{
31
- /** Budget for the in-hook direct send. Keep small: we are on the agent's critical path. */
57
+ /** Shared network budget for direct send and backlog retries in one delivery pass. */
32
58
  timeoutMs: z.ZodDefault<z.ZodNumber>;
33
59
  /** How many queued events one drain pass may send. */
34
60
  drainBatchSize: z.ZodDefault<z.ZodNumber>;
@@ -108,41 +134,276 @@ export declare const emitSchema: z.ZodObject<{
108
134
  llmCalls?: boolean | undefined;
109
135
  turnSummaries?: boolean | undefined;
110
136
  }>;
137
+ /**
138
+ * Whether the edge may send a bearer and records to this URL. See `judgeUrl`.
139
+ *
140
+ * @param value - The URL as written.
141
+ * @param trusted - Origins this machine trusts (`customEndpoints`).
142
+ * @returns True when the edge may send there.
143
+ */
144
+ export declare function isAllowedHost(value: string, trusted: ReadonlySet<string>): boolean;
145
+ /**
146
+ * The origin of a URL the edge could deliver to, for recording trust in it.
147
+ *
148
+ * @param value - The URL as written.
149
+ * @returns The origin, or undefined when the URL is not deliverable.
150
+ */
151
+ export declare function deliverableOrigin(value: string): string | undefined;
152
+ /**
153
+ * Whether only a trusted origin would let this URL through: deliverable, but
154
+ * neither an Agent Watch host nor loopback.
155
+ *
156
+ * @param value - The URL as written.
157
+ * @returns True when sending there needs `--allow-custom-endpoint`.
158
+ */
159
+ export declare function needsTrust(value: string): boolean;
160
+ /** The config with its refused URLs nulled, what to say about them, and what was grandfathered. */
161
+ export interface ScreenedConfig {
162
+ readonly value: unknown;
163
+ readonly warnings: readonly string[];
164
+ /** Origins added to `customEndpoints` because the file predates the allowlist. */
165
+ readonly grandfathered: readonly string[];
166
+ }
167
+ /**
168
+ * Every backend URL in a raw config file, judged once, before the schema reads it.
169
+ *
170
+ * The one place both the refusal and its report come from: one walk over the
171
+ * machine fields and every `roots[]` entry, one parse per URL. A refused value
172
+ * becomes `null` — "a URL was written here and refused" — rather than fatal.
173
+ * Failing the parse instead took the whole file down with it, and `loadConfig`
174
+ * answers a failed parse with `fallbackConfig()` — no endpoint, no token, no
175
+ * installation id:
176
+ *
177
+ * - An upgrade of a fleet pointed at an internal `http://collector.corp:4318`
178
+ * lost its *token* along with its endpoint, so every hook queued into
179
+ * `unconfigured/` while the existing backlog stayed pinned to
180
+ * `sha256(token)` — a partition nothing would ever drain again.
181
+ * - `roots` is a record of these same fields, so one typo in one project's
182
+ * entry stopped delivery for every other project on the machine.
183
+ *
184
+ * `null` and not absent, and that distinction is the whole point for a `roots[]`
185
+ * entry. `applyRootOverride` lays the override over the global config through
186
+ * `compact`, which skips undefined-valued keys so an override cannot erase a
187
+ * global — so an *absent* endpoint made the root inherit the machine's, and a
188
+ * consultant's `roots["/work/clientA"]` would have had every prompt in that
189
+ * directory POSTed to the *other* tenant's backend under clientA's own bearer.
190
+ * `null` survives `compact`, so the root's events queue under its own token
191
+ * instead of leaving.
192
+ *
193
+ * Anything present that is not a deliverable *string* counts: a number, an array
194
+ * or a `null` a templating tool emitted for a missing value is refused and
195
+ * reported, not waved through as absent.
196
+ *
197
+ * With `grandfather`, a URL only trust would let through is trusted instead of
198
+ * refused: the file predates the allowlist, and that backend was the
199
+ * developer's choice before there was a flag to say so.
200
+ *
201
+ * @param raw - The parsed JSON of the config file, whatever shape it has.
202
+ * @param grandfather - The file predates the allowlist.
203
+ * @returns The value to hand the schema, the warnings, and the origins grandfathered.
204
+ */
205
+ export declare function screenConfigUrls(raw: unknown, grandfather: boolean): ScreenedConfig;
206
+ /**
207
+ * One project root's identity. Only the fields that decide *who* the events
208
+ * belong to and *where* they go: capture and emission stay machine-wide, so a
209
+ * second tenant cannot quietly widen what is collected under it.
210
+ *
211
+ * `.strip()` rather than passthrough, so a nested `roots` key cannot recurse
212
+ * and a mistyped block cannot smuggle in delivery tuning.
213
+ */
214
+ export declare const rootOverrideSchema: z.ZodObject<{
215
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
216
+ eventsUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
217
+ otlpUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
218
+ token: z.ZodOptional<z.ZodString>;
219
+ device: z.ZodCatch<z.ZodOptional<z.ZodObject<{
220
+ id: z.ZodString;
221
+ store: z.ZodEnum<["macos-keychain", "libsecret", "windows-dpapi", "file"]>;
222
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodString>>;
223
+ source: z.ZodCatch<z.ZodOptional<z.ZodLiteral<"batch-code">>>;
224
+ codeId: z.ZodCatch<z.ZodOptional<z.ZodString>>;
225
+ }, "strip", z.ZodTypeAny, {
226
+ id: string;
227
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
228
+ endpoint?: string | undefined;
229
+ source?: "batch-code" | undefined;
230
+ codeId?: string | undefined;
231
+ }, {
232
+ id: string;
233
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
234
+ endpoint?: unknown;
235
+ source?: unknown;
236
+ codeId?: unknown;
237
+ }>>>;
238
+ installationId: z.ZodOptional<z.ZodString>;
239
+ developerEmail: z.ZodOptional<z.ZodString>;
240
+ developerName: z.ZodOptional<z.ZodString>;
241
+ }, "strip", z.ZodTypeAny, {
242
+ endpoint?: string | null | undefined;
243
+ token?: string | undefined;
244
+ eventsUrl?: string | null | undefined;
245
+ otlpUrl?: string | null | undefined;
246
+ device?: {
247
+ id: string;
248
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
249
+ endpoint?: string | undefined;
250
+ source?: "batch-code" | undefined;
251
+ codeId?: string | undefined;
252
+ } | undefined;
253
+ installationId?: string | undefined;
254
+ developerEmail?: string | undefined;
255
+ developerName?: string | undefined;
256
+ }, {
257
+ endpoint?: unknown;
258
+ token?: string | undefined;
259
+ eventsUrl?: unknown;
260
+ otlpUrl?: unknown;
261
+ device?: unknown;
262
+ installationId?: string | undefined;
263
+ developerEmail?: string | undefined;
264
+ developerName?: string | undefined;
265
+ }>;
111
266
  /** The whole configuration file. Passthrough: forward compatibility. */
112
- export declare const configSchema: z.ZodObject<{
267
+ export declare const configSchema: z.ZodEffects<z.ZodObject<{
113
268
  schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
114
269
  /** Backend base URL, e.g. https://backend.example.com */
115
- endpoint: z.ZodOptional<z.ZodString>;
270
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
116
271
  /** Overrides; derived from endpoint when absent. */
117
- eventsUrl: z.ZodOptional<z.ZodString>;
118
- otlpUrl: z.ZodOptional<z.ZodString>;
119
- enforcementUrl: z.ZodOptional<z.ZodString>;
272
+ eventsUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
273
+ otlpUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
274
+ enforcementUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
275
+ /** The install key, until it is exchanged for `device` (AWT-356). */
120
276
  token: z.ZodOptional<z.ZodString>;
277
+ device: z.ZodCatch<z.ZodOptional<z.ZodObject<{
278
+ id: z.ZodString;
279
+ store: z.ZodEnum<["macos-keychain", "libsecret", "windows-dpapi", "file"]>;
280
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodString>>;
281
+ source: z.ZodCatch<z.ZodOptional<z.ZodLiteral<"batch-code">>>;
282
+ codeId: z.ZodCatch<z.ZodOptional<z.ZodString>>;
283
+ }, "strip", z.ZodTypeAny, {
284
+ id: string;
285
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
286
+ endpoint?: string | undefined;
287
+ source?: "batch-code" | undefined;
288
+ codeId?: string | undefined;
289
+ }, {
290
+ id: string;
291
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
292
+ endpoint?: unknown;
293
+ source?: unknown;
294
+ codeId?: unknown;
295
+ }>>>;
296
+ /**
297
+ * The organization an enrollment URL named. Beside no credential it marks an
298
+ * MDM install whose developer has not signed in yet: it sends nothing.
299
+ */
300
+ organizationId: z.ZodOptional<z.ZodString>;
121
301
  installationId: z.ZodOptional<z.ZodString>;
122
302
  /** Developer identity attached to turn summaries; falls back to `git config user.email`. */
123
303
  developerEmail: z.ZodOptional<z.ZodString>;
304
+ /**
305
+ * What to call this developer in the platform's views; falls back to
306
+ * `git config user.name`. Never an identity: nothing is keyed on it, and a
307
+ * turn is still reported under `developerEmail`.
308
+ */
309
+ developerName: z.ZodOptional<z.ZodString>;
310
+ /**
311
+ * Absolute project root -> the identity to use beneath it. Longest match
312
+ * wins, so a nested checkout can override the workspace above it.
313
+ */
314
+ roots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
315
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
316
+ eventsUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
317
+ otlpUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
318
+ token: z.ZodOptional<z.ZodString>;
319
+ device: z.ZodCatch<z.ZodOptional<z.ZodObject<{
320
+ id: z.ZodString;
321
+ store: z.ZodEnum<["macos-keychain", "libsecret", "windows-dpapi", "file"]>;
322
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodString>>;
323
+ source: z.ZodCatch<z.ZodOptional<z.ZodLiteral<"batch-code">>>;
324
+ codeId: z.ZodCatch<z.ZodOptional<z.ZodString>>;
325
+ }, "strip", z.ZodTypeAny, {
326
+ id: string;
327
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
328
+ endpoint?: string | undefined;
329
+ source?: "batch-code" | undefined;
330
+ codeId?: string | undefined;
331
+ }, {
332
+ id: string;
333
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
334
+ endpoint?: unknown;
335
+ source?: unknown;
336
+ codeId?: unknown;
337
+ }>>>;
338
+ installationId: z.ZodOptional<z.ZodString>;
339
+ developerEmail: z.ZodOptional<z.ZodString>;
340
+ developerName: z.ZodOptional<z.ZodString>;
341
+ }, "strip", z.ZodTypeAny, {
342
+ endpoint?: string | null | undefined;
343
+ token?: string | undefined;
344
+ eventsUrl?: string | null | undefined;
345
+ otlpUrl?: string | null | undefined;
346
+ device?: {
347
+ id: string;
348
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
349
+ endpoint?: string | undefined;
350
+ source?: "batch-code" | undefined;
351
+ codeId?: string | undefined;
352
+ } | undefined;
353
+ installationId?: string | undefined;
354
+ developerEmail?: string | undefined;
355
+ developerName?: string | undefined;
356
+ }, {
357
+ endpoint?: unknown;
358
+ token?: string | undefined;
359
+ eventsUrl?: unknown;
360
+ otlpUrl?: unknown;
361
+ device?: unknown;
362
+ installationId?: string | undefined;
363
+ developerEmail?: string | undefined;
364
+ developerName?: string | undefined;
365
+ }>>>;
366
+ contentCaptureConsent: z.ZodDefault<z.ZodBoolean>;
367
+ /**
368
+ * Origins this machine sends to outside the Agent Watch hosts. Written by
369
+ * `setup --allow-custom-endpoint` (exactly the origin that run named) or
370
+ * grandfathered from a file older than the allowlist; shown by `status` and
371
+ * `doctor`. A malformed value reads as no trust without failing the file.
372
+ */
373
+ customEndpoints: z.ZodDefault<z.ZodCatch<z.ZodArray<z.ZodString, "many">>>;
374
+ /** Present on a file written after the allowlist; see `ALLOWLIST_VERSION_KEY`. */
375
+ allowlistVersion: z.ZodOptional<z.ZodNumber>;
376
+ /** Tell the developer, once per repository per session, that a run called an LLM with no tracing (AWT-310). */
377
+ untracedNotices: z.ZodDefault<z.ZodBoolean>;
378
+ /** At session start, say when npm has a newer release; checked at most once a day, in the background. */
379
+ updateNotices: z.ZodDefault<z.ZodBoolean>;
124
380
  capture: z.ZodDefault<z.ZodObject<{
125
- prompts: z.ZodDefault<z.ZodBoolean>;
126
- responses: z.ZodDefault<z.ZodBoolean>;
127
- toolInput: z.ZodDefault<z.ZodBoolean>;
128
- toolOutput: z.ZodDefault<z.ZodBoolean>;
129
- git: z.ZodDefault<z.ZodBoolean>;
130
- files: z.ZodDefault<z.ZodBoolean>;
131
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
132
- prompts: z.ZodDefault<z.ZodBoolean>;
133
- responses: z.ZodDefault<z.ZodBoolean>;
381
+ promptText: z.ZodDefault<z.ZodBoolean>;
134
382
  toolInput: z.ZodDefault<z.ZodBoolean>;
135
383
  toolOutput: z.ZodDefault<z.ZodBoolean>;
384
+ /** The provider's native session name/title, scrubbed and bounded. A generated title can paraphrase the first prompt; the edge never derives one from the prompt. */
385
+ sessionTitle: z.ZodDefault<z.ZodBoolean>;
136
386
  git: z.ZodDefault<z.ZodBoolean>;
137
387
  files: z.ZodDefault<z.ZodBoolean>;
138
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
139
- prompts: z.ZodDefault<z.ZodBoolean>;
140
- responses: z.ZodDefault<z.ZodBoolean>;
141
- toolInput: z.ZodDefault<z.ZodBoolean>;
142
- toolOutput: z.ZodDefault<z.ZodBoolean>;
143
- git: z.ZodDefault<z.ZodBoolean>;
144
- files: z.ZodDefault<z.ZodBoolean>;
145
- }, z.ZodTypeAny, "passthrough">>>;
388
+ /** MCP server and tool names in `tools_used`; false folds them into `mcp`. Metadata, not content. */
389
+ mcpNames: z.ZodDefault<z.ZodBoolean>;
390
+ }, "strip", z.ZodTypeAny, {
391
+ promptText: boolean;
392
+ toolInput: boolean;
393
+ toolOutput: boolean;
394
+ sessionTitle: boolean;
395
+ git: boolean;
396
+ files: boolean;
397
+ mcpNames: boolean;
398
+ }, {
399
+ promptText?: boolean | undefined;
400
+ toolInput?: boolean | undefined;
401
+ toolOutput?: boolean | undefined;
402
+ sessionTitle?: boolean | undefined;
403
+ git?: boolean | undefined;
404
+ files?: boolean | undefined;
405
+ mcpNames?: boolean | undefined;
406
+ }>>;
146
407
  emit: z.ZodDefault<z.ZodObject<{
147
408
  /** One flat summary per prompt→response turn, emitted on Stop. */
148
409
  turnSummaries: z.ZodDefault<z.ZodBoolean>;
@@ -173,7 +434,7 @@ export declare const configSchema: z.ZodObject<{
173
434
  metrics?: boolean | undefined;
174
435
  }>>;
175
436
  delivery: z.ZodDefault<z.ZodObject<{
176
- /** Budget for the in-hook direct send. Keep small: we are on the agent's critical path. */
437
+ /** Shared network budget for direct send and backlog retries in one delivery pass. */
177
438
  timeoutMs: z.ZodDefault<z.ZodNumber>;
178
439
  /** How many queued events one drain pass may send. */
179
440
  drainBatchSize: z.ZodDefault<z.ZodNumber>;
@@ -211,37 +472,143 @@ export declare const configSchema: z.ZodObject<{
211
472
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
212
473
  schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
213
474
  /** Backend base URL, e.g. https://backend.example.com */
214
- endpoint: z.ZodOptional<z.ZodString>;
475
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
215
476
  /** Overrides; derived from endpoint when absent. */
216
- eventsUrl: z.ZodOptional<z.ZodString>;
217
- otlpUrl: z.ZodOptional<z.ZodString>;
218
- enforcementUrl: z.ZodOptional<z.ZodString>;
477
+ eventsUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
478
+ otlpUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
479
+ enforcementUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
480
+ /** The install key, until it is exchanged for `device` (AWT-356). */
219
481
  token: z.ZodOptional<z.ZodString>;
482
+ device: z.ZodCatch<z.ZodOptional<z.ZodObject<{
483
+ id: z.ZodString;
484
+ store: z.ZodEnum<["macos-keychain", "libsecret", "windows-dpapi", "file"]>;
485
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodString>>;
486
+ source: z.ZodCatch<z.ZodOptional<z.ZodLiteral<"batch-code">>>;
487
+ codeId: z.ZodCatch<z.ZodOptional<z.ZodString>>;
488
+ }, "strip", z.ZodTypeAny, {
489
+ id: string;
490
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
491
+ endpoint?: string | undefined;
492
+ source?: "batch-code" | undefined;
493
+ codeId?: string | undefined;
494
+ }, {
495
+ id: string;
496
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
497
+ endpoint?: unknown;
498
+ source?: unknown;
499
+ codeId?: unknown;
500
+ }>>>;
501
+ /**
502
+ * The organization an enrollment URL named. Beside no credential it marks an
503
+ * MDM install whose developer has not signed in yet: it sends nothing.
504
+ */
505
+ organizationId: z.ZodOptional<z.ZodString>;
220
506
  installationId: z.ZodOptional<z.ZodString>;
221
507
  /** Developer identity attached to turn summaries; falls back to `git config user.email`. */
222
508
  developerEmail: z.ZodOptional<z.ZodString>;
509
+ /**
510
+ * What to call this developer in the platform's views; falls back to
511
+ * `git config user.name`. Never an identity: nothing is keyed on it, and a
512
+ * turn is still reported under `developerEmail`.
513
+ */
514
+ developerName: z.ZodOptional<z.ZodString>;
515
+ /**
516
+ * Absolute project root -> the identity to use beneath it. Longest match
517
+ * wins, so a nested checkout can override the workspace above it.
518
+ */
519
+ roots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
520
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
521
+ eventsUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
522
+ otlpUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
523
+ token: z.ZodOptional<z.ZodString>;
524
+ device: z.ZodCatch<z.ZodOptional<z.ZodObject<{
525
+ id: z.ZodString;
526
+ store: z.ZodEnum<["macos-keychain", "libsecret", "windows-dpapi", "file"]>;
527
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodString>>;
528
+ source: z.ZodCatch<z.ZodOptional<z.ZodLiteral<"batch-code">>>;
529
+ codeId: z.ZodCatch<z.ZodOptional<z.ZodString>>;
530
+ }, "strip", z.ZodTypeAny, {
531
+ id: string;
532
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
533
+ endpoint?: string | undefined;
534
+ source?: "batch-code" | undefined;
535
+ codeId?: string | undefined;
536
+ }, {
537
+ id: string;
538
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
539
+ endpoint?: unknown;
540
+ source?: unknown;
541
+ codeId?: unknown;
542
+ }>>>;
543
+ installationId: z.ZodOptional<z.ZodString>;
544
+ developerEmail: z.ZodOptional<z.ZodString>;
545
+ developerName: z.ZodOptional<z.ZodString>;
546
+ }, "strip", z.ZodTypeAny, {
547
+ endpoint?: string | null | undefined;
548
+ token?: string | undefined;
549
+ eventsUrl?: string | null | undefined;
550
+ otlpUrl?: string | null | undefined;
551
+ device?: {
552
+ id: string;
553
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
554
+ endpoint?: string | undefined;
555
+ source?: "batch-code" | undefined;
556
+ codeId?: string | undefined;
557
+ } | undefined;
558
+ installationId?: string | undefined;
559
+ developerEmail?: string | undefined;
560
+ developerName?: string | undefined;
561
+ }, {
562
+ endpoint?: unknown;
563
+ token?: string | undefined;
564
+ eventsUrl?: unknown;
565
+ otlpUrl?: unknown;
566
+ device?: unknown;
567
+ installationId?: string | undefined;
568
+ developerEmail?: string | undefined;
569
+ developerName?: string | undefined;
570
+ }>>>;
571
+ contentCaptureConsent: z.ZodDefault<z.ZodBoolean>;
572
+ /**
573
+ * Origins this machine sends to outside the Agent Watch hosts. Written by
574
+ * `setup --allow-custom-endpoint` (exactly the origin that run named) or
575
+ * grandfathered from a file older than the allowlist; shown by `status` and
576
+ * `doctor`. A malformed value reads as no trust without failing the file.
577
+ */
578
+ customEndpoints: z.ZodDefault<z.ZodCatch<z.ZodArray<z.ZodString, "many">>>;
579
+ /** Present on a file written after the allowlist; see `ALLOWLIST_VERSION_KEY`. */
580
+ allowlistVersion: z.ZodOptional<z.ZodNumber>;
581
+ /** Tell the developer, once per repository per session, that a run called an LLM with no tracing (AWT-310). */
582
+ untracedNotices: z.ZodDefault<z.ZodBoolean>;
583
+ /** At session start, say when npm has a newer release; checked at most once a day, in the background. */
584
+ updateNotices: z.ZodDefault<z.ZodBoolean>;
223
585
  capture: z.ZodDefault<z.ZodObject<{
224
- prompts: z.ZodDefault<z.ZodBoolean>;
225
- responses: z.ZodDefault<z.ZodBoolean>;
586
+ promptText: z.ZodDefault<z.ZodBoolean>;
226
587
  toolInput: z.ZodDefault<z.ZodBoolean>;
227
588
  toolOutput: z.ZodDefault<z.ZodBoolean>;
589
+ /** The provider's native session name/title, scrubbed and bounded. A generated title can paraphrase the first prompt; the edge never derives one from the prompt. */
590
+ sessionTitle: z.ZodDefault<z.ZodBoolean>;
228
591
  git: z.ZodDefault<z.ZodBoolean>;
229
592
  files: z.ZodDefault<z.ZodBoolean>;
230
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
231
- prompts: z.ZodDefault<z.ZodBoolean>;
232
- responses: z.ZodDefault<z.ZodBoolean>;
233
- toolInput: z.ZodDefault<z.ZodBoolean>;
234
- toolOutput: z.ZodDefault<z.ZodBoolean>;
235
- git: z.ZodDefault<z.ZodBoolean>;
236
- files: z.ZodDefault<z.ZodBoolean>;
237
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
238
- prompts: z.ZodDefault<z.ZodBoolean>;
239
- responses: z.ZodDefault<z.ZodBoolean>;
240
- toolInput: z.ZodDefault<z.ZodBoolean>;
241
- toolOutput: z.ZodDefault<z.ZodBoolean>;
242
- git: z.ZodDefault<z.ZodBoolean>;
243
- files: z.ZodDefault<z.ZodBoolean>;
244
- }, z.ZodTypeAny, "passthrough">>>;
593
+ /** MCP server and tool names in `tools_used`; false folds them into `mcp`. Metadata, not content. */
594
+ mcpNames: z.ZodDefault<z.ZodBoolean>;
595
+ }, "strip", z.ZodTypeAny, {
596
+ promptText: boolean;
597
+ toolInput: boolean;
598
+ toolOutput: boolean;
599
+ sessionTitle: boolean;
600
+ git: boolean;
601
+ files: boolean;
602
+ mcpNames: boolean;
603
+ }, {
604
+ promptText?: boolean | undefined;
605
+ toolInput?: boolean | undefined;
606
+ toolOutput?: boolean | undefined;
607
+ sessionTitle?: boolean | undefined;
608
+ git?: boolean | undefined;
609
+ files?: boolean | undefined;
610
+ mcpNames?: boolean | undefined;
611
+ }>>;
245
612
  emit: z.ZodDefault<z.ZodObject<{
246
613
  /** One flat summary per prompt→response turn, emitted on Stop. */
247
614
  turnSummaries: z.ZodDefault<z.ZodBoolean>;
@@ -272,7 +639,7 @@ export declare const configSchema: z.ZodObject<{
272
639
  metrics?: boolean | undefined;
273
640
  }>>;
274
641
  delivery: z.ZodDefault<z.ZodObject<{
275
- /** Budget for the in-hook direct send. Keep small: we are on the agent's critical path. */
642
+ /** Shared network budget for direct send and backlog retries in one delivery pass. */
276
643
  timeoutMs: z.ZodDefault<z.ZodNumber>;
277
644
  /** How many queued events one drain pass may send. */
278
645
  drainBatchSize: z.ZodDefault<z.ZodNumber>;
@@ -310,37 +677,417 @@ export declare const configSchema: z.ZodObject<{
310
677
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
311
678
  schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
312
679
  /** Backend base URL, e.g. https://backend.example.com */
313
- endpoint: z.ZodOptional<z.ZodString>;
680
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
314
681
  /** Overrides; derived from endpoint when absent. */
315
- eventsUrl: z.ZodOptional<z.ZodString>;
316
- otlpUrl: z.ZodOptional<z.ZodString>;
317
- enforcementUrl: z.ZodOptional<z.ZodString>;
682
+ eventsUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
683
+ otlpUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
684
+ enforcementUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
685
+ /** The install key, until it is exchanged for `device` (AWT-356). */
318
686
  token: z.ZodOptional<z.ZodString>;
687
+ device: z.ZodCatch<z.ZodOptional<z.ZodObject<{
688
+ id: z.ZodString;
689
+ store: z.ZodEnum<["macos-keychain", "libsecret", "windows-dpapi", "file"]>;
690
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodString>>;
691
+ source: z.ZodCatch<z.ZodOptional<z.ZodLiteral<"batch-code">>>;
692
+ codeId: z.ZodCatch<z.ZodOptional<z.ZodString>>;
693
+ }, "strip", z.ZodTypeAny, {
694
+ id: string;
695
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
696
+ endpoint?: string | undefined;
697
+ source?: "batch-code" | undefined;
698
+ codeId?: string | undefined;
699
+ }, {
700
+ id: string;
701
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
702
+ endpoint?: unknown;
703
+ source?: unknown;
704
+ codeId?: unknown;
705
+ }>>>;
706
+ /**
707
+ * The organization an enrollment URL named. Beside no credential it marks an
708
+ * MDM install whose developer has not signed in yet: it sends nothing.
709
+ */
710
+ organizationId: z.ZodOptional<z.ZodString>;
319
711
  installationId: z.ZodOptional<z.ZodString>;
320
712
  /** Developer identity attached to turn summaries; falls back to `git config user.email`. */
321
713
  developerEmail: z.ZodOptional<z.ZodString>;
714
+ /**
715
+ * What to call this developer in the platform's views; falls back to
716
+ * `git config user.name`. Never an identity: nothing is keyed on it, and a
717
+ * turn is still reported under `developerEmail`.
718
+ */
719
+ developerName: z.ZodOptional<z.ZodString>;
720
+ /**
721
+ * Absolute project root -> the identity to use beneath it. Longest match
722
+ * wins, so a nested checkout can override the workspace above it.
723
+ */
724
+ roots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
725
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
726
+ eventsUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
727
+ otlpUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
728
+ token: z.ZodOptional<z.ZodString>;
729
+ device: z.ZodCatch<z.ZodOptional<z.ZodObject<{
730
+ id: z.ZodString;
731
+ store: z.ZodEnum<["macos-keychain", "libsecret", "windows-dpapi", "file"]>;
732
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodString>>;
733
+ source: z.ZodCatch<z.ZodOptional<z.ZodLiteral<"batch-code">>>;
734
+ codeId: z.ZodCatch<z.ZodOptional<z.ZodString>>;
735
+ }, "strip", z.ZodTypeAny, {
736
+ id: string;
737
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
738
+ endpoint?: string | undefined;
739
+ source?: "batch-code" | undefined;
740
+ codeId?: string | undefined;
741
+ }, {
742
+ id: string;
743
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
744
+ endpoint?: unknown;
745
+ source?: unknown;
746
+ codeId?: unknown;
747
+ }>>>;
748
+ installationId: z.ZodOptional<z.ZodString>;
749
+ developerEmail: z.ZodOptional<z.ZodString>;
750
+ developerName: z.ZodOptional<z.ZodString>;
751
+ }, "strip", z.ZodTypeAny, {
752
+ endpoint?: string | null | undefined;
753
+ token?: string | undefined;
754
+ eventsUrl?: string | null | undefined;
755
+ otlpUrl?: string | null | undefined;
756
+ device?: {
757
+ id: string;
758
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
759
+ endpoint?: string | undefined;
760
+ source?: "batch-code" | undefined;
761
+ codeId?: string | undefined;
762
+ } | undefined;
763
+ installationId?: string | undefined;
764
+ developerEmail?: string | undefined;
765
+ developerName?: string | undefined;
766
+ }, {
767
+ endpoint?: unknown;
768
+ token?: string | undefined;
769
+ eventsUrl?: unknown;
770
+ otlpUrl?: unknown;
771
+ device?: unknown;
772
+ installationId?: string | undefined;
773
+ developerEmail?: string | undefined;
774
+ developerName?: string | undefined;
775
+ }>>>;
776
+ contentCaptureConsent: z.ZodDefault<z.ZodBoolean>;
777
+ /**
778
+ * Origins this machine sends to outside the Agent Watch hosts. Written by
779
+ * `setup --allow-custom-endpoint` (exactly the origin that run named) or
780
+ * grandfathered from a file older than the allowlist; shown by `status` and
781
+ * `doctor`. A malformed value reads as no trust without failing the file.
782
+ */
783
+ customEndpoints: z.ZodDefault<z.ZodCatch<z.ZodArray<z.ZodString, "many">>>;
784
+ /** Present on a file written after the allowlist; see `ALLOWLIST_VERSION_KEY`. */
785
+ allowlistVersion: z.ZodOptional<z.ZodNumber>;
786
+ /** Tell the developer, once per repository per session, that a run called an LLM with no tracing (AWT-310). */
787
+ untracedNotices: z.ZodDefault<z.ZodBoolean>;
788
+ /** At session start, say when npm has a newer release; checked at most once a day, in the background. */
789
+ updateNotices: z.ZodDefault<z.ZodBoolean>;
322
790
  capture: z.ZodDefault<z.ZodObject<{
323
- prompts: z.ZodDefault<z.ZodBoolean>;
324
- responses: z.ZodDefault<z.ZodBoolean>;
791
+ promptText: z.ZodDefault<z.ZodBoolean>;
325
792
  toolInput: z.ZodDefault<z.ZodBoolean>;
326
793
  toolOutput: z.ZodDefault<z.ZodBoolean>;
794
+ /** The provider's native session name/title, scrubbed and bounded. A generated title can paraphrase the first prompt; the edge never derives one from the prompt. */
795
+ sessionTitle: z.ZodDefault<z.ZodBoolean>;
327
796
  git: z.ZodDefault<z.ZodBoolean>;
328
797
  files: z.ZodDefault<z.ZodBoolean>;
329
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
330
- prompts: z.ZodDefault<z.ZodBoolean>;
331
- responses: z.ZodDefault<z.ZodBoolean>;
332
- toolInput: z.ZodDefault<z.ZodBoolean>;
333
- toolOutput: z.ZodDefault<z.ZodBoolean>;
334
- git: z.ZodDefault<z.ZodBoolean>;
335
- files: z.ZodDefault<z.ZodBoolean>;
336
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
337
- prompts: z.ZodDefault<z.ZodBoolean>;
338
- responses: z.ZodDefault<z.ZodBoolean>;
798
+ /** MCP server and tool names in `tools_used`; false folds them into `mcp`. Metadata, not content. */
799
+ mcpNames: z.ZodDefault<z.ZodBoolean>;
800
+ }, "strip", z.ZodTypeAny, {
801
+ promptText: boolean;
802
+ toolInput: boolean;
803
+ toolOutput: boolean;
804
+ sessionTitle: boolean;
805
+ git: boolean;
806
+ files: boolean;
807
+ mcpNames: boolean;
808
+ }, {
809
+ promptText?: boolean | undefined;
810
+ toolInput?: boolean | undefined;
811
+ toolOutput?: boolean | undefined;
812
+ sessionTitle?: boolean | undefined;
813
+ git?: boolean | undefined;
814
+ files?: boolean | undefined;
815
+ mcpNames?: boolean | undefined;
816
+ }>>;
817
+ emit: z.ZodDefault<z.ZodObject<{
818
+ /** One flat summary per prompt→response turn, emitted on Stop. */
819
+ turnSummaries: z.ZodDefault<z.ZodBoolean>;
820
+ /**
821
+ * Every provider request is mandatory: it is the lossless usage ledger.
822
+ * Accept a legacy `false` on input, but migrate that field to `true`
823
+ * instead of invalidating the entire global config.
824
+ */
825
+ llmCalls: z.ZodEffects<z.ZodDefault<z.ZodBoolean>, true, boolean | undefined>;
826
+ }, "strip", z.ZodTypeAny, {
827
+ llmCalls: true;
828
+ turnSummaries: boolean;
829
+ }, {
830
+ llmCalls?: boolean | undefined;
831
+ turnSummaries?: boolean | undefined;
832
+ }>>;
833
+ otel: z.ZodDefault<z.ZodObject<{
834
+ logs: z.ZodDefault<z.ZodBoolean>;
835
+ traces: z.ZodDefault<z.ZodBoolean>;
836
+ metrics: z.ZodDefault<z.ZodBoolean>;
837
+ }, "strip", z.ZodTypeAny, {
838
+ logs: boolean;
839
+ traces: boolean;
840
+ metrics: boolean;
841
+ }, {
842
+ logs?: boolean | undefined;
843
+ traces?: boolean | undefined;
844
+ metrics?: boolean | undefined;
845
+ }>>;
846
+ delivery: z.ZodDefault<z.ZodObject<{
847
+ /** Shared network budget for direct send and backlog retries in one delivery pass. */
848
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
849
+ /** How many queued events one drain pass may send. */
850
+ drainBatchSize: z.ZodDefault<z.ZodNumber>;
851
+ maxQueueEvents: z.ZodDefault<z.ZodNumber>;
852
+ maxAttempts: z.ZodDefault<z.ZodNumber>;
853
+ maxEventAgeDays: z.ZodDefault<z.ZodNumber>;
854
+ }, "strip", z.ZodTypeAny, {
855
+ timeoutMs: number;
856
+ drainBatchSize: number;
857
+ maxQueueEvents: number;
858
+ maxAttempts: number;
859
+ maxEventAgeDays: number;
860
+ }, {
861
+ timeoutMs?: number | undefined;
862
+ drainBatchSize?: number | undefined;
863
+ maxQueueEvents?: number | undefined;
864
+ maxAttempts?: number | undefined;
865
+ maxEventAgeDays?: number | undefined;
866
+ }>>;
867
+ enforcement: z.ZodDefault<z.ZodObject<{
868
+ enabled: z.ZodDefault<z.ZodBoolean>;
869
+ /** Hard ceiling for the check; it sits between enter and the agent's first call. */
870
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
871
+ /** Mirrors the platform's own cache TTL for the same decision. */
872
+ cacheTtlMs: z.ZodDefault<z.ZodNumber>;
873
+ }, "strip", z.ZodTypeAny, {
874
+ timeoutMs: number;
875
+ enabled: boolean;
876
+ cacheTtlMs: number;
877
+ }, {
878
+ timeoutMs?: number | undefined;
879
+ enabled?: boolean | undefined;
880
+ cacheTtlMs?: number | undefined;
881
+ }>>;
882
+ }, z.ZodTypeAny, "passthrough">>, {
883
+ capture: {
884
+ promptText: boolean;
885
+ toolInput: boolean;
886
+ toolOutput: boolean;
887
+ sessionTitle: boolean;
888
+ git: boolean;
889
+ files: boolean;
890
+ mcpNames: boolean;
891
+ };
892
+ otel: {
893
+ logs: boolean;
894
+ traces: boolean;
895
+ metrics: boolean;
896
+ };
897
+ customEndpoints: string[];
898
+ contentCaptureConsent: boolean;
899
+ untracedNotices: boolean;
900
+ updateNotices: boolean;
901
+ delivery: {
902
+ timeoutMs: number;
903
+ drainBatchSize: number;
904
+ maxQueueEvents: number;
905
+ maxAttempts: number;
906
+ maxEventAgeDays: number;
907
+ };
908
+ enforcement: {
909
+ timeoutMs: number;
910
+ enabled: boolean;
911
+ cacheTtlMs: number;
912
+ };
913
+ emit: {
914
+ llmCalls: true;
915
+ turnSummaries: boolean;
916
+ };
917
+ schemaVersion: 1;
918
+ endpoint?: string | null | undefined;
919
+ token?: string | undefined;
920
+ allowlistVersion?: number | undefined;
921
+ eventsUrl?: string | null | undefined;
922
+ otlpUrl?: string | null | undefined;
923
+ enforcementUrl?: string | null | undefined;
924
+ roots?: Record<string, {
925
+ endpoint?: string | null | undefined;
926
+ token?: string | undefined;
927
+ eventsUrl?: string | null | undefined;
928
+ otlpUrl?: string | null | undefined;
929
+ device?: {
930
+ id: string;
931
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
932
+ endpoint?: string | undefined;
933
+ source?: "batch-code" | undefined;
934
+ codeId?: string | undefined;
935
+ } | undefined;
936
+ installationId?: string | undefined;
937
+ developerEmail?: string | undefined;
938
+ developerName?: string | undefined;
939
+ }> | undefined;
940
+ device?: {
941
+ id: string;
942
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
943
+ endpoint?: string | undefined;
944
+ source?: "batch-code" | undefined;
945
+ codeId?: string | undefined;
946
+ } | undefined;
947
+ organizationId?: string | undefined;
948
+ installationId?: string | undefined;
949
+ developerEmail?: string | undefined;
950
+ developerName?: string | undefined;
951
+ }, z.objectInputType<{
952
+ schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
953
+ /** Backend base URL, e.g. https://backend.example.com */
954
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
955
+ /** Overrides; derived from endpoint when absent. */
956
+ eventsUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
957
+ otlpUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
958
+ enforcementUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
959
+ /** The install key, until it is exchanged for `device` (AWT-356). */
960
+ token: z.ZodOptional<z.ZodString>;
961
+ device: z.ZodCatch<z.ZodOptional<z.ZodObject<{
962
+ id: z.ZodString;
963
+ store: z.ZodEnum<["macos-keychain", "libsecret", "windows-dpapi", "file"]>;
964
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodString>>;
965
+ source: z.ZodCatch<z.ZodOptional<z.ZodLiteral<"batch-code">>>;
966
+ codeId: z.ZodCatch<z.ZodOptional<z.ZodString>>;
967
+ }, "strip", z.ZodTypeAny, {
968
+ id: string;
969
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
970
+ endpoint?: string | undefined;
971
+ source?: "batch-code" | undefined;
972
+ codeId?: string | undefined;
973
+ }, {
974
+ id: string;
975
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
976
+ endpoint?: unknown;
977
+ source?: unknown;
978
+ codeId?: unknown;
979
+ }>>>;
980
+ /**
981
+ * The organization an enrollment URL named. Beside no credential it marks an
982
+ * MDM install whose developer has not signed in yet: it sends nothing.
983
+ */
984
+ organizationId: z.ZodOptional<z.ZodString>;
985
+ installationId: z.ZodOptional<z.ZodString>;
986
+ /** Developer identity attached to turn summaries; falls back to `git config user.email`. */
987
+ developerEmail: z.ZodOptional<z.ZodString>;
988
+ /**
989
+ * What to call this developer in the platform's views; falls back to
990
+ * `git config user.name`. Never an identity: nothing is keyed on it, and a
991
+ * turn is still reported under `developerEmail`.
992
+ */
993
+ developerName: z.ZodOptional<z.ZodString>;
994
+ /**
995
+ * Absolute project root -> the identity to use beneath it. Longest match
996
+ * wins, so a nested checkout can override the workspace above it.
997
+ */
998
+ roots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
999
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1000
+ eventsUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1001
+ otlpUrl: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
1002
+ token: z.ZodOptional<z.ZodString>;
1003
+ device: z.ZodCatch<z.ZodOptional<z.ZodObject<{
1004
+ id: z.ZodString;
1005
+ store: z.ZodEnum<["macos-keychain", "libsecret", "windows-dpapi", "file"]>;
1006
+ endpoint: z.ZodCatch<z.ZodOptional<z.ZodString>>;
1007
+ source: z.ZodCatch<z.ZodOptional<z.ZodLiteral<"batch-code">>>;
1008
+ codeId: z.ZodCatch<z.ZodOptional<z.ZodString>>;
1009
+ }, "strip", z.ZodTypeAny, {
1010
+ id: string;
1011
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
1012
+ endpoint?: string | undefined;
1013
+ source?: "batch-code" | undefined;
1014
+ codeId?: string | undefined;
1015
+ }, {
1016
+ id: string;
1017
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
1018
+ endpoint?: unknown;
1019
+ source?: unknown;
1020
+ codeId?: unknown;
1021
+ }>>>;
1022
+ installationId: z.ZodOptional<z.ZodString>;
1023
+ developerEmail: z.ZodOptional<z.ZodString>;
1024
+ developerName: z.ZodOptional<z.ZodString>;
1025
+ }, "strip", z.ZodTypeAny, {
1026
+ endpoint?: string | null | undefined;
1027
+ token?: string | undefined;
1028
+ eventsUrl?: string | null | undefined;
1029
+ otlpUrl?: string | null | undefined;
1030
+ device?: {
1031
+ id: string;
1032
+ store: "macos-keychain" | "libsecret" | "windows-dpapi" | "file";
1033
+ endpoint?: string | undefined;
1034
+ source?: "batch-code" | undefined;
1035
+ codeId?: string | undefined;
1036
+ } | undefined;
1037
+ installationId?: string | undefined;
1038
+ developerEmail?: string | undefined;
1039
+ developerName?: string | undefined;
1040
+ }, {
1041
+ endpoint?: unknown;
1042
+ token?: string | undefined;
1043
+ eventsUrl?: unknown;
1044
+ otlpUrl?: unknown;
1045
+ device?: unknown;
1046
+ installationId?: string | undefined;
1047
+ developerEmail?: string | undefined;
1048
+ developerName?: string | undefined;
1049
+ }>>>;
1050
+ contentCaptureConsent: z.ZodDefault<z.ZodBoolean>;
1051
+ /**
1052
+ * Origins this machine sends to outside the Agent Watch hosts. Written by
1053
+ * `setup --allow-custom-endpoint` (exactly the origin that run named) or
1054
+ * grandfathered from a file older than the allowlist; shown by `status` and
1055
+ * `doctor`. A malformed value reads as no trust without failing the file.
1056
+ */
1057
+ customEndpoints: z.ZodDefault<z.ZodCatch<z.ZodArray<z.ZodString, "many">>>;
1058
+ /** Present on a file written after the allowlist; see `ALLOWLIST_VERSION_KEY`. */
1059
+ allowlistVersion: z.ZodOptional<z.ZodNumber>;
1060
+ /** Tell the developer, once per repository per session, that a run called an LLM with no tracing (AWT-310). */
1061
+ untracedNotices: z.ZodDefault<z.ZodBoolean>;
1062
+ /** At session start, say when npm has a newer release; checked at most once a day, in the background. */
1063
+ updateNotices: z.ZodDefault<z.ZodBoolean>;
1064
+ capture: z.ZodDefault<z.ZodObject<{
1065
+ promptText: z.ZodDefault<z.ZodBoolean>;
339
1066
  toolInput: z.ZodDefault<z.ZodBoolean>;
340
1067
  toolOutput: z.ZodDefault<z.ZodBoolean>;
1068
+ /** The provider's native session name/title, scrubbed and bounded. A generated title can paraphrase the first prompt; the edge never derives one from the prompt. */
1069
+ sessionTitle: z.ZodDefault<z.ZodBoolean>;
341
1070
  git: z.ZodDefault<z.ZodBoolean>;
342
1071
  files: z.ZodDefault<z.ZodBoolean>;
343
- }, z.ZodTypeAny, "passthrough">>>;
1072
+ /** MCP server and tool names in `tools_used`; false folds them into `mcp`. Metadata, not content. */
1073
+ mcpNames: z.ZodDefault<z.ZodBoolean>;
1074
+ }, "strip", z.ZodTypeAny, {
1075
+ promptText: boolean;
1076
+ toolInput: boolean;
1077
+ toolOutput: boolean;
1078
+ sessionTitle: boolean;
1079
+ git: boolean;
1080
+ files: boolean;
1081
+ mcpNames: boolean;
1082
+ }, {
1083
+ promptText?: boolean | undefined;
1084
+ toolInput?: boolean | undefined;
1085
+ toolOutput?: boolean | undefined;
1086
+ sessionTitle?: boolean | undefined;
1087
+ git?: boolean | undefined;
1088
+ files?: boolean | undefined;
1089
+ mcpNames?: boolean | undefined;
1090
+ }>>;
344
1091
  emit: z.ZodDefault<z.ZodObject<{
345
1092
  /** One flat summary per prompt→response turn, emitted on Stop. */
346
1093
  turnSummaries: z.ZodDefault<z.ZodBoolean>;
@@ -371,7 +1118,7 @@ export declare const configSchema: z.ZodObject<{
371
1118
  metrics?: boolean | undefined;
372
1119
  }>>;
373
1120
  delivery: z.ZodDefault<z.ZodObject<{
374
- /** Budget for the in-hook direct send. Keep small: we are on the agent's critical path. */
1121
+ /** Shared network budget for direct send and backlog retries in one delivery pass. */
375
1122
  timeoutMs: z.ZodDefault<z.ZodNumber>;
376
1123
  /** How many queued events one drain pass may send. */
377
1124
  drainBatchSize: z.ZodDefault<z.ZodNumber>;