@wirecat/cli-core 0.662.0 → 0.664.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 (247) hide show
  1. package/CHANGELOG.md +213 -0
  2. package/dist/calendar/cli/bodies.js +2 -1
  3. package/dist/calendar/cli/index.js +13 -10
  4. package/dist/calendar/mcp/index.d.ts +3 -1
  5. package/dist/calendar/mcp/index.js +4 -4
  6. package/dist/cli/call-stats-command.d.ts +18 -0
  7. package/dist/cli/call-stats-command.js +52 -0
  8. package/dist/cli/chat-sending-command.d.ts +14 -0
  9. package/dist/cli/chat-sending-command.js +64 -0
  10. package/dist/cli/context.d.ts +7 -0
  11. package/dist/cli/context.js +12 -4
  12. package/dist/cli/contract-templates.js +2 -0
  13. package/dist/cli/envelope.d.ts +0 -5
  14. package/dist/cli/envelope.js +25 -0
  15. package/dist/cli/index.d.ts +4 -1
  16. package/dist/cli/index.js +4 -1
  17. package/dist/cli/meeting-batch.d.ts +2 -1
  18. package/dist/cli/meeting-batch.js +7 -5
  19. package/dist/cli/meeting-meaning-command.d.ts +47 -0
  20. package/dist/cli/meeting-meaning-command.js +136 -0
  21. package/dist/cli/meeting-preparation-answer.d.ts +6 -0
  22. package/dist/cli/meeting-preparation-command.js +5 -5
  23. package/dist/cli/meeting-preparation-projects.d.ts +6 -0
  24. package/dist/cli/meeting-preparation-read.d.ts +11 -5
  25. package/dist/cli/meeting-preparation-read.js +13 -21
  26. package/dist/cli/meeting-series-inventory-command.js +2 -2
  27. package/dist/cli/meeting-series-inventory-read.d.ts +2 -2
  28. package/dist/cli/meeting-series-inventory-read.js +7 -15
  29. package/dist/cli/meeting-tags-command.d.ts +18 -0
  30. package/dist/cli/meeting-tags-command.js +74 -0
  31. package/dist/cli/messenger/admin-statistics-command.js +2 -2
  32. package/dist/cli/messenger/conversation-answers.d.ts +1 -1
  33. package/dist/cli/messenger/conversation-answers.js +1 -0
  34. package/dist/cli/messenger/conversations-command.js +38 -12
  35. package/dist/cli/messenger/counters-command.js +2 -2
  36. package/dist/cli/messenger/media-archive-command.js +5 -4
  37. package/dist/cli/messenger/media-archive-move-command.js +1 -1
  38. package/dist/cli/messenger/media-archive-timer-command.js +5 -4
  39. package/dist/cli/messenger/metadata-command.js +3 -3
  40. package/dist/cli/messenger/models-command.js +7 -0
  41. package/dist/cli/messenger/rankings-command.js +3 -3
  42. package/dist/cli/messenger/records-command.d.ts +4 -1
  43. package/dist/cli/messenger/records-command.js +6 -1
  44. package/dist/cli/messenger/tags-command.js +7 -2
  45. package/dist/cli/messenger/tasks-command.js +2 -2
  46. package/dist/cli/model-catalogue-command.js +2 -0
  47. package/dist/cli/paging.d.ts +10 -0
  48. package/dist/cli/paging.js +29 -0
  49. package/dist/cli/profile-token.d.ts +15 -1
  50. package/dist/cli/profile-token.js +103 -7
  51. package/dist/cli/program.js +2 -2
  52. package/dist/cli/runs/command.js +6 -4
  53. package/dist/cli/runs/search-command.js +9 -5
  54. package/dist/cli/schedule/schedule-command.js +1 -5
  55. package/dist/domain/links.d.ts +11 -0
  56. package/dist/domain/links.js +4 -0
  57. package/dist/domain/moment.d.ts +29 -0
  58. package/dist/domain/moment.js +58 -0
  59. package/dist/domain/providers.d.ts +6 -4
  60. package/dist/domain/providers.js +10 -5
  61. package/dist/domain/send-time.d.ts +3 -4
  62. package/dist/domain/send-time.js +10 -24
  63. package/dist/entities/chat-sending.d.ts +10 -0
  64. package/dist/entities/chat-sending.js +11 -0
  65. package/dist/entities/fields.d.ts +2 -2
  66. package/dist/entities/fields.js +2 -2
  67. package/dist/entities/index.d.ts +135 -2
  68. package/dist/entities/index.js +8 -3
  69. package/dist/entities/meeting-preparation.d.ts +6 -0
  70. package/dist/entities/meeting.d.ts +1 -1
  71. package/dist/entities/meeting.js +1 -1
  72. package/dist/errors/reasons.js +25 -2
  73. package/dist/mail/cli/index.js +4 -2
  74. package/dist/mail/facts.d.ts +5 -2
  75. package/dist/mail/facts.js +6 -3
  76. package/dist/mail/index.d.ts +1 -1
  77. package/dist/mail/meeting-notes.js +1 -1
  78. package/dist/mail/probe.d.ts +5 -2
  79. package/dist/mail/probe.js +9 -5
  80. package/dist/mail/server-search.js +1 -1
  81. package/dist/mail/sync.js +1 -1
  82. package/dist/mcp/meeting-preparation.d.ts +6 -0
  83. package/dist/mcp/meeting-preparation.js +1 -1
  84. package/dist/mcp/meeting-series-inventory.js +1 -1
  85. package/dist/mcp/prompts.js +6 -9
  86. package/dist/meetings/answers.d.ts +7 -0
  87. package/dist/meetings/answers.js +4 -0
  88. package/dist/meetings/call-answers.d.ts +106 -0
  89. package/dist/meetings/call-answers.js +171 -0
  90. package/dist/meetings/call-stats.d.ts +121 -0
  91. package/dist/meetings/call-stats.js +211 -0
  92. package/dist/meetings/calls.d.ts +76 -0
  93. package/dist/meetings/calls.js +78 -0
  94. package/dist/meetings/cli/index.d.ts +8 -0
  95. package/dist/meetings/cli/index.js +10 -22
  96. package/dist/meetings/cli/search.d.ts +9 -2
  97. package/dist/meetings/cli/search.js +16 -26
  98. package/dist/meetings/index.d.ts +4 -0
  99. package/dist/meetings/index.js +4 -0
  100. package/dist/meetings/mcp/index.d.ts +6 -3
  101. package/dist/meetings/mcp/index.js +2 -4
  102. package/dist/meetings/mcp/search.d.ts +12 -1
  103. package/dist/meetings/mcp/search.js +3 -3
  104. package/dist/meetings/project-evidence-answer.d.ts +6 -0
  105. package/dist/meetings/read-through.d.ts +2 -1
  106. package/dist/meetings/read-through.js +10 -1
  107. package/dist/meetings/stats.d.ts +3 -0
  108. package/dist/meetings/stats.js +3 -3
  109. package/dist/meetings/tag-answers.d.ts +43 -0
  110. package/dist/meetings/tag-answers.js +41 -0
  111. package/dist/meetings/testing/index.d.ts +1 -0
  112. package/dist/meetings/testing/index.js +1 -0
  113. package/dist/meetings/testing/paging.d.ts +6 -0
  114. package/dist/meetings/testing/paging.js +5 -0
  115. package/dist/models/chat-sending.d.ts +24 -0
  116. package/dist/models/chat-sending.js +40 -0
  117. package/dist/moderation/rules.d.ts +2 -0
  118. package/dist/moderation/rules.js +16 -2
  119. package/dist/runs/events.d.ts +1 -1
  120. package/dist/search/fusion.d.ts +17 -0
  121. package/dist/search/fusion.js +17 -0
  122. package/dist/search/lucene/resolved.d.ts +2 -0
  123. package/dist/search/question-plan.d.ts +4 -0
  124. package/dist/search/question-plan.js +7 -0
  125. package/dist/search/service-query.d.ts +6 -1
  126. package/dist/search/service-query.js +9 -1
  127. package/dist/search/task-similarity.d.ts +1 -0
  128. package/dist/search/task-similarity.js +1 -1
  129. package/dist/services/agenda-mail.js +2 -1
  130. package/dist/services/agenda.js +5 -3
  131. package/dist/services/attachments.js +4 -2
  132. package/dist/services/call-stats.d.ts +17 -0
  133. package/dist/services/call-stats.js +41 -0
  134. package/dist/services/chats.js +4 -2
  135. package/dist/services/conversations.js +4 -2
  136. package/dist/services/deps.d.ts +1 -1
  137. package/dist/services/document-source.d.ts +1 -1
  138. package/dist/services/document-source.js +4 -3
  139. package/dist/services/documents/ingestion.js +11 -40
  140. package/dist/services/documents/plan.d.ts +1 -1
  141. package/dist/services/documents/plan.js +30 -17
  142. package/dist/services/documents/ports.d.ts +5 -0
  143. package/dist/services/documents/sync.js +1 -1
  144. package/dist/services/embeddings-search.js +39 -9
  145. package/dist/services/embeddings.d.ts +4 -0
  146. package/dist/services/events-search.js +2 -1
  147. package/dist/services/index.d.ts +3 -0
  148. package/dist/services/index.js +3 -0
  149. package/dist/services/mail-search.d.ts +1 -1
  150. package/dist/services/mail-search.js +10 -11
  151. package/dist/services/media-archive-move.js +2 -4
  152. package/dist/services/media-archive.d.ts +0 -1
  153. package/dist/services/media-archive.js +2 -12
  154. package/dist/services/meeting-combined.js +1 -1
  155. package/dist/services/meeting-meaning.d.ts +47 -0
  156. package/dist/services/meeting-meaning.js +158 -0
  157. package/dist/services/meeting-tags.d.ts +27 -0
  158. package/dist/services/meeting-tags.js +81 -0
  159. package/dist/services/messages-combined.js +15 -4
  160. package/dist/services/messages-discovery.js +2 -2
  161. package/dist/services/moderation.js +10 -2
  162. package/dist/services/moment.d.ts +4 -10
  163. package/dist/services/moment.js +16 -44
  164. package/dist/services/notes-search.d.ts +0 -2
  165. package/dist/services/notes-search.js +1 -2
  166. package/dist/services/search-all.js +2 -1
  167. package/dist/services/tags.js +4 -2
  168. package/dist/services/task-stats.js +2 -2
  169. package/dist/services/tasks.js +2 -2
  170. package/dist/sftp/index.d.ts +1 -1
  171. package/dist/sftp/index.js +1 -1
  172. package/dist/sftp/session.d.ts +30 -4
  173. package/dist/sftp/session.js +195 -11
  174. package/dist/sftp/ssh2.d.ts +19 -4
  175. package/dist/sftp/ssh2.js +144 -17
  176. package/dist/speech/cloud.d.ts +47 -0
  177. package/dist/speech/cloud.js +73 -0
  178. package/dist/speech/decode.d.ts +36 -9
  179. package/dist/speech/decode.js +208 -61
  180. package/dist/speech/index.d.ts +2 -1
  181. package/dist/speech/index.js +2 -1
  182. package/dist/speech/openai.d.ts +4 -0
  183. package/dist/speech/openai.js +13 -12
  184. package/dist/sql/index.d.ts +1 -0
  185. package/dist/sql/index.js +1 -0
  186. package/dist/sql/reader.d.ts +95 -0
  187. package/dist/sql/reader.js +214 -0
  188. package/dist/store/accounts.js +2 -1
  189. package/dist/store/sqlite/account-purge.d.ts +3 -0
  190. package/dist/store/sqlite/account-purge.js +143 -0
  191. package/dist/store/sqlite/accounts.d.ts +0 -2
  192. package/dist/store/sqlite/accounts.js +2 -134
  193. package/dist/store/sqlite/calendar.d.ts +1 -0
  194. package/dist/store/sqlite/calendar.js +5 -5
  195. package/dist/store/sqlite/catalog.js +2 -16
  196. package/dist/store/sqlite/chats.js +2 -1
  197. package/dist/store/sqlite/context-document-source.d.ts +3 -3
  198. package/dist/store/sqlite/context-document-source.js +9 -7
  199. package/dist/store/sqlite/context-evidence.js +9 -3
  200. package/dist/store/sqlite/document-listing.js +2 -1
  201. package/dist/store/sqlite/drizzle/bun.js +4 -4
  202. package/dist/store/sqlite/drizzle/bun.js.map +1 -1
  203. package/dist/store/sqlite/drizzle/core.js +5 -5
  204. package/dist/store/sqlite/drizzle/core.js.map +1 -1
  205. package/dist/store/sqlite/drizzle/node.js +4 -4
  206. package/dist/store/sqlite/drizzle/node.js.map +1 -1
  207. package/dist/store/sqlite/drizzle/{shared-55XJMTPA.js → shared-5XR7K42U.js} +58 -58
  208. package/dist/store/sqlite/drizzle/{shared-55XJMTPA.js.map → shared-5XR7K42U.js.map} +1 -1
  209. package/dist/store/sqlite/events.js +2 -1
  210. package/dist/store/sqlite/file-note.d.ts +6 -0
  211. package/dist/store/sqlite/file-note.js +15 -0
  212. package/dist/store/sqlite/files.d.ts +3 -2
  213. package/dist/store/sqlite/files.js +5 -3
  214. package/dist/store/sqlite/identities.js +2 -1
  215. package/dist/store/sqlite/imported-documents.js +2 -2
  216. package/dist/store/sqlite/knowledge.d.ts +1 -1
  217. package/dist/store/sqlite/knowledge.js +27 -23
  218. package/dist/store/sqlite/labelled.d.ts +5 -0
  219. package/dist/store/sqlite/labelled.js +6 -0
  220. package/dist/store/sqlite/link-row.d.ts +1 -0
  221. package/dist/store/sqlite/link-row.js +2 -0
  222. package/dist/store/sqlite/lucene-fields.js +8 -12
  223. package/dist/store/sqlite/mail-rules.js +2 -1
  224. package/dist/store/sqlite/meeting-calls.d.ts +4 -0
  225. package/dist/store/sqlite/meeting-calls.js +66 -0
  226. package/dist/store/sqlite/meetings.d.ts +2 -2
  227. package/dist/store/sqlite/meetings.js +4 -1
  228. package/dist/store/sqlite/mention-sources.js +2 -1
  229. package/dist/store/sqlite/mentions.js +2 -2
  230. package/dist/store/sqlite/messages.js +6 -1
  231. package/dist/store/sqlite/note-search.js +8 -11
  232. package/dist/store/sqlite/notes.d.ts +3 -1
  233. package/dist/store/sqlite/notes.js +25 -14
  234. package/dist/store/sqlite/organizations.js +2 -2
  235. package/dist/store/sqlite/people-list.js +3 -3
  236. package/dist/store/sqlite/query-filter.d.ts +3 -3
  237. package/dist/store/sqlite/query-filter.js +3 -3
  238. package/dist/store/sqlite/reads.d.ts +4 -4
  239. package/dist/store/sqlite/reads.js +4 -4
  240. package/dist/store/sqlite/search.js +11 -7
  241. package/dist/store/sqlite/test-accounts.js +1 -1
  242. package/dist/store/sqlite/trigram-match.d.ts +9 -0
  243. package/dist/store/sqlite/trigram-match.js +28 -0
  244. package/dist/store/sqlite/work-tasks.js +1 -1
  245. package/package.json +18 -3
  246. package/parity.json +20 -1
  247. package/skills/link-conversations/SKILL.md +1 -1
@@ -15,6 +15,7 @@ import { chatArchive, chatMuting, chatPin, chatRemoval, chatUnread } from "./cha
15
15
  import { chatEvent } from "./chat-event.js";
16
16
  import { cachedChatMetadata, chatMetadata, chatMetadataRefresh } from "./chat-metadata.js";
17
17
  import { chatModeration, chatRules } from "./chat-moderation.js";
18
+ import { chatSending } from "./chat-sending.js";
18
19
  import { chatStats, taskStats } from "./chat-stats.js";
19
20
  import { chatTracking, trackedChat, trackedChatHistory } from "./chat-tracking.js";
20
21
  import { contact } from "./contact.js";
@@ -91,7 +92,7 @@ import { topic } from "./topic.js";
91
92
  * subset of its fields, never a renamed one. Commands move onto these one by one; until then, a schema
92
93
  * is the target, not a description of today's output.
93
94
  */
94
- export { account, accountChange, accountPrivacy, accountPrivacyChange, accountProfile, accountSession, adminReport, agenda, analysisConsent, analysisConsentRevocation, attachment, attachmentBytes, attachmentExtraction, attachmentTextChange, automaticTags, botAdmin, botMenuEntry, botProfile, botSeenChat, botTemplate, botWebhook, cachedChatMetadata, callRecord, chart, chat, chatAdminChange, chatArchive, chatCoverage, chatEvent, chatFolderChange, chatFolderOrder, chatFolderRemoval, chatGroupChange, chatInspection, chatInvite, chatInviteChange, chatMembersChange, chatMembersFetch, chatMetadata, chatMetadataRefresh, chatModeration, chatMuting, chatPin, chatRead, chatRemoval, chatRequestChange, chatRules, chatSender, chatStats, chatTracking, chatUnread, contact, contactActivity, contactAlias, contactCheck, contactContext, contactImport, contactLookup, contactNote, contactNoteRemoval, contactPreparation, contactStateChange, contactSync, contactUpdate, conversation, conversationBatch, conversationBatchStatus, conversationBuildResult, conversationChange, conversationDetails, conversationEmbedding, conversationEmbeddingStatus, conversationHit, conversationPreparation, conversationReadiness, counterRefresh, counters, document, documentLink, endedAccountSessions, evidence, evidencePacket, fact, folder, hit, identity, imageEmbedding, inviteLink, job, joinRequest, linkedPerson, mailCounts, mediaArchive, mediaArchiveCheck, mediaArchiveMove, mediaArchiveTimer, meeting, meetingProjectCandidates, meetingSeriesInventory, member, memory, mention, mentionDecision, mentionDetails, mentionDomain, mentionRebuild, message, messageContext, messageCounts, messageDeletion, messageDownload, messageEvent, messageLink, messageLinks, messagePin, messageStar, messageSync, messageTranscript, messageWrite, model, modelKey, note, officialStats, organization, person, place, poll, pollChange, pollVote, project, ranking, reaction, reactionChange, recipient, recipientAdded, recipientChange, recipientOff, recipientRemoved, recordedRun, reference, relationship, reminder, removedModelKey, responseTimes, retention, runDetails, runHit, runLocation, savedSearch, scheduledJob, scheduleHarness, searchHistoryClear, sendAttempt, serveSummary, stickerInventory, storeBackup, storeChatStatus, storeCheck, storeClear, storeCopyRemoval, storeDecrypt, storedModelKey, storeExport, storeGapPlan, storeGapRepair, storeImport, storeInfo, storeJobCancel, storeJobClear, storeJobDetails, storeJobRetry, storeMigration, storeReindex, storeRepair, storeReset, storeRestore, storeTable, tagChange, tagging, task, taskAnalysis, taskAnalysisMark, taskCard, taskCategories, taskClosed, taskCreated, taskLinks, taskMerge, taskPair, taskScan, taskSimilar, taskStats, taskUnmerge, template, topic, topicIcon, trackedChat, trackedChatHistory, waitingChats, watchedMessage, watchItem, };
95
+ export { account, accountChange, accountPrivacy, accountPrivacyChange, accountProfile, accountSession, adminReport, agenda, analysisConsent, analysisConsentRevocation, attachment, attachmentBytes, attachmentExtraction, attachmentTextChange, automaticTags, botAdmin, botMenuEntry, botProfile, botSeenChat, botTemplate, botWebhook, cachedChatMetadata, callRecord, chart, chat, chatAdminChange, chatArchive, chatCoverage, chatEvent, chatFolderChange, chatFolderOrder, chatFolderRemoval, chatGroupChange, chatInspection, chatInvite, chatInviteChange, chatMembersChange, chatMembersFetch, chatMetadata, chatMetadataRefresh, chatModeration, chatMuting, chatPin, chatRead, chatRemoval, chatRequestChange, chatRules, chatSender, chatSending, chatStats, chatTracking, chatUnread, contact, contactActivity, contactAlias, contactCheck, contactContext, contactImport, contactLookup, contactNote, contactNoteRemoval, contactPreparation, contactStateChange, contactSync, contactUpdate, conversation, conversationBatch, conversationBatchStatus, conversationBuildResult, conversationChange, conversationDetails, conversationEmbedding, conversationEmbeddingStatus, conversationHit, conversationPreparation, conversationReadiness, counterRefresh, counters, document, documentLink, endedAccountSessions, evidence, evidencePacket, fact, folder, hit, identity, imageEmbedding, inviteLink, job, joinRequest, linkedPerson, mailCounts, mediaArchive, mediaArchiveCheck, mediaArchiveMove, mediaArchiveTimer, meeting, meetingProjectCandidates, meetingSeriesInventory, member, memory, mention, mentionDecision, mentionDetails, mentionDomain, mentionRebuild, message, messageContext, messageCounts, messageDeletion, messageDownload, messageEvent, messageLink, messageLinks, messagePin, messageStar, messageSync, messageTranscript, messageWrite, model, modelKey, note, officialStats, organization, person, place, poll, pollChange, pollVote, project, ranking, reaction, reactionChange, recipient, recipientAdded, recipientChange, recipientOff, recipientRemoved, recordedRun, reference, relationship, reminder, removedModelKey, responseTimes, retention, runDetails, runHit, runLocation, savedSearch, scheduledJob, scheduleHarness, searchHistoryClear, sendAttempt, serveSummary, stickerInventory, storeBackup, storeChatStatus, storeCheck, storeClear, storeCopyRemoval, storeDecrypt, storedModelKey, storeExport, storeGapPlan, storeGapRepair, storeImport, storeInfo, storeJobCancel, storeJobClear, storeJobDetails, storeJobRetry, storeMigration, storeReindex, storeRepair, storeReset, storeRestore, storeTable, tagChange, tagging, task, taskAnalysis, taskAnalysisMark, taskCard, taskCategories, taskClosed, taskCreated, taskLinks, taskMerge, taskPair, taskScan, taskSimilar, taskStats, taskUnmerge, template, topic, topicIcon, trackedChat, trackedChatHistory, waitingChats, watchedMessage, watchItem, };
95
96
  export declare const ENTITIES: {
96
97
  readonly meeting_change: v.StrictObjectSchema<{
97
98
  readonly action: v.PicklistSchema<["create", "update", "cancel"], undefined>;
@@ -5461,6 +5462,12 @@ export declare const ENTITIES: {
5461
5462
  readonly from: v.StringSchema<undefined>;
5462
5463
  readonly to: v.ArraySchema<v.StringSchema<undefined>, undefined>;
5463
5464
  }, undefined>, undefined>, undefined>;
5465
+ readonly by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
5466
+ readonly score: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
5467
+ readonly passage: v.OptionalSchema<v.StrictObjectSchema<{
5468
+ readonly first: v.StringSchema<undefined>;
5469
+ readonly last: v.StringSchema<undefined>;
5470
+ }, undefined>, undefined>;
5464
5471
  readonly source: v.OptionalSchema<v.StrictObjectSchema<{
5465
5472
  readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
5466
5473
  readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -5629,6 +5636,12 @@ export declare const ENTITIES: {
5629
5636
  readonly from: v.StringSchema<undefined>;
5630
5637
  readonly to: v.ArraySchema<v.StringSchema<undefined>, undefined>;
5631
5638
  }, undefined>, undefined>, undefined>;
5639
+ readonly by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
5640
+ readonly score: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
5641
+ readonly passage: v.OptionalSchema<v.StrictObjectSchema<{
5642
+ readonly first: v.StringSchema<undefined>;
5643
+ readonly last: v.StringSchema<undefined>;
5644
+ }, undefined>, undefined>;
5632
5645
  readonly source: v.OptionalSchema<v.StrictObjectSchema<{
5633
5646
  readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
5634
5647
  readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -6003,6 +6016,12 @@ export declare const ENTITIES: {
6003
6016
  readonly from: v.StringSchema<undefined>;
6004
6017
  readonly to: v.ArraySchema<v.StringSchema<undefined>, undefined>;
6005
6018
  }, undefined>, undefined>, undefined>;
6019
+ readonly by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
6020
+ readonly score: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
6021
+ readonly passage: v.OptionalSchema<v.StrictObjectSchema<{
6022
+ readonly first: v.StringSchema<undefined>;
6023
+ readonly last: v.StringSchema<undefined>;
6024
+ }, undefined>, undefined>;
6006
6025
  readonly source: v.OptionalSchema<v.StrictObjectSchema<{
6007
6026
  readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
6008
6027
  readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -6579,6 +6598,114 @@ export declare const ENTITIES: {
6579
6598
  }, undefined>, undefined>;
6580
6599
  readonly has_more: v.BooleanSchema<undefined>;
6581
6600
  }, undefined>;
6601
+ readonly call_stats: v.GenericSchema<{
6602
+ time_zone: string;
6603
+ callback_within_ms: number;
6604
+ short_call_under_ms: number;
6605
+ calls: number;
6606
+ not_calls: number;
6607
+ known: {
6608
+ direction: number;
6609
+ outcome: number;
6610
+ wait_ms: number;
6611
+ talk_ms: number;
6612
+ duration_ms: number;
6613
+ roles: number;
6614
+ };
6615
+ by_direction?: {
6616
+ [x: string]: number;
6617
+ } | undefined;
6618
+ by_outcome?: {
6619
+ [x: string]: number;
6620
+ } | undefined;
6621
+ talk_ms?: number | undefined;
6622
+ mean_talk_ms?: number | undefined;
6623
+ duration_ms?: number | undefined;
6624
+ mean_wait_ms?: number | null | undefined;
6625
+ max_wait_ms?: number | null | undefined;
6626
+ short_calls?: number | undefined;
6627
+ employees: {
6628
+ key: string;
6629
+ name: string | null;
6630
+ identity_id: number | null;
6631
+ extension: string | null;
6632
+ calls: number;
6633
+ incoming: number;
6634
+ outgoing: number;
6635
+ internal: number;
6636
+ placed?: number | undefined;
6637
+ answered?: number | undefined;
6638
+ rang_not_answered?: number | undefined;
6639
+ talk_ms?: number | undefined;
6640
+ mean_talk_ms?: number | null | undefined;
6641
+ mean_wait_ms?: number | null | undefined;
6642
+ max_wait_ms?: number | null | undefined;
6643
+ }[];
6644
+ hours: {
6645
+ calls: number;
6646
+ incoming: number;
6647
+ outgoing: number;
6648
+ internal: number;
6649
+ answered?: number | undefined;
6650
+ missed?: number | undefined;
6651
+ talk_ms?: number | undefined;
6652
+ hour: number;
6653
+ }[];
6654
+ days: {
6655
+ calls: number;
6656
+ incoming: number;
6657
+ outgoing: number;
6658
+ internal: number;
6659
+ answered?: number | undefined;
6660
+ missed?: number | undefined;
6661
+ talk_ms?: number | undefined;
6662
+ date: string;
6663
+ }[];
6664
+ missed?: {
6665
+ calls: number;
6666
+ called_back: number;
6667
+ not_called_back: number;
6668
+ unknown_callback: number;
6669
+ unknown_outcome: number;
6670
+ items: {
6671
+ ref: string;
6672
+ meeting_id: number;
6673
+ started_at: string | null;
6674
+ outcome: "busy" | "no_answer" | "voicemail";
6675
+ client: {
6676
+ key: string;
6677
+ name: string | null;
6678
+ } | null;
6679
+ rang: string[];
6680
+ called_back?: boolean | undefined;
6681
+ callback?: {
6682
+ ref: string;
6683
+ meeting_id: number;
6684
+ started_at: string | null;
6685
+ after_ms: number;
6686
+ direction: "incoming" | "outgoing";
6687
+ } | null | undefined;
6688
+ }[];
6689
+ has_more: boolean;
6690
+ } | undefined;
6691
+ }>;
6692
+ readonly meeting_tag_change: v.StrictObjectSchema<{
6693
+ readonly tags: v.ArraySchema<v.StringSchema<undefined>, undefined>;
6694
+ readonly matched: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
6695
+ readonly changed: v.ArraySchema<v.StrictObjectSchema<{
6696
+ readonly meeting: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
6697
+ readonly meeting_id: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
6698
+ readonly tags: v.ArraySchema<v.StringSchema<undefined>, undefined>;
6699
+ }, undefined>, undefined>;
6700
+ }, undefined>;
6701
+ readonly meeting_tagging: v.StrictObjectSchema<{
6702
+ readonly meeting: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
6703
+ readonly meeting_id: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>]>;
6704
+ readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
6705
+ readonly started_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>, undefined>;
6706
+ readonly tags: v.ArraySchema<v.StringSchema<undefined>, undefined>;
6707
+ readonly untrusted: v.ArraySchema<v.StringSchema<undefined>, undefined>;
6708
+ }, undefined>;
6582
6709
  readonly meeting_speaker: v.StrictObjectSchema<{
6583
6710
  readonly key: v.StringSchema<undefined>;
6584
6711
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -10321,6 +10448,12 @@ export declare const ENTITIES: {
10321
10448
  readonly stored: v.OptionalSchema<v.PicklistSchema<["environment", "keyring", "file"], undefined>, undefined>;
10322
10449
  readonly removed: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["environment", "keyring", "file"], undefined>, undefined>, undefined>;
10323
10450
  }, undefined>;
10451
+ readonly chat_sending: v.StrictObjectSchema<{
10452
+ readonly mode: v.PicklistSchema<["allowed", "ask", "denied"], undefined>;
10453
+ readonly meaning: v.StringSchema<undefined>;
10454
+ readonly since: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, "an ISO 8601 time in UTC">, v.EndsWithAction<string, "Z", "an ISO 8601 time in UTC, ending in `Z`">]>, undefined>;
10455
+ readonly changed: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
10456
+ }, undefined>;
10324
10457
  readonly "model_key.stored": v.StrictObjectSchema<{
10325
10458
  readonly provider: v.StringSchema<undefined>;
10326
10459
  readonly stored: v.PicklistSchema<["environment", "keyring", "file"], undefined>;
@@ -11967,7 +12100,7 @@ export declare const ENTITIES: {
11967
12100
  export type EntityName = keyof typeof ENTITIES;
11968
12101
  /** Every entity as a JSON Schema 2020-12 `$defs` entry, for bundling into an MCP tool's `outputSchema`. */
11969
12102
  export declare const entityDefinitions: () => Record<EntityName, unknown>;
11970
- export { zonedTime } from "./fields.js";
12103
+ export { typedTime } from "./fields.js";
11971
12104
  export { mailFindings } from "./mail-findings.js";
11972
12105
  export { meetingFindings } from "./meeting-findings.js";
11973
12106
  export { meetingPreparation } from "./meeting-preparation.js";
@@ -18,6 +18,7 @@ import { chatArchive, chatMuting, chatPin, chatRemoval, chatUnread } from "./cha
18
18
  import { chatEvent } from "./chat-event.js";
19
19
  import { cachedChatMetadata, chatMetadata, chatMetadataRefresh } from "./chat-metadata.js";
20
20
  import { chatModeration, chatRules } from "./chat-moderation.js";
21
+ import { chatSending } from "./chat-sending.js";
21
22
  import { chatStats, taskStats } from "./chat-stats.js";
22
23
  import { chatTracking, trackedChat, trackedChatHistory } from "./chat-tracking.js";
23
24
  import { contact } from "./contact.js";
@@ -49,7 +50,7 @@ import { messageEvent, serveSummary, watchedMessage, watchItem } from "./listene
49
50
  import { mailCounts } from "./mail-counts.js";
50
51
  import { mailFindings } from "./mail-findings.js";
51
52
  import { mediaArchive, mediaArchiveCheck, mediaArchiveMove, mediaArchiveTimer } from "./media-archive.js";
52
- import { event, meeting, meetingCounts, meetingDetails, meetingHit, meetingLink, meetingParticipants, meetingPassage, meetingProjectEvidence, meetingReview, meetingSpeaker, meetingStats, meetingSummary, meetingTranscript, } from "./meeting.js";
53
+ import { callStats, event, meeting, meetingCounts, meetingDetails, meetingHit, meetingLink, meetingParticipants, meetingPassage, meetingProjectEvidence, meetingReview, meetingSpeaker, meetingStats, meetingSummary, meetingTagChange, meetingTagging, meetingTranscript, } from "./meeting.js";
53
54
  import { meetingEvidence, meetingPersonContext } from "./meeting-evidence.js";
54
55
  import { meetingFindings } from "./meeting-findings.js";
55
56
  import { meetingPreparation } from "./meeting-preparation.js";
@@ -100,7 +101,7 @@ import { topic } from "./topic.js";
100
101
  * subset of its fields, never a renamed one. Commands move onto these one by one; until then, a schema
101
102
  * is the target, not a description of today's output.
102
103
  */
103
- export { account, accountChange, accountPrivacy, accountPrivacyChange, accountProfile, accountSession, adminReport, agenda, analysisConsent, analysisConsentRevocation, attachment, attachmentBytes, attachmentExtraction, attachmentTextChange, automaticTags, botAdmin, botMenuEntry, botProfile, botSeenChat, botTemplate, botWebhook, cachedChatMetadata, callRecord, chart, chat, chatAdminChange, chatArchive, chatCoverage, chatEvent, chatFolderChange, chatFolderOrder, chatFolderRemoval, chatGroupChange, chatInspection, chatInvite, chatInviteChange, chatMembersChange, chatMembersFetch, chatMetadata, chatMetadataRefresh, chatModeration, chatMuting, chatPin, chatRead, chatRemoval, chatRequestChange, chatRules, chatSender, chatStats, chatTracking, chatUnread, contact, contactActivity, contactAlias, contactCheck, contactContext, contactImport, contactLookup, contactNote, contactNoteRemoval, contactPreparation, contactStateChange, contactSync, contactUpdate, conversation, conversationBatch, conversationBatchStatus, conversationBuildResult, conversationChange, conversationDetails, conversationEmbedding, conversationEmbeddingStatus, conversationHit, conversationPreparation, conversationReadiness, counterRefresh, counters, document, documentLink, endedAccountSessions, evidence, evidencePacket, fact, folder, hit, identity, imageEmbedding, inviteLink, job, joinRequest, linkedPerson, mailCounts, mediaArchive, mediaArchiveCheck, mediaArchiveMove, mediaArchiveTimer, meeting, meetingProjectCandidates, meetingSeriesInventory, member, memory, mention, mentionDecision, mentionDetails, mentionDomain, mentionRebuild, message, messageContext, messageCounts, messageDeletion, messageDownload, messageEvent, messageLink, messageLinks, messagePin, messageStar, messageSync, messageTranscript, messageWrite, model, modelKey, note, officialStats, organization, person, place, poll, pollChange, pollVote, project, ranking, reaction, reactionChange, recipient, recipientAdded, recipientChange, recipientOff, recipientRemoved, recordedRun, reference, relationship, reminder, removedModelKey, responseTimes, retention, runDetails, runHit, runLocation, savedSearch, scheduledJob, scheduleHarness, searchHistoryClear, sendAttempt, serveSummary, stickerInventory, storeBackup, storeChatStatus, storeCheck, storeClear, storeCopyRemoval, storeDecrypt, storedModelKey, storeExport, storeGapPlan, storeGapRepair, storeImport, storeInfo, storeJobCancel, storeJobClear, storeJobDetails, storeJobRetry, storeMigration, storeReindex, storeRepair, storeReset, storeRestore, storeTable, tagChange, tagging, task, taskAnalysis, taskAnalysisMark, taskCard, taskCategories, taskClosed, taskCreated, taskLinks, taskMerge, taskPair, taskScan, taskSimilar, taskStats, taskUnmerge, template, topic, topicIcon, trackedChat, trackedChatHistory, waitingChats, watchedMessage, watchItem, };
104
+ export { account, accountChange, accountPrivacy, accountPrivacyChange, accountProfile, accountSession, adminReport, agenda, analysisConsent, analysisConsentRevocation, attachment, attachmentBytes, attachmentExtraction, attachmentTextChange, automaticTags, botAdmin, botMenuEntry, botProfile, botSeenChat, botTemplate, botWebhook, cachedChatMetadata, callRecord, chart, chat, chatAdminChange, chatArchive, chatCoverage, chatEvent, chatFolderChange, chatFolderOrder, chatFolderRemoval, chatGroupChange, chatInspection, chatInvite, chatInviteChange, chatMembersChange, chatMembersFetch, chatMetadata, chatMetadataRefresh, chatModeration, chatMuting, chatPin, chatRead, chatRemoval, chatRequestChange, chatRules, chatSender, chatSending, chatStats, chatTracking, chatUnread, contact, contactActivity, contactAlias, contactCheck, contactContext, contactImport, contactLookup, contactNote, contactNoteRemoval, contactPreparation, contactStateChange, contactSync, contactUpdate, conversation, conversationBatch, conversationBatchStatus, conversationBuildResult, conversationChange, conversationDetails, conversationEmbedding, conversationEmbeddingStatus, conversationHit, conversationPreparation, conversationReadiness, counterRefresh, counters, document, documentLink, endedAccountSessions, evidence, evidencePacket, fact, folder, hit, identity, imageEmbedding, inviteLink, job, joinRequest, linkedPerson, mailCounts, mediaArchive, mediaArchiveCheck, mediaArchiveMove, mediaArchiveTimer, meeting, meetingProjectCandidates, meetingSeriesInventory, member, memory, mention, mentionDecision, mentionDetails, mentionDomain, mentionRebuild, message, messageContext, messageCounts, messageDeletion, messageDownload, messageEvent, messageLink, messageLinks, messagePin, messageStar, messageSync, messageTranscript, messageWrite, model, modelKey, note, officialStats, organization, person, place, poll, pollChange, pollVote, project, ranking, reaction, reactionChange, recipient, recipientAdded, recipientChange, recipientOff, recipientRemoved, recordedRun, reference, relationship, reminder, removedModelKey, responseTimes, retention, runDetails, runHit, runLocation, savedSearch, scheduledJob, scheduleHarness, searchHistoryClear, sendAttempt, serveSummary, stickerInventory, storeBackup, storeChatStatus, storeCheck, storeClear, storeCopyRemoval, storeDecrypt, storedModelKey, storeExport, storeGapPlan, storeGapRepair, storeImport, storeInfo, storeJobCancel, storeJobClear, storeJobDetails, storeJobRetry, storeMigration, storeReindex, storeRepair, storeReset, storeRestore, storeTable, tagChange, tagging, task, taskAnalysis, taskAnalysisMark, taskCard, taskCategories, taskClosed, taskCreated, taskLinks, taskMerge, taskPair, taskScan, taskSimilar, taskStats, taskUnmerge, template, topic, topicIcon, trackedChat, trackedChatHistory, waitingChats, watchedMessage, watchItem, };
104
105
  export const ENTITIES = {
105
106
  sync_progress: syncProgress,
106
107
  deal,
@@ -275,6 +276,9 @@ export const ENTITIES = {
275
276
  meeting_link: meetingLink,
276
277
  meeting_stats: meetingStats,
277
278
  meeting_counts: meetingCounts,
279
+ call_stats: callStats,
280
+ meeting_tag_change: meetingTagChange,
281
+ meeting_tagging: meetingTagging,
278
282
  meeting_speaker: meetingSpeaker,
279
283
  meeting_participants: meetingParticipants,
280
284
  meeting_passage: meetingPassage,
@@ -351,6 +355,7 @@ export const ENTITIES = {
351
355
  chat_moderation: chatModeration,
352
356
  "model.chosen": chosenModel,
353
357
  model_key: modelKey,
358
+ chat_sending: chatSending,
354
359
  "model_key.stored": storedModelKey,
355
360
  "model_key.removed": removedModelKey,
356
361
  chat_event: chatEvent,
@@ -395,7 +400,7 @@ export const entityDefinitions = () => Object.fromEntries(Object.entries(ENTITIE
395
400
  const { $schema: _, ...definition } = jsonSchemaOf(schema);
396
401
  return [name, definition];
397
402
  }));
398
- export { zonedTime } from "./fields.js";
403
+ export { typedTime } from "./fields.js";
399
404
  export { mailFindings } from "./mail-findings.js";
400
405
  export { meetingFindings } from "./meeting-findings.js";
401
406
  export { meetingPreparation } from "./meeting-preparation.js";
@@ -317,6 +317,12 @@ export declare const meetingPreparation: v.StrictObjectSchema<{
317
317
  readonly from: v.StringSchema<undefined>;
318
318
  readonly to: v.ArraySchema<v.StringSchema<undefined>, undefined>;
319
319
  }, undefined>, undefined>, undefined>;
320
+ readonly by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
321
+ readonly score: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
322
+ readonly passage: v.OptionalSchema<v.StrictObjectSchema<{
323
+ readonly first: v.StringSchema<undefined>;
324
+ readonly last: v.StringSchema<undefined>;
325
+ }, undefined>, undefined>;
320
326
  readonly source: v.OptionalSchema<v.StrictObjectSchema<{
321
327
  readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
322
328
  readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -1 +1 @@
1
- export { event, meeting, meetingCounts, meetingDetails, meetingHit, meetingLink, meetingParticipants, meetingPassage, meetingProjectEvidence, meetingReview, meetingSpeaker, meetingStats, meetingSummary, meetingTranscript, } from "../meetings/index.js";
1
+ export { callStats, event, meeting, meetingCounts, meetingDetails, meetingHit, meetingLink, meetingParticipants, meetingPassage, meetingProjectEvidence, meetingReview, meetingSpeaker, meetingStats, meetingSummary, meetingTagChange, meetingTagging, meetingTranscript, } from "../meetings/index.js";
@@ -1 +1 @@
1
- export { event, meeting, meetingCounts, meetingDetails, meetingHit, meetingLink, meetingParticipants, meetingPassage, meetingProjectEvidence, meetingReview, meetingSpeaker, meetingStats, meetingSummary, meetingTranscript, } from "../meetings/index.js";
1
+ export { callStats, event, meeting, meetingCounts, meetingDetails, meetingHit, meetingLink, meetingParticipants, meetingPassage, meetingProjectEvidence, meetingReview, meetingSpeaker, meetingStats, meetingSummary, meetingTagChange, meetingTagging, meetingTranscript, } from "../meetings/index.js";
@@ -24,6 +24,7 @@ const SIGN_IN = [
24
24
  ["oauth.timeout", "timeout", "the sign-in was not finished in time"],
25
25
  ["oauth.mismatch", "authentication_error", "the pasted sign-in result belongs to another sign-in"],
26
26
  ["session.missing", "authentication_error", "this profile is not signed in: no saved sign-in or API token"],
27
+ ["session.unreadable", "configuration_error", "the profile's stored secrets cannot be read; sign in again"],
27
28
  ["oauth.locked", "provider_unavailable", "another process holds this sign-in's lock"],
28
29
  ["oauth.no-response", "outcome_unknown", "the token request did not finish"],
29
30
  ["oauth.unavailable", "provider_unavailable", "the provider's token endpoint is unavailable"],
@@ -61,6 +62,7 @@ const PROVIDER_API = [
61
62
  ["file.not-found", "not_found", "the file named, or its folder, does not exist"],
62
63
  validation("file.not-a-file", "the path names a folder or another thing that is not a file"),
63
64
  ["file.denied", "permission_error", "the file cannot be opened: permission denied"],
65
+ validation("file.too-large", "the file is larger than the limit set for this read"),
64
66
  ];
65
67
  /** The read-only SFTP client (`./sftp`). */
66
68
  const SFTP = [
@@ -72,6 +74,21 @@ const SFTP = [
72
74
  ["sftp.timeout", "timeout", "the SFTP server did not answer in time"],
73
75
  validation("sftp.too-large", "the file is larger than the read's byte limit"),
74
76
  validation("sftp.closed", "the SFTP connection was closed before the operation"),
77
+ validation("sftp.file-changed", "the file changed on the server while a stream read it; read it again"),
78
+ ["ssh.forward-refused", "permission_error", "the SSH server does not allow forwarding to that address"],
79
+ ["ssh.forward-failed", "network_error", "the SSH server could not reach the address behind it"],
80
+ ];
81
+ /** The read-only SQL reader (`./sql`). */
82
+ const SQL = [
83
+ validation("sql.bad-identifier", "a table or column name is not a plain identifier"),
84
+ ["sql.library-missing", "configuration_error", "this database needs the mysql2 or pg package in the CLI"],
85
+ ["db.refused", "authentication_error", "the database server refused the user or password"],
86
+ ["db.no-database", "not_found", "the database server has no such database"],
87
+ ["db.no-table", "not_found", "the database has no such table"],
88
+ ["db.no-select", "permission_error", "the database user may not read the table; grant it SELECT"],
89
+ ["db.read-only", "permission_error", "the database refused a write: the connection only reads"],
90
+ ["db.timeout", "timeout", "the database server did not answer in time"],
91
+ ["db.failed", "provider_error", "the database server failed the query"],
75
92
  ];
76
93
  const OTHERS = [
77
94
  validation("doctor.report-exists", "the report's file exists; a problem report never overwrites a file"),
@@ -103,6 +120,13 @@ const OTHERS = [
103
120
  ["ai.images-not-allowed", "permission_error", "the AI model may not read pictures; models ai set --allow-remote"],
104
121
  ["picture-reading.off", "permission_error", "picture reading is never; models picture-reading set request"],
105
122
  ["picture-reading.owner-only", "permission_error", "only the owner turns picture reading on, not an agent"],
123
+ [
124
+ "chat-sending.denied",
125
+ "permission_error",
126
+ "models chats is denied: chat text never goes to a model off this computer, even with --yes",
127
+ ],
128
+ ["chat-sending.ask", "confirmation_required", "models chats is ask: pass --yes, or the owner sets it to allowed"],
129
+ ["chat-sending.owner-only", "permission_error", "only the owner makes models chats less strict, not an agent"],
106
130
  validation("picture-reading.agent-missing", "choose the agent that reads: --agent claude or --agent codex"),
107
131
  validation("picture-reading.not-a-picture", "the file is not a PNG, JPEG or WebP picture"),
108
132
  ["picture-reading.unavailable-file", "not_found", "the picture could not be fetched, or is over the size limit"],
@@ -312,7 +336,6 @@ const OTHERS = [
312
336
  ],
313
337
  ["store.vector-extension-failed", "configuration_error", "the sqlite-vec extension did not load; reinstall the CLI"],
314
338
  validation("store.vector-invalid", "a vector to store had a non-finite value"),
315
- validation("catalog.scope-limit", "the selected catalog exceeds its entry limit"),
316
339
  validation("evidence.quote-length", "a quote from the evidence is empty or over 500 characters"),
317
340
  validation("evidence.quote-not-found", "the cited source does not say the quoted words"),
318
341
  validation("evidence.row-too-large", "one evidence row is over its size limit"),
@@ -608,7 +631,7 @@ export const INPUT_FIELD_REASONS = defineReasons([
608
631
  export const REASONS = defineReasons([
609
632
  ...QUERY_REASONS,
610
633
  ...INPUT_FIELD_REASONS,
611
- ...[...QUERY, ...SIGN_IN, ...PROVIDER_API, ...SFTP, ...OTHERS].map(([reason, code, message]) => ({
634
+ ...[...QUERY, ...SIGN_IN, ...PROVIDER_API, ...SFTP, ...SQL, ...OTHERS].map(([reason, code, message]) => ({
612
635
  reason,
613
636
  code,
614
637
  message,
@@ -1,6 +1,6 @@
1
1
  import { CliError } from "@wirecat/cli-base";
2
2
  import { annotate, sharedCommand } from "@wirecat/cli-base/commands";
3
- import { queryFieldsOf } from "@wirecat/cli-base/query";
3
+ import { queryFieldsOf, timezoneOf } from "@wirecat/cli-base/query";
4
4
  import { Command, InvalidArgumentError } from "commander";
5
5
  import * as v from "valibot";
6
6
  import { answerEntity } from "../../cli/answer-entity.js";
@@ -301,7 +301,9 @@ const conversationsCommand = (mail) => {
301
301
  const account = await store.accounts.storedAccount(mailbox).catch(absentAccount);
302
302
  if (!account)
303
303
  return { threads: [], mailbox };
304
- const where = query ? queryFilter(query, THREAD_COLUMNS, { command: "conversations list" }) : undefined;
304
+ const where = query
305
+ ? queryFilter(query, THREAD_COLUMNS, { command: "conversations list", zone: timezoneOf() })
306
+ : undefined;
305
307
  const threads = await store.mail.threads({
306
308
  accountId: account.id,
307
309
  limit: limit + 1,
@@ -1,9 +1,12 @@
1
1
  import type { MailFacts, MailRule } from "./rules.js";
2
2
  import type { DomainAge } from "./score.js";
3
3
  import type { Listed } from "./source.js";
4
+ /** Of these addresses, the ones the owner wrote to in mail the store holds: `store.mail.writtenTo`. */
5
+ export type WrittenTo = (addresses: readonly string[]) => Promise<ReadonlySet<string>>;
4
6
  /**
5
7
  * What a rule can know of each listed email. A score and "the owner wrote to this sender" come from the sender's
6
8
  * whole group in this listing, so they are worked out only when a rule needs them; a run that lists only new mail
7
- * judges them from that mail.
9
+ * judges the score from that mail. "Wrote to" also reads the stored outgoing mail, so a resumed run or an account
10
+ * synced without Sent still knows a correspondent.
8
11
  */
9
- export declare const factsOf: (listed: Listed[], rules: readonly MailRule[], ages?: ReadonlyMap<string, DomainAge>) => ((item: Listed) => MailFacts);
12
+ export declare const factsOf: (listed: Listed[], rules: readonly MailRule[], writtenTo: WrittenTo, ages?: ReadonlyMap<string, DomainAge>) => Promise<(item: Listed) => MailFacts>;
@@ -2,13 +2,16 @@ import { groupKey, probeMail } from "./probe.js";
2
2
  /**
3
3
  * What a rule can know of each listed email. A score and "the owner wrote to this sender" come from the sender's
4
4
  * whole group in this listing, so they are worked out only when a rule needs them; a run that lists only new mail
5
- * judges them from that mail.
5
+ * judges the score from that mail. "Wrote to" also reads the stored outgoing mail, so a resumed run or an account
6
+ * synced without Sent still knows a correspondent.
6
7
  */
7
- export const factsOf = (listed, rules, ages = new Map()) => {
8
+ export const factsOf = async (listed, rules, writtenTo, ages = new Map()) => {
8
9
  const grouped = rules.some(({ match }) => match.score_at_least !== undefined || match.preset !== undefined);
9
10
  if (!grouped)
10
11
  return (item) => item;
11
- const groups = new Map(probeMail(listed, Number.POSITIVE_INFINITY, ages).items.map((group) => [
12
+ const senders = [...new Set(listed.flatMap((item) => item.headers?.from ?? []))];
13
+ const written = await writtenTo(senders);
14
+ const groups = new Map(probeMail(listed, Number.POSITIVE_INFINITY, ages, written).items.map((group) => [
12
15
  groupKey({
13
16
  ...(group.from === null ? {} : { from: group.from }),
14
17
  ...(group.listId === null ? {} : { listId: group.listId }),
@@ -2,7 +2,7 @@ export { mailOwnText } from "../conversations/mail-text.js";
2
2
  export { mailAccountKey } from "./account-key.js";
3
3
  export { DEFAULT_ATTACHMENT_POLICY, type MailAttachmentPolicy, POLICY_SKIPS } from "./attachments.js";
4
4
  export { BULK, bulkBox } from "./bulk.js";
5
- export { factsOf } from "./facts.js";
5
+ export { factsOf, type WrittenTo } from "./facts.js";
6
6
  export { MAIL_FINDING_FIELDS, MAIL_FINDINGS_KIND, MAIL_FINDINGS_PER_RUN, MAIL_FINDINGS_PER_SENDER, type MailFinding, type MailFindingsInput, mailFindingFieldsHelp, mailFindingFingerprint, validateMailFindings, } from "./findings.js";
7
7
  export { GMAIL_ALL_MAIL, mailFolders } from "./folders.js";
8
8
  export { dropMissing, type Gone, tooManyGone } from "./gone.js";
@@ -116,7 +116,7 @@ export const mailMeetingSource = ({ store, meetings, address, rules, provider, a
116
116
  if (stored === null)
117
117
  return [];
118
118
  const listed = (await candidateFacts(store, stored.id, Date.parse(since), ruling)).map(listedOf);
119
- const factsFor = factsOf(listed, ruling);
119
+ const factsFor = await factsOf(listed, ruling, (addresses) => store.mail.writtenTo(addresses));
120
120
  const saved = accountId === undefined ? [] : await meetings.meetings({ accountId, includeDeleted: true });
121
121
  const linked = new Map(saved.flatMap(({ externalId, eventId }) => (eventId === null ? [] : [[externalId, eventId]])));
122
122
  const events = new Map(linked.size ? (await meetings.events()).map((event) => [event.id, event]) : []);
@@ -43,7 +43,10 @@ export declare const groupKey: (headers: {
43
43
  from?: string;
44
44
  listId?: string;
45
45
  }) => string;
46
- /** Groups mail by List-Id when it has one, else by sender address; largest groups first. */
47
- export declare const probeMail: (items: Listed[], limit: number, ages?: ReadonlyMap<string, DomainAge>) => Probe;
46
+ /**
47
+ * Groups mail by List-Id when it has one, else by sender address; largest groups first. `written` holds addresses the
48
+ * owner wrote to outside this listing (stored outgoing mail), so a listing without Sent still knows a correspondent.
49
+ */
50
+ export declare const probeMail: (items: Listed[], limit: number, ages?: ReadonlyMap<string, DomainAge>, written?: ReadonlySet<string>) => Probe;
48
51
  /** The sender domains of the groups worth asking a registry about: not a big mailbox provider, never replied to. */
49
52
  export declare const domainsToAge: (groups: ProbeGroup[], skip: ReadonlySet<string>) => string[];
@@ -6,10 +6,14 @@ const share = (part, whole) => Math.round((part / whole) * 100) / 100;
6
6
  const isSent = (item) => item.labels?.includes("Sent") || /(^|\/)sent\b/i.test(item.folder ?? "");
7
7
  /** A list's mail is one group whoever sends it; other mail is grouped by sender. */
8
8
  export const groupKey = (headers) => headers.listId === undefined ? `from:${headers.from}` : `list:${headers.listId}`;
9
- /** Groups mail by List-Id when it has one, else by sender address; largest groups first. */
10
- export const probeMail = (items, limit, ages = new Map()) => {
9
+ /**
10
+ * Groups mail by List-Id when it has one, else by sender address; largest groups first. `written` holds addresses the
11
+ * owner wrote to outside this listing (stored outgoing mail), so a listing without Sent still knows a correspondent.
12
+ */
13
+ export const probeMail = (items, limit, ages = new Map(), written = new Set()) => {
11
14
  const sent = items.filter(isSent);
12
- const recipients = new Set(sent.flatMap((item) => item.headers?.to ?? []));
15
+ const recipients = new Set([...written, ...sent.flatMap((item) => item.headers?.to ?? [])].map((to) => to.toLowerCase()));
16
+ const wrote = (sender) => recipients.has(sender.toLowerCase());
13
17
  const groups = new Map();
14
18
  let withoutHeaders = 0;
15
19
  for (const item of items) {
@@ -32,7 +36,7 @@ export const probeMail = (items, limit, ages = new Map()) => {
32
36
  const known = group.filter((item) => item.seen !== undefined);
33
37
  const years = group.map((item) => new Date(item.receivedAt).getUTCFullYear());
34
38
  const bulk = share(group.filter((item) => item.headers?.bulk).length, group.length);
35
- const replied = [...senders].some((sender) => recipients.has(sender));
39
+ const replied = [...senders].some(wrote);
36
40
  return {
37
41
  from: [...senders][0] ?? null,
38
42
  listId: group[0]?.headers?.listId ?? null,
@@ -49,7 +53,7 @@ export const probeMail = (items, limit, ages = new Map()) => {
49
53
  });
50
54
  const presets = PRESET_NAMES.map((preset) => {
51
55
  const hit = [...groups.values()].filter((group) => {
52
- const replied = group.some((item) => item.headers?.from !== undefined && recipients.has(item.headers.from));
56
+ const replied = group.some((item) => item.headers?.from !== undefined && wrote(item.headers.from));
53
57
  return presetMatches(preset, { ...group[0], replied });
54
58
  });
55
59
  return {
@@ -138,7 +138,7 @@ export const searchMailServer = async (store, mailbox, access, request) => {
138
138
  return;
139
139
  const unique = [...new Map(listed.map((item) => [item.messageId, item])).values()];
140
140
  rules = await storedMailRules(store, { address: mailbox.account });
141
- const facts = factsOf(unique, rules);
141
+ const facts = await factsOf(unique, rules, (addresses) => store.mail.writtenTo(addresses));
142
142
  for (const item of unique) {
143
143
  const held = (await store.mail.email(accountId, item.messageId)) !== null;
144
144
  const rule = decide(rules, facts(item));
package/dist/mail/sync.js CHANGED
@@ -397,7 +397,7 @@ const syncRound = async (source, store, { account, since, max = 200, maxBodyChar
397
397
  // By the instant, not the text: a source may give times with an offset, and "+02:00" sorts as text, not as time.
398
398
  const listed = [...new Map(collected.map((item) => [item.messageId, item])).values()].sort((a, b) => Date.parse(b.receivedAt) - Date.parse(a.receivedAt));
399
399
  const present = new Set(listed.map(({ messageId }) => messageId));
400
- const factsFor = factsOf(listed, rules, ages);
400
+ const factsFor = await factsOf(listed, rules, (addresses) => store.mail.writtenTo(addresses), ages);
401
401
  // A rule's tag goes on mail this run stores or records; mail stored earlier gets it from memo mail rules apply.
402
402
  const tagger = ruleTagger(store, key);
403
403
  const tagStored = async (item) => {
@@ -384,6 +384,12 @@ export declare const callMeetingPreparationTool: (read: MeetingPreparationReader
384
384
  from: string;
385
385
  to: string[];
386
386
  }[] | undefined;
387
+ by?: ("meaning" | "words")[] | undefined;
388
+ score?: number | null | undefined;
389
+ passage?: {
390
+ first: string;
391
+ last: string;
392
+ } | undefined;
387
393
  source?: {
388
394
  ref: string;
389
395
  title: string | null;
@@ -17,7 +17,7 @@ const inputs = {
17
17
  /** `communications: true` from a host that connects a messages source; without one the argument could only refuse. */
18
18
  export const meetingPreparationTool = ({ communications = false } = {}) => ({
19
19
  name: "meeting_prepare",
20
- description: `Prepare cited context for one exact provider series in the server's selected account. Reads remote upcoming proof and bounded stored history, related meeting transcripts through explicit people/confirmed project links, accepted meeting facts and directly sourced tasks; performs no writes. Optional project selects one existing project name/key/alias for up to four bounded word-evidence pages across the selected account and history window; matches remain unconfirmed and do not infer membership. ${communications ? "Optional communications searches only explicit host-captured source IDs with literal words, bounded excerpts and independent index/read/output coverage; it does not infer identity or project membership. Each source may resume with its opaque cursor; restart_required means narrow or restart that selection rather than advancing. " : ""}Optional ISO windows default to now, seven days ahead and thirty days of history. Coverage identifies incomplete and unqueried context. ${UNTRUSTED_NEUTRAL}`,
20
+ description: `Prepare cited context for one exact provider series in the server's selected account. Reads remote upcoming proof and bounded stored history, related meeting transcripts through explicit people/confirmed project links, accepted meeting facts and directly sourced tasks; performs no writes. Optional project selects one existing project name/key/alias for up to four bounded word-evidence pages across the selected account and history window; matches remain unconfirmed and do not infer membership. ${communications ? "Optional communications searches only explicit host-captured source IDs with literal words, bounded excerpts and independent index/read/output coverage; it does not infer identity or project membership. Each source may resume with its opaque cursor; restart_required means narrow or restart that selection rather than advancing. " : ""}Optional windows (an ISO date or time, local without a zone, or 7d ago) default to now, seven days ahead and thirty days of history. Coverage identifies incomplete and unqueried context. ${UNTRUSTED_NEUTRAL}`,
21
21
  annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
22
22
  inputSchema: { ...(communications ? inputs.with : inputs.without), type: "object" },
23
23
  outputSchema: { ...outputSchema, type: "object" },
@@ -10,7 +10,7 @@ const outputSchema = {
10
10
  };
11
11
  export const meetingSeriesInventoryTool = {
12
12
  name: "meeting_series_inventory",
13
- description: `Discover one bounded page of series candidates in the host's selected provider/account. ISO after/until default to now and seven days ahead. Provider inventory may contain undated or past recurring start hints; these never prove the next occurrence or calendar completeness. Continue with page.next_cursor and the returned absolute after/until. No store writes or automatic selection. ${UNTRUSTED_NEUTRAL}`,
13
+ description: `Discover one bounded page of series candidates in the host's selected provider/account. after/until (an ISO date or time, local without a zone, or 7d ago) default to now and seven days ahead. Provider inventory may contain undated or past recurring start hints; these never prove the next occurrence or calendar completeness. Continue with page.next_cursor and the returned absolute after/until. No store writes or automatic selection. ${UNTRUSTED_NEUTRAL}`,
14
14
  annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
15
15
  inputSchema: { ...inputSchema, type: "object" },
16
16
  outputSchema: { ...outputSchema, type: "object" },
@@ -14,16 +14,13 @@ const asked = (text) => ({
14
14
  */
15
15
  const call = (tool, command, args = {}) => `${tool} with ${JSON.stringify(Object.keys(args).length > 0 ? { command, arguments: args } : { command })}`;
16
16
  /**
17
- * The owner's time as a query term the query language reads: `1d ago` as `1d`, and an ISO time as the full UTC instant,
18
- * since the query refuses a time without seconds or a zone that `--since-time` takes. A time that does not read stays
19
- * as typed, so the tool's error names it.
17
+ * The owner's time as a query term every query language version reads: the full UTC instant, whatever the owner
18
+ * typed (`1d ago`, `today`, a time without seconds or a zone). A time that does not read stays as typed, so the
19
+ * tool's error names it.
20
20
  */
21
21
  const after = (time) => {
22
- const ago = /^(\d+[mhd])(?:\s+ago)?$/.exec(time.trim())?.[1];
23
- if (ago)
24
- return `date>${ago}`;
25
22
  try {
26
- return `date>${JSON.stringify(new Date(momentOf(time)).toISOString())}`;
23
+ return `date>${JSON.stringify(new Date(momentOf(time.trim().replace(/\s+ago$/i, ""))).toISOString())}`;
27
24
  }
28
25
  catch {
29
26
  return `date>${JSON.stringify(time)}`;
@@ -50,7 +47,7 @@ export const registerPrompts = (server, { command, name }) => {
50
47
  argsSchema: toStandardJsonSchema(v.object({
51
48
  kind: v.optional(v.pipe(v.string(), v.description("dialog, group or channel, comma-separated; every kind if not given"))),
52
49
  mode: v.optional(v.pipe(v.string(), v.description("unread (the messenger's read marks, the default), new (since the last catch-up with new), " +
53
- "or a time: ISO 8601, or 2h / 1d ago"))),
50
+ "or a time: ISO 8601, today, yesterday, or 2h / 1d ago"))),
54
51
  })),
55
52
  }, ({ kind, mode }) => {
56
53
  const kinds = kind
@@ -107,7 +104,7 @@ export const registerPrompts = (server, { command, name }) => {
107
104
  description: "What the owner owes, what others owe, what needs clarifying — since the last review. Reads only; " +
108
105
  "reminders are drafts until the owner approves each one.",
109
106
  argsSchema: toStandardJsonSchema(v.object({
110
- since: v.optional(v.pipe(v.string(), v.description("where the last review ended: an ISO 8601 time, or 2h / 1d ago"))),
107
+ since: v.optional(v.pipe(v.string(), v.description("where the last review ended: an ISO 8601 time, today, yesterday, or 2h / 1d ago"))),
111
108
  groups: v.optional(v.pipe(v.string(), v.description("group chats where work gets done, by name or id, comma-separated"))),
112
109
  })),
113
110
  }, ({ since, groups }) => asked([
@@ -26,6 +26,13 @@ export declare const meetingHit: v.StrictObjectSchema<{
26
26
  readonly from: v.StringSchema<undefined>;
27
27
  readonly to: v.ArraySchema<v.StringSchema<undefined>, undefined>;
28
28
  }, undefined>, undefined>, undefined>;
29
+ /** A search with `--model`: which searches found it, its similarity in meaning, and the passage meaning matched. */
30
+ readonly by: v.OptionalSchema<v.ArraySchema<v.PicklistSchema<["words", "meaning"], undefined>, undefined>, undefined>;
31
+ readonly score: v.OptionalSchema<v.NullableSchema<v.NumberSchema<undefined>, undefined>, undefined>;
32
+ readonly passage: v.OptionalSchema<v.StrictObjectSchema<{
33
+ readonly first: v.StringSchema<undefined>;
34
+ readonly last: v.StringSchema<undefined>;
35
+ }, undefined>, undefined>;
29
36
  readonly source: v.OptionalSchema<v.StrictObjectSchema<{
30
37
  readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
31
38
  readonly title: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -25,6 +25,10 @@ export const meetingHit = v.strictObject({
25
25
  /** `corrected`: a query word matched only a garbled form of itself, listed in `corrections`. */
26
26
  match: v.optional(v.picklist(["words", "corrected"])),
27
27
  corrections: v.optional(v.array(v.strictObject({ from: text, to: v.array(text) }))),
28
+ /** A search with `--model`: which searches found it, its similarity in meaning, and the passage meaning matched. */
29
+ by: v.optional(v.array(v.picklist(["words", "meaning"]))),
30
+ score: v.optional(v.nullable(v.number())),
31
+ passage: v.optional(v.strictObject({ first: text, last: text })),
28
32
  source: v.optional(v.strictObject({
29
33
  ref: reference,
30
34
  title: v.nullable(text),