@wirecat/cli-core 1.1.0 → 1.3.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 (80) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/dist/cli/account-remove.d.ts +3 -0
  3. package/dist/cli/account-remove.js +1 -1
  4. package/dist/cli/contract-templates.js +3 -0
  5. package/dist/cli/documents/index.d.ts +2 -1
  6. package/dist/cli/documents/index.js +4 -1
  7. package/dist/cli/help/first-screen.js +2 -2
  8. package/dist/cli/index.d.ts +3 -3
  9. package/dist/cli/index.js +3 -3
  10. package/dist/cli/messenger/account-command.js +0 -10
  11. package/dist/cli/messenger/accounts.d.ts +1 -1
  12. package/dist/cli/messenger/accounts.js +1 -1
  13. package/dist/cli/messenger/context.d.ts +1 -1
  14. package/dist/cli/messenger/conversation-answers.d.ts +2 -0
  15. package/dist/cli/messenger/message-answers.d.ts +2 -0
  16. package/dist/cli/messenger/message-items.js +2 -0
  17. package/dist/cli/messenger/message-writes.d.ts +4 -0
  18. package/dist/cli/messenger/search-answers.js +2 -0
  19. package/dist/cli/messenger/session-commands.d.ts +1 -1
  20. package/dist/cli/messenger/session-commands.js +1 -1
  21. package/dist/cli/oauth-session.js +6 -3
  22. package/dist/cli/program.js +2 -2
  23. package/dist/cli/settings.d.ts +3 -3
  24. package/dist/cli/shared-command-exports.d.ts +2 -0
  25. package/dist/cli/shared-command-exports.js +3 -0
  26. package/dist/cli/token-session.d.ts +1 -4
  27. package/dist/cli/token-session.js +5 -1
  28. package/dist/domain/models.d.ts +5 -0
  29. package/dist/domain/person-kinds.d.ts +1 -1
  30. package/dist/entities/contact-context.d.ts +4 -0
  31. package/dist/entities/conversation-results.d.ts +4 -0
  32. package/dist/entities/evidence.d.ts +16 -0
  33. package/dist/entities/index.d.ts +36 -0
  34. package/dist/entities/listener.d.ts +8 -0
  35. package/dist/entities/message-change.d.ts +2 -0
  36. package/dist/entities/message-context.d.ts +6 -0
  37. package/dist/entities/message-write.d.ts +8 -0
  38. package/dist/entities/message.d.ts +4 -0
  39. package/dist/entities/message.js +4 -0
  40. package/dist/entities/store-maintenance.js +1 -1
  41. package/dist/entities/store-records.d.ts +2 -0
  42. package/dist/errors/failures.d.ts +6 -0
  43. package/dist/errors/failures.js +18 -4
  44. package/dist/errors/reasons.js +16 -0
  45. package/dist/errors/store-reasons.js +1 -0
  46. package/dist/mail/cli/index.js +1 -1
  47. package/dist/mail/headers.d.ts +2 -0
  48. package/dist/mail/headers.js +2 -1
  49. package/dist/mail/read.js +1 -0
  50. package/dist/mail/sort-rules.d.ts +58 -0
  51. package/dist/mail/sort-rules.js +79 -0
  52. package/dist/mcp/tool.js +2 -2
  53. package/dist/runs/recording.js +2 -2
  54. package/dist/search/lucene/registry.js +24 -0
  55. package/dist/services/messages-search.js +1 -1
  56. package/dist/store/areas.d.ts +2 -0
  57. package/dist/store/areas.js +2 -0
  58. package/dist/store/public.d.ts +1 -1
  59. package/dist/store/public.js +1 -1
  60. package/dist/store/queries.js +9 -2
  61. package/dist/store/sqlite/email-types.d.ts +8 -0
  62. package/dist/store/sqlite/email-types.js +45 -10
  63. package/dist/store/sqlite/emails.d.ts +3 -0
  64. package/dist/store/sqlite/emails.js +14 -5
  65. package/dist/store/sqlite/lucene-fields.d.ts +6 -0
  66. package/dist/store/sqlite/lucene-fields.js +10 -0
  67. package/dist/store/sqlite/lucene.js +6 -0
  68. package/dist/store/sqlite/mail-sorting.d.ts +122 -0
  69. package/dist/store/sqlite/mail-sorting.js +482 -0
  70. package/dist/store/sqlite/manifest.js +2 -0
  71. package/dist/store/sqlite/migrations.generated.js +20 -0
  72. package/dist/store/sqlite/people-list.js +65 -16
  73. package/dist/store/sqlite/schema/mail-sorting.d.ts +384 -0
  74. package/dist/store/sqlite/schema/mail-sorting.js +31 -0
  75. package/dist/store/sqlite/schema.d.ts +17 -0
  76. package/dist/store/sqlite/schema.js +3 -0
  77. package/dist/store/sqlite/sender-bots.d.ts +10 -1
  78. package/dist/store/sqlite/sender-bots.js +47 -8
  79. package/package.json +2 -2
  80. package/parity.json +9 -3
package/CHANGELOG.md CHANGED
@@ -5,6 +5,86 @@ Notable changes to `@wirecat/cli-core` (`@wirecat/cli-messaging` up to 0.261.0,
5
5
  minor version may break callers, and says how under "Changed — may break callers". `pnpm docs:check` checks the
6
6
  shape of this file.
7
7
 
8
+ ## 1.3.0 — 26.11.2026
9
+
10
+ ### Changed — experimental
11
+
12
+ - **A messenger's profiles are listed by `session list`, and `account list` is gone (WC-CMD-8, WC-ACCT-12).** The
13
+ shared messenger `account` group no longer has `list`, with no alias. `session list` answers the same rows. The
14
+ shared `session` contract (`sharedCommandTemplate(app, "session")`) now has `status` and `list` beside `start` and
15
+ `end`, so a messenger CLI mounts `messengerSessionCommands(messenger)` in its own `session` group, or its session
16
+ shell no longer matches the contract. The parity manifest lists `session list` and `session status` in tg, max and
17
+ wa, and the first help screen points at `<tool> session list`. Like the rest of the `session` group, `session list`
18
+ is not an MCP tool: the all-profiles MCP server already names every profile, and whether it is signed in, in each
19
+ tool's `profile` field. The commands a CLI mounts are not part of the stable API: `accountCommand` and
20
+ `messengerSessionCommands` keep their signatures, so this ships in a minor.
21
+ - **slk loses its duplicate `account list`** on its next cli-core bump: it mounts the shared `account` group, and its
22
+ own `session list` stays. Every CLI with a `session list` (drive, gcal, zm, mail, b24, slk and others) gains the
23
+ line `<tool> session list your profiles and their logged-in accounts` on its first help screen, so its
24
+ `contracts/help.snap` changes on that bump.
25
+
26
+ ### Fixed
27
+
28
+ - **A store another process holds is `store.busy`, not a crash.** When a scheduled sync of one account kept the write
29
+ lock past the busy timeout, the other account's sync failed with SQLite's raw `database is locked`, reported as
30
+ `command.crashed`, "this is a bug", exit 1. It is now a `conflict` (exit 15) with the reason `store.busy`, in the CLI,
31
+ over MCP and in the run record; `storeBusy` does the same for a caller's own error path.
32
+
33
+ ## 1.2.0 — 25.11.2026
34
+
35
+ ### Added
36
+
37
+ - **Mail sorting rules (store version 77).** `store.mail.sorting` keeps the owner's and the program's rules over mail:
38
+ `add` (with `dryRun`), `rules`, `remove`, `undo`, `reset` and `scopes`, all experimental. A rule names its scope,
39
+ one mail, a List-Id, a subject pattern, an address or a registrable domain, and says whether it sorts past mail too
40
+ (`applyTo: "all"`) or only mail dated from now on (`"new"`). The first scope that has a rule wins, in that order, then
41
+ the header classifier; within a scope the owner's rule beats the program's and the newest wins, and a domain rule may
42
+ beat the address rules (`overAddresses`). A rule sets the mail type, makes the sender a bot or a person through
43
+ `moveToBot` and `moveToPerson`, or files the sender under an organization. An email a rule typed has `typeSignal`
44
+ `rule:<id>`. A domain rule on a free-mail or throwaway domain is the owner's only and is set only with the `confirm`
45
+ of a dry run that shows how many addresses and emails it touches. Removing or undoing a rule types its mail again and
46
+ moves its senders back. Not the storage `store.mail.rules`.
47
+ - **`tokenSessionCommand`, `oauthSessionCommand` and `fileMirrorsCommand` are marked as cli-core's own commands**,
48
+ as `appDoctorCommand` is. `commands --json` gives them `origin: "cli-core"`, so the `reserved-shared-command` lint
49
+ rule (WC-CMD-34) stops warning on the CLIs that mount them. A CLI changes them only through their options: an
50
+ option, a description or an annotation added to the returned command afterwards stops the run with
51
+ `contract.unacknowledged-override`. No CLI does that today.
52
+ - **`accountRemoveCommand` takes `effects`.** A CLI whose removal reaches no service passes `LOCAL_WRITE` here,
53
+ instead of annotating the returned command. asterisk, beeline, notion and yandex-disk annotate it today, so
54
+ `accountRemoveCommand` stays unmarked until they pass `effects`.
55
+ - **Mail search filters by mail type and reach.** `type:` takes one of the [mail types](docs/dev/GLOSSARY.md#mail-types)
56
+ and `reach:` takes `direct`, `group` or `broadcast`, in the query itself, so a page is never short:
57
+ `memo search mail 'type:order OR type:bill'`, `memo search mail 'invoice -type:promotion reach:direct'`. A search
58
+ that names either field first types the mail the store has not typed yet, 5,000 emails per write; on 100,000
59
+ untyped emails the first such search after an upgrade takes seconds, later ones the usual milliseconds. A store
60
+ opened read-only works the missing types out in memory for that search. tg and max refuse both as mail fields.
61
+ - **Email hits show their type and reach**: `email.mail_type` and `email.reach` in `--json`, and both on the hit's
62
+ line in mail's text output. In the API they are `MailFields.mailType` and `MailFields.reach` (experimental).
63
+ - **`SENDER_BOT_PREFIX` is exported from `@wirecat/cli-core/store`, and `MAIL_TYPES`, `MailType`, `REACHES` and
64
+ `Reach` from `@wirecat/cli-core/store/areas`** (experimental), so a CLI no longer copies them.
65
+
66
+ ### Changed — experimental
67
+
68
+ - **A sender of a newsletter only is a bot, a human author too.** The owner's ruling of 25.11.2026, in place of the
69
+ earlier one that kept a human-written newsletter a person. A person all of whose mail came from a list (List-Id,
70
+ List-Unsubscribe, a one-click unsubscribe, a Feedback-ID, bulk `Precedence` or the bulk box), with no tie to the
71
+ owner, no messenger identity and no discussion list among their mail, moves to a bot with the reason
72
+ `newsletter-only` on the next people list; `kindSignals` names `newsletter-only`. Its mail stays typed `newsletter`:
73
+ a newsletter's bot is not a program for the mail types. A rule's newsletter bot goes back to a person once the owner
74
+ writes to it, as before, and also once a mail written to the owner alone (no list headers, at most a small group in
75
+ To and Cc) comes from it; the newsletter's own mail keeps reach `broadcast`. The owner's `moveToPerson` and
76
+ `moveToBot` and the sorting rules still win. The people list works out every kind again once after the upgrade.
77
+
78
+ ### Fixed
79
+
80
+ - **Parity checks the CLIs that moved to cli-core 1.0 again.** They are off the known-broken list now. Five stay on it
81
+ until 2026-12-02 because their main is still on 0.x: drive, gcal, bitrix24, wordpress and ydisk. cli-template is
82
+ back on it for #3365, which made the session commands cli-core's own: its MCP snapshot still lists them, and it
83
+ adopts that with the next release.
84
+ - **`oauthSessionCommand` signs in when the sign-in and the token share one host.** Zoom (`zoom.us`) and Google
85
+ (`oauth2.googleapis.com`) list one host for two of their addresses, and `session start` refused with
86
+ `configuration_error: "zoom.us" is listed twice`. Each host is now allowed once.
87
+
8
88
  ## 1.1.0 — 25.11.2026
9
89
 
10
90
  ### Added
@@ -1,4 +1,5 @@
1
1
  import { type CredentialsOptions, type KeyringStore } from "@wirecat/cli-base";
2
+ import type { Effects } from "@wirecat/cli-base/standards";
2
3
  import { Command } from "commander";
3
4
  import { type ServerSystem } from "../background/system.js";
4
5
  import { type Unit } from "../background/units.js";
@@ -75,6 +76,8 @@ export interface AccountRemoveOptions {
75
76
  resolveSettings?: (flags: GlobalFlags, options?: ResolveOptions) => Settings;
76
77
  /** The owner's own home; unset, the account's from the user database. A test names its sandbox. */
77
78
  ownerHome?: string;
79
+ /** A CLI whose removal reaches no service says so here (`LOCAL_WRITE`), not by annotating the command after. */
80
+ effects?: Effects;
78
81
  }
79
82
  /** Inside the tool's own folders and not one of them: a hook's mistake must not reach the home folder. */
80
83
  export declare const insideOwnFolders: (app: AppIdentity, env: NodeJS.ProcessEnv, extra: readonly string[]) => (path: string) => string;
@@ -114,7 +114,7 @@ const removeSections = (path, sections) => {
114
114
  * every entry, file and section it would remove.
115
115
  */
116
116
  export const accountRemoveCommand = (app, removal, options = {}) => logsInOrOut(annotate(new Command("remove"), {
117
- effects: REMOTE_WRITE,
117
+ effects: options.effects ?? REMOTE_WRITE,
118
118
  mcp: false,
119
119
  output: { entity: "account_removal" },
120
120
  examples: [
@@ -9,6 +9,7 @@ import { unfilteredQuery, withQuery } from "./list-query.js";
9
9
  import { doctorCommand } from "./messenger/doctor-command.js";
10
10
  import { mcpCommand } from "./messenger/mcp-command.js";
11
11
  import { searchCommand } from "./messenger/search-command.js";
12
+ import { messengerSessionCommands } from "./messenger/session-commands.js";
12
13
  import { pagingOf } from "./paging.js";
13
14
  import { settingsFor } from "./settings.js";
14
15
  /**
@@ -91,6 +92,8 @@ export const sharedCommandTemplate = (app, name) => {
91
92
  .description("link this account")
92
93
  .argument("[method]", "login method");
93
94
  annotate(session.command("end"), { effects: REMOTE_WRITE }).description("end this account's login");
95
+ for (const command of messengerSessionCommands(messenger))
96
+ session.addCommand(command);
94
97
  return session;
95
98
  }
96
99
  const notes = annotate(new Command("notes"), { effects: NO_EFFECTS }).description("notes kept in the shared store");
@@ -13,7 +13,7 @@ export { addDocumentCatalogCommands, CATALOG_FIELDS, type CatalogTree, type Cata
13
13
  export { addLocalDocumentCommands, type ImportedDocument, type LocalDocumentCommands } from "./documents.js";
14
14
  export { type FileConflictCommands, type FileConflictConnection, fileConflictsCommand } from "./file-conflicts.js";
15
15
  export { addFileEditCommands, type FileEditCommands } from "./file-edit.js";
16
- export { type FileMirrorCommands, type FileMirrorRemote, type FileMirrorWrite, fileMirrorsCommand, } from "./file-mirrors.js";
16
+ export type { FileMirrorCommands, FileMirrorRemote, FileMirrorWrite } from "./file-mirrors.js";
17
17
  export { addFileUpdateCommand, type FileUpdateCommands, type FileUpdatePort } from "./file-update.js";
18
18
  export { addDocumentFolderCommands, type DocumentFolderCommands } from "./folders.js";
19
19
  export { addDocumentHistoryCommands, DOCUMENT_HISTORY_SETTINGS, type DocumentHistoryCommands, type DocumentHistoryPort, keepVersionsForDays, } from "./history.js";
@@ -47,3 +47,4 @@ export declare const addDocumentCommands: <S>(program: Command, options: Documen
47
47
  export { claimDocumentAccount, DOCUMENT_SCAN_SETTINGS, type DocumentLibraryOptions, type DocumentLibraryTools, type DocumentSourceRun, type DocumentSyncOutcome, type DocumentSyncStep, type DocumentWarning, documentLibrary, documentLibraryCommands, documentProfile, } from "./library.js";
48
48
  export { type DocumentCall, type DocumentFileMap, type DocumentManifest, parseDocumentManifest, } from "./manifest/manifest.js";
49
49
  export { type DocumentManifestSourceOptions, type DocumentManifestTools, type DocumentSlots, documentSourceFromManifest, type ManifestDocumentSource, } from "./manifest/source.js";
50
+ export declare const fileMirrorsCommand: (helpers: import("./file-mirrors.js").FileMirrorCommands) => Command;
@@ -1,5 +1,8 @@
1
+ import { honoursDryRun } from "../dry-run-guard.js";
2
+ import { sharedCommand } from "../shared-contracts.js";
1
3
  import { addDocumentCatalogCommands } from "./catalog.js";
2
4
  import { addLocalDocumentCommands } from "./documents.js";
5
+ import { fileMirrorsCommand as fileMirrorsCommandDefinition } from "./file-mirrors.js";
3
6
  import { addDocumentFolderCommands } from "./folders.js";
4
7
  import { addDocumentHistoryCommands } from "./history.js";
5
8
  import { addDocumentKnowledgeCommands } from "./knowledge.js";
@@ -11,7 +14,6 @@ export { addDocumentCatalogCommands, CATALOG_FIELDS, catalogId, catalogOutput, c
11
14
  export { addLocalDocumentCommands } from "./documents.js";
12
15
  export { fileConflictsCommand } from "./file-conflicts.js";
13
16
  export { addFileEditCommands } from "./file-edit.js";
14
- export { fileMirrorsCommand, } from "./file-mirrors.js";
15
17
  export { addFileUpdateCommand } from "./file-update.js";
16
18
  export { addDocumentFolderCommands } from "./folders.js";
17
19
  export { addDocumentHistoryCommands, DOCUMENT_HISTORY_SETTINGS, keepVersionsForDays, } from "./history.js";
@@ -43,3 +45,4 @@ export const addDocumentCommands = (program, options) => {
43
45
  export { claimDocumentAccount, DOCUMENT_SCAN_SETTINGS, documentLibrary, documentLibraryCommands, documentProfile, } from "./library.js";
44
46
  export { parseDocumentManifest, } from "./manifest/manifest.js";
45
47
  export { documentSourceFromManifest, } from "./manifest/source.js";
48
+ export const fileMirrorsCommand = honoursDryRun(sharedCommand(fileMirrorsCommandDefinition));
@@ -32,8 +32,8 @@ const pointers = (program, cli, start, profile) => {
32
32
  ].filter((row) => row !== undefined);
33
33
  const rows = [
34
34
  ...(start ? [["Start here:", start, profile ? "(any profile name works)" : ""]] : []),
35
- ...(has("account list")
36
- ? [["", `${cli} account list`, "your profiles and their logged-in accounts"]]
35
+ ...(has("session list")
36
+ ? [["", `${cli} session list`, "your profiles and their logged-in accounts"]]
37
37
  : []),
38
38
  ...next.map(([command = "", does = ""], at) => [at === 0 ? "Next:" : "", command, does]),
39
39
  ...(has("skill show") ? [["For agents:", `${cli} skill show`, "rules and the discovery loop"]] : []),
@@ -8,7 +8,7 @@ export { dealBrief as dealBriefSchema, dealContext as dealContextSchema, organiz
8
8
  export { botTemplate } from "../entities/list-results.js";
9
9
  export { documentEntry, documentEntryDetails, documentSource, LISTING_ENTITIES, meetingEntry, meetingEntryDetails, } from "../entities/listings.js";
10
10
  export { syncProgress } from "../entities/store-records.js";
11
- export { isCliFailure, isCommanderFailure, storeDamaged } from "../errors/failures.js";
11
+ export { isCliFailure, isCommanderFailure, storeBusy, storeDamaged } from "../errors/failures.js";
12
12
  export { type AppErrors, failureContext } from "../errors/reasons.js";
13
13
  export { linkFetch } from "../http/link-fetch.js";
14
14
  export { type TimeLimit, timeLimit, withTimeLimit } from "../http/time-limit.js";
@@ -143,7 +143,7 @@ export { type Saving, stored } from "./messenger/stored.js";
143
143
  export { dateOrNone } from "./messenger/tasks-command.js";
144
144
  export { MODEL_CATALOGUE_QUERY, type ModelCatalogueOptions } from "./model-catalogue-command.js";
145
145
  export { writeNewFile } from "./new-file.js";
146
- export { type OAuthEnvironment, type OAuthPreset, type OAuthPresetOptions, type OAuthSessionOptions, type OAuthSignedIn, oauthFlowOf, oauthPreset, oauthSessionCommand, } from "./oauth-session.js";
146
+ export { type OAuthEnvironment, type OAuthPreset, type OAuthPresetOptions, type OAuthSessionOptions, type OAuthSignedIn, oauthFlowOf, oauthPreset, } from "./oauth-session.js";
147
147
  export { pagingOf, positiveCount, window, withPaging } from "./paging.js";
148
148
  export { notLocalPaths } from "./path-options.js";
149
149
  export { type CommandPermissions, type ConditionalKey, commandPathKey, commandPermissions, knownBeside, knownPermissionKeys, type PermissionKeyOf, type PermissionKeySource, refuseUnknownPermissionKeys, unknownPermissionIssues, unknownPermissionKeys, } from "./permission-keys.js";
@@ -164,7 +164,7 @@ export { type DeclaredSetting, type SettingRow, settingRows, withSettingDefaults
164
164
  export { type Config, type Configuration, count, first, flag, fromFile, type GlobalFlags, NONE_NAMED, namedProfile, type ProfileKind, plain, type ResolveOptions, type Settings, type SettingsExtension, type SettingsExtensionContext, type Source, settingsFor, } from "./settings.js";
165
165
  export { type PermissionAnswer, readSetupAnswers, type SetupAnswers, setupPermissionCeiling } from "./setup-answers.js";
166
166
  export { AGENTS, type Agent, agentFor, screenFor } from "./setup-screen.js";
167
- export { accountCommand, addMeetingBatchCommand, addMeetingPreparationCommand, addMeetingProjectCandidatesCommand, addMeetingSeriesInventoryCommand, addStoreMaintenanceCommands, appCompleteCommand, appDoctorCommand, appMcpCommand, attachmentsCommand, botAdminsCommand, botCommand, botMcpCommand, botMembersCommand, botMessagesCommand, callsCommand, chatsCommand, commandsCommand, completeCommand, configCommand, contactsCommand, conversationsCommand, deleteCommand, doctorCommand, domainListsCommand, editCommand, floodCommand, forwardCommand, generatedApiCommand, guideCommand, imagesCommand, inboxCommand, markReadCommand, mcpCommand, mentionsCommand, messagesCommand, messengerSessionCommands, metadataCommand, modelCatalogueCommand, modelsCommand, pinCommand, pollsCommand, projectsCommand, reactionsCommand, recipientsCommand, repliesCommand, reviewCommand, runsCommand, scheduleCommand, scheduleCommandFor, searchCommand, searchesCommand, sendCommand, sendsCommand, serveCommand, serverCommand, serviceApiCommand, setupCommand, skillCommand, starCommands, statsCommand, stickersCommand, storeCommand, tagsCommand, tasksCommand, tasksStatsCommand, templatesCommand, topicsCommand, unpinCommand, upgradeCommand, watchCommand, } from "./shared-command-exports.js";
167
+ export { accountCommand, addMeetingBatchCommand, addMeetingPreparationCommand, addMeetingProjectCandidatesCommand, addMeetingSeriesInventoryCommand, addStoreMaintenanceCommands, appCompleteCommand, appDoctorCommand, appMcpCommand, attachmentsCommand, botAdminsCommand, botCommand, botMcpCommand, botMembersCommand, botMessagesCommand, callsCommand, chatsCommand, commandsCommand, completeCommand, configCommand, contactsCommand, conversationsCommand, deleteCommand, doctorCommand, domainListsCommand, editCommand, floodCommand, forwardCommand, generatedApiCommand, guideCommand, imagesCommand, inboxCommand, markReadCommand, mcpCommand, mentionsCommand, messagesCommand, messengerSessionCommands, metadataCommand, modelCatalogueCommand, modelsCommand, oauthSessionCommand, pinCommand, pollsCommand, projectsCommand, reactionsCommand, recipientsCommand, repliesCommand, reviewCommand, runsCommand, scheduleCommand, scheduleCommandFor, searchCommand, searchesCommand, sendCommand, sendsCommand, serveCommand, serverCommand, serviceApiCommand, setupCommand, skillCommand, starCommands, statsCommand, stickersCommand, storeCommand, tagsCommand, tasksCommand, tasksStatsCommand, templatesCommand, topicsCommand, unpinCommand, upgradeCommand, watchCommand, } from "./shared-command-exports.js";
168
168
  export { hasSharedContract, overrideSharedContract } from "./shared-contracts.js";
169
169
  export { runnable, withSafety } from "./steps.js";
170
170
  export { type StoreInfo, sharedStoreCommand, storeInfo, storeInfoCommand } from "./store-info.js";
package/dist/cli/index.js CHANGED
@@ -8,7 +8,7 @@ export { dealBrief as dealBriefSchema, dealContext as dealContextSchema, organiz
8
8
  export { botTemplate } from "../entities/list-results.js";
9
9
  export { documentEntry, documentEntryDetails, documentSource, LISTING_ENTITIES, meetingEntry, meetingEntryDetails, } from "../entities/listings.js";
10
10
  export { syncProgress } from "../entities/store-records.js";
11
- export { isCliFailure, isCommanderFailure, storeDamaged } from "../errors/failures.js";
11
+ export { isCliFailure, isCommanderFailure, storeBusy, storeDamaged } from "../errors/failures.js";
12
12
  export { failureContext } from "../errors/reasons.js";
13
13
  export { linkFetch } from "../http/link-fetch.js";
14
14
  export { timeLimit, withTimeLimit } from "../http/time-limit.js";
@@ -132,7 +132,7 @@ export { stored } from "./messenger/stored.js";
132
132
  export { dateOrNone } from "./messenger/tasks-command.js";
133
133
  export { MODEL_CATALOGUE_QUERY } from "./model-catalogue-command.js";
134
134
  export { writeNewFile } from "./new-file.js";
135
- export { oauthFlowOf, oauthPreset, oauthSessionCommand, } from "./oauth-session.js";
135
+ export { oauthFlowOf, oauthPreset, } from "./oauth-session.js";
136
136
  export { pagingOf, positiveCount, window, withPaging } from "./paging.js";
137
137
  export { notLocalPaths } from "./path-options.js";
138
138
  export { commandPathKey, commandPermissions, knownBeside, knownPermissionKeys, refuseUnknownPermissionKeys, unknownPermissionIssues, unknownPermissionKeys, } from "./permission-keys.js";
@@ -153,7 +153,7 @@ export { settingRows, withSettingDefaults } from "./setting-defaults.js";
153
153
  export { count, first, flag, fromFile, NONE_NAMED, namedProfile, plain, settingsFor, } from "./settings.js";
154
154
  export { readSetupAnswers, setupPermissionCeiling } from "./setup-answers.js";
155
155
  export { AGENTS, agentFor, screenFor } from "./setup-screen.js";
156
- export { accountCommand, addMeetingBatchCommand, addMeetingPreparationCommand, addMeetingProjectCandidatesCommand, addMeetingSeriesInventoryCommand, addStoreMaintenanceCommands, appCompleteCommand, appDoctorCommand, appMcpCommand, attachmentsCommand, botAdminsCommand, botCommand, botMcpCommand, botMembersCommand, botMessagesCommand, callsCommand, chatsCommand, commandsCommand, completeCommand, configCommand, contactsCommand, conversationsCommand, deleteCommand, doctorCommand, domainListsCommand, editCommand, floodCommand, forwardCommand, generatedApiCommand, guideCommand, imagesCommand, inboxCommand, markReadCommand, mcpCommand, mentionsCommand, messagesCommand, messengerSessionCommands, metadataCommand, modelCatalogueCommand, modelsCommand, pinCommand, pollsCommand, projectsCommand, reactionsCommand, recipientsCommand, repliesCommand, reviewCommand, runsCommand, scheduleCommand, scheduleCommandFor, searchCommand, searchesCommand, sendCommand, sendsCommand, serveCommand, serverCommand, serviceApiCommand, setupCommand, skillCommand, starCommands, statsCommand, stickersCommand, storeCommand, tagsCommand, tasksCommand, tasksStatsCommand, templatesCommand, topicsCommand, unpinCommand, upgradeCommand, watchCommand, } from "./shared-command-exports.js";
156
+ export { accountCommand, addMeetingBatchCommand, addMeetingPreparationCommand, addMeetingProjectCandidatesCommand, addMeetingSeriesInventoryCommand, addStoreMaintenanceCommands, appCompleteCommand, appDoctorCommand, appMcpCommand, attachmentsCommand, botAdminsCommand, botCommand, botMcpCommand, botMembersCommand, botMessagesCommand, callsCommand, chatsCommand, commandsCommand, completeCommand, configCommand, contactsCommand, conversationsCommand, deleteCommand, doctorCommand, domainListsCommand, editCommand, floodCommand, forwardCommand, generatedApiCommand, guideCommand, imagesCommand, inboxCommand, markReadCommand, mcpCommand, mentionsCommand, messagesCommand, messengerSessionCommands, metadataCommand, modelCatalogueCommand, modelsCommand, oauthSessionCommand, pinCommand, pollsCommand, projectsCommand, reactionsCommand, recipientsCommand, repliesCommand, reviewCommand, runsCommand, scheduleCommand, scheduleCommandFor, searchCommand, searchesCommand, sendCommand, sendsCommand, serveCommand, serverCommand, serviceApiCommand, setupCommand, skillCommand, starCommands, statsCommand, stickersCommand, storeCommand, tagsCommand, tasksCommand, tasksStatsCommand, templatesCommand, topicsCommand, unpinCommand, upgradeCommand, watchCommand, } from "./shared-command-exports.js";
157
157
  export { hasSharedContract, overrideSharedContract } from "./shared-contracts.js";
158
158
  export { runnable, withSafety } from "./steps.js";
159
159
  export { sharedStoreCommand, storeInfo, storeInfoCommand } from "./store-info.js";
@@ -5,26 +5,16 @@ import { accountRemoveCommand } from "../account-remove.js";
5
5
  import { accountRenameCommand } from "../account-rename.js";
6
6
  import { REMOTE_READ, REMOTE_WRITE } from "../effects.js";
7
7
  import { itemOf, renderAnswer } from "../envelope.js";
8
- import { withQuery } from "../list-query.js";
9
- import { ACCOUNT_PROFILES_QUERY } from "./account-profile-query.js";
10
8
  import { accountSessionsCommand } from "./account-sessions-command.js";
11
9
  import { photoHelp, readProfilePhoto } from "./admin-commands.js";
12
10
  import { accountAnswer, renderItem } from "./chat-answers.js";
13
11
  import { messengerContext } from "./context.js";
14
12
  import { hideNever } from "./lacks.js";
15
13
  import { privacyCommand } from "./records-command.js";
16
- import { listProfiles } from "./session-commands.js";
17
14
  export const accountCommand = (messenger) => {
18
15
  const tool = `${messenger.app.command} personal`;
19
16
  const account = new Command("account")
20
17
  .description("the logged-in account")
21
- .addCommand(withQuery(annotate(new Command("list"), { effects: REMOTE_READ, examples: [`${tool} account list`] }), ACCOUNT_PROFILES_QUERY)
22
- .summary("profiles on this computer and their signed-in accounts")
23
- .description("every account profile on this computer, and the account each is logged in as; a name that is only a bot " +
24
- "is left out (`bot list` has it), one that is a bot too says `bot: true`; asks the messenger nothing")
25
- .action(async function (words) {
26
- await listProfiles(this, messenger, words, "account list");
27
- }))
28
18
  .addCommand(annotate(new Command("show"), {
29
19
  effects: REMOTE_READ,
30
20
  output: { entity: "account" },
@@ -7,5 +7,5 @@ export declare const rememberAccount: (app: AppIdentity, profile: string, id: st
7
7
  export declare const recalledAccount: (app: AppIdentity, provider: Provider, profile: string, env: NodeJS.ProcessEnv) => AccountKey | undefined;
8
8
  /** Profiles somebody has logged in to, whether or not the configuration file names them. */
9
9
  export declare const profilesWithAccounts: (app: AppIdentity, env: NodeJS.ProcessEnv) => string[];
10
- /** The profiles on this computer, as `account list` shows them: named in the configuration file, or logged in to. */
10
+ /** The profiles on this computer, as `session list` shows them: named in the configuration file, or logged in to. */
11
11
  export declare const profilesHere: (app: AppIdentity, configured: readonly string[], env: NodeJS.ProcessEnv) => string[];
@@ -22,5 +22,5 @@ export const profilesWithAccounts = (app, env) => {
22
22
  .filter((name) => name.endsWith(".json"))
23
23
  .map((name) => name.slice(0, -".json".length));
24
24
  };
25
- /** The profiles on this computer, as `account list` shows them: named in the configuration file, or logged in to. */
25
+ /** The profiles on this computer, as `session list` shows them: named in the configuration file, or logged in to. */
26
26
  export const profilesHere = (app, configured, env) => [...new Set([...configured, ...profilesWithAccounts(app, env)])].sort();
@@ -72,7 +72,7 @@ export interface Messenger extends ServiceMessenger {
72
72
  /**
73
73
  * A profile's state, read from the messenger's own files without connecting: `signed-in` has a session, `signed-out`
74
74
  * has none yet, `bot` speaks for a bot. `<tool> mcp` with no profile offers the personal ones and marks those not
75
- * signed in; `account list` and the profile errors say so too. Unset: every profile counts as signed in.
75
+ * signed in; `session list` and the profile errors say so too. Unset: every profile counts as signed in.
76
76
  */
77
77
  profileState?: (profile: string, env: NodeJS.ProcessEnv) => ProfileState;
78
78
  /** Opts in to `account remove`: what signing out and forgetting a profile means for this messenger. */
@@ -243,6 +243,8 @@ export declare const conversationShown: (account: AccountKey, { summary, message
243
243
  thread: string;
244
244
  read: boolean | null;
245
245
  flagged: boolean | null;
246
+ mail_type?: string | undefined;
247
+ reach?: string | undefined;
246
248
  sender_score?: {
247
249
  score: number;
248
250
  signals: string[];
@@ -220,6 +220,8 @@ export declare const threadAnswer: ({ items, ...thread }: ThreadContext, reader:
220
220
  thread: string;
221
221
  read: boolean | null;
222
222
  flagged: boolean | null;
223
+ mail_type?: string | undefined;
224
+ reach?: string | undefined;
223
225
  sender_score?: {
224
226
  score: number;
225
227
  signals: string[];
@@ -85,6 +85,8 @@ export const messageItem = (message, reader) => {
85
85
  thread: message.email.thread,
86
86
  read: message.email.read,
87
87
  flagged: message.email.flagged,
88
+ mail_type: message.email.mailType,
89
+ reach: message.email.reach,
88
90
  sender_score: message.email.senderScore,
89
91
  },
90
92
  provider_metadata: message.providerMetadata,
@@ -224,6 +224,8 @@ export declare const writtenAnswer: ({ operationId, sendId, message, messages, s
224
224
  thread: string;
225
225
  read: boolean | null;
226
226
  flagged: boolean | null;
227
+ mail_type?: string | undefined;
228
+ reach?: string | undefined;
227
229
  sender_score?: {
228
230
  score: number;
229
231
  signals: string[];
@@ -453,6 +455,8 @@ export declare const writtenAnswer: ({ operationId, sendId, message, messages, s
453
455
  thread: string;
454
456
  read: boolean | null;
455
457
  flagged: boolean | null;
458
+ mail_type?: string | undefined;
459
+ reach?: string | undefined;
456
460
  sender_score?: {
457
461
  score: number;
458
462
  signals: string[];
@@ -73,6 +73,8 @@ export const messageHitItem = (hit, query = "") => {
73
73
  thread: hit.email.thread,
74
74
  read: hit.email.read,
75
75
  flagged: hit.email.flagged,
76
+ mail_type: hit.email.mailType,
77
+ reach: hit.email.reach,
76
78
  sender_score: hit.email.senderScore,
77
79
  }
78
80
  : undefined,
@@ -1,6 +1,6 @@
1
1
  import { Command } from "commander";
2
2
  import { type Messenger } from "./context.js";
3
- /** What `account list` and `session list` answer: the profiles here and the account each is logged in as. */
3
+ /** What `session list` answers: the profiles here and the account each is logged in as. */
4
4
  export declare const listProfiles: (command: Command, messenger: Messenger, words: string[], label: string) => Promise<void>;
5
5
  /**
6
6
  * `session status` and `session list`, for a messenger's own `session` group beside its `start` and `end`
@@ -14,7 +14,7 @@ import { recalledAccount } from "./accounts.js";
14
14
  import { accountAnswer, wholeList } from "./chat-answers.js";
15
15
  import { messengerContext } from "./context.js";
16
16
  const storeOf = async (env) => existsSync(storePath(env)) ? await openStore({ env }).catch(() => undefined) : undefined;
17
- /** What `account list` and `session list` answer: the profiles here and the account each is logged in as. */
17
+ /** What `session list` answers: the profiles here and the account each is logged in as. */
18
18
  export const listProfiles = async (command, messenger, words, label) => {
19
19
  const terms = queryTerms(words, ACCOUNT_PROFILES_QUERY, label);
20
20
  const context = messengerContext(command, messenger, { needsProfile: false });
@@ -98,9 +98,12 @@ export const oauthSessionCommand = (options) => {
98
98
  // Only the provider's own sign-in hosts: a token request never reaches anything else.
99
99
  fetch: environment.fetch ??
100
100
  hostFetch({
101
- hosts: [provider.authorizeUrl, provider.tokenUrl, provider.revokeUrl]
102
- .filter((url) => url !== undefined)
103
- .map((url) => new URL(url).hostname),
101
+ // Providers often sign in and hand out tokens on one host; hostFetch refuses a host listed twice.
102
+ hosts: [
103
+ ...new Set([provider.authorizeUrl, provider.tokenUrl, provider.revokeUrl]
104
+ .filter((url) => url !== undefined)
105
+ .map((url) => new URL(url).hostname)),
106
+ ],
104
107
  }),
105
108
  signInCommand: `${app.command} ${profile} session start`,
106
109
  ...(environment.signal ? { signal: environment.signal } : {}),
@@ -7,7 +7,7 @@ import { Command, Help } from "commander";
7
7
  import { relayCommand } from "../background/relay.js";
8
8
  import { failingNotice, scheduledRuns } from "../background/schedules.js";
9
9
  import { parseDuration } from "../domain/duration.js";
10
- import { isCliFailure, isCommanderFailure, storeDamaged, usageReason } from "../errors/failures.js";
10
+ import { isCliFailure, isCommanderFailure, storeBusy, storeDamaged, usageReason } from "../errors/failures.js";
11
11
  import { failureContext } from "../errors/reasons.js";
12
12
  import { envName, readOnlyLockOf, readOnlyRefusal } from "../ports/app.js";
13
13
  import { recorded, wasSettled } from "../runs/recording.js";
@@ -780,7 +780,7 @@ const failed = ({ app }, program, rest, error, settled, debug) => {
780
780
  const path = typedCommandPath(program, program.args.length > 0 ? program.args : rest);
781
781
  const told = error instanceof NoProfileHere && !commandAt(program, "setup")
782
782
  ? error.withoutSetup(path)
783
- : storeDamaged(error, damageStep(program, app.command));
783
+ : storeBusy(storeDamaged(error, damageStep(program, app.command)));
784
784
  const failure = settled.settlementFailed && isCliFailure(told)
785
785
  ? new CliError(told.code, told.message, { ...told.details, settlement_failed: true })
786
786
  : told;
@@ -168,12 +168,12 @@ export interface Settings extends AISettings {
168
168
  /** Every profile on this computer, bots included — what a missing profile's error lists. */
169
169
  profilesHere: string[];
170
170
  /**
171
- * The profiles here that are an account, not only a bot — what `account list` shows. A name only the file's bot
171
+ * The profiles here that are an account, not only a bot — what `session list` shows. A name only the file's bot
172
172
  * section names, with no personal section, recorded login or messenger profile of its own, is a bot. Absent for an
173
173
  * app that builds `Settings` itself; `profilesHere` stands in.
174
174
  */
175
175
  accountProfiles?: string[];
176
- /** Every name with a bot: the file's bot section, or a bot's own files. `account list` marks these. */
176
+ /** Every name with a bot: the file's bot section, or a bot's own files. `session list` marks these. */
177
177
  botProfiles?: string[];
178
178
  /** Where each value came from — `config show` prints it. */
179
179
  sources: Record<string, Source>;
@@ -200,7 +200,7 @@ export interface ResolveOptions {
200
200
  /** `personal` unless given. */
201
201
  kind?: ProfileKind;
202
202
  /**
203
- * `false` for a command that touches no account — `account list`, `config show` — so it still runs
203
+ * `false` for a command that touches no account — `session list`, `config show` — so it still runs
204
204
  * when no profile is named. Its `profile` is then `default`, from `none named`.
205
205
  */
206
206
  needsProfile?: boolean;
@@ -573,6 +573,8 @@ export declare const botMcpCommand: (bot: import("./index.js").BotMessenger) =>
573
573
  /** @experimental */
574
574
  export declare const botMessagesCommand: (bot: import("./index.js").BotMessenger) => import("commander").Command;
575
575
  export declare const commandsCommand: (app: import("./entry.js").AppIdentity) => import("commander").Command;
576
+ /** @experimental */
577
+ export declare const oauthSessionCommand: (options: import("./oauth-session.js").OAuthSessionOptions) => import("commander").Command;
576
578
  export declare const configCommand: (app: import("./entry.js").AppIdentity, config: {
577
579
  resolveSettings: (flags?: import("./settings.js").GlobalFlags, options?: import("./settings.js").ResolveOptions) => import("./settings.js").Settings & object;
578
580
  configuredProfiles: (options?: import("./settings.js").ResolveOptions) => string[];
@@ -54,6 +54,7 @@ import { tagsCommand as tagsCommandDefinition } from "./messenger/tags-command.j
54
54
  import { tasksCommand as tasksCommandDefinition, tasksStatsCommand as tasksStatsCommandDefinition, } from "./messenger/tasks-command.js";
55
55
  import { topicsCommand as topicsCommandDefinition } from "./messenger/topics-command.js";
56
56
  import { watchCommand as watchCommandDefinition } from "./messenger/watch-command.js";
57
+ import { oauthSessionCommand as oauthSessionCommandDefinition } from "./oauth-session.js";
57
58
  import { runsCommand as runsCommandDefinition } from "./runs/command.js";
58
59
  import { scheduleCommandFor as scheduleCommandForDefinition } from "./schedule/schedule-command.js";
59
60
  import { serviceApiCommand as serviceApiCommandDefinition } from "./service-api.js";
@@ -79,6 +80,8 @@ export const botMcpCommand = sharedCommand(botMcpCommandDefinition);
79
80
  /** @experimental */
80
81
  export const botMessagesCommand = sharedCommand(botMessagesCommandDefinition);
81
82
  export const commandsCommand = sharedCommand(commandsCommandDefinition);
83
+ /** @experimental */
84
+ export const oauthSessionCommand = sharedCommand(oauthSessionCommandDefinition);
82
85
  export const configCommand = sharedCommand(configCommandDefinition);
83
86
  export const setupCommand = sharedCommand(setupCommandDefinition);
84
87
  export const guideCommand = sharedCommand(guideCommandDefinition);
@@ -84,10 +84,7 @@ export declare const unknownSignIn: (warn: (message: string) => void) => (profil
84
84
  readonly state: "unknown";
85
85
  };
86
86
  export declare const storageOf: (raw: string) => TokenStorage;
87
- /**
88
- * `session start | status | end | list` for a service signed in with one token (WC-ACCT-12): the token is asked hidden
89
- * or read from stdin, checked with the service, and only then kept in the keyring or a private file.
90
- */
87
+ /** cli-core's own command (WC-CMD-34): a CLI changes it only through its options. */
91
88
  export declare const tokenSessionCommand: (options: TokenSessionOptions) => Command;
92
89
  /**
93
90
  * The site this run's profile signed in to, as the `{ site }` server variable of `serviceApiCommand` (give it as is)
@@ -6,6 +6,7 @@ import { plainSetupText } from "../setup/plain.js";
6
6
  import { drawsHyperlinks, hyperlink } from "../terminal/hyperlink.js";
7
7
  import { readSecret } from "../terminal/prompt.js";
8
8
  import { baseContext, environmentOf, outputFor, secretInputOf } from "./context.js";
9
+ import { honoursDryRun } from "./dry-run-guard.js";
9
10
  import { refuseOffline } from "./early-refusal.js";
10
11
  import { FETCH, LOCAL_READ, LOCAL_WRITE, logsInOrOut, REMOTE_READ, refuseUnderReadOnly } from "./effects.js";
11
12
  import { itemOf, listOf, renderAnswer } from "./envelope.js";
@@ -14,6 +15,7 @@ import { commandWords, profileFree, refuseCommandName, rootOf } from "./profile.
14
15
  import { ProfileTokenStore } from "./profile-token.js";
15
16
  import { serviceApiCall } from "./service-api-call.js";
16
17
  import { siteValue } from "./service-api-manifest.js";
18
+ import { sharedCommand } from "./shared-contracts.js";
17
19
  /**
18
20
  * `verify` for `tokenSessionCommand` from a config's `auth.verify`: the one operation is sent with the token, a token the
19
21
  * answer does not call active is refused, and the account is the id and name the answer holds.
@@ -63,7 +65,7 @@ export const storageOf = (raw) => {
63
65
  * `session start | status | end | list` for a service signed in with one token (WC-ACCT-12): the token is asked hidden
64
66
  * or read from stdin, checked with the service, and only then kept in the keyring or a private file.
65
67
  */
66
- export const tokenSessionCommand = (options) => {
68
+ const tokenSessionCommandDefinition = (options) => {
67
69
  const { app, service } = options;
68
70
  const word = options.token ?? (options.login ? "password" : "API token");
69
71
  const contextOf = (command) => {
@@ -206,6 +208,8 @@ export const tokenSessionCommand = (options) => {
206
208
  .addCommand(end)
207
209
  .addCommand(list);
208
210
  };
211
+ /** cli-core's own command (WC-CMD-34): a CLI changes it only through its options. */
212
+ export const tokenSessionCommand = honoursDryRun(sharedCommand(tokenSessionCommandDefinition));
209
213
  const SITE = "site";
210
214
  /**
211
215
  * The account a profile keeps: on a service of the owner's own site, `<site>:<id>`, as bitrix24-cli keeps
@@ -1,3 +1,4 @@
1
+ import type { MailType, MailTypeOf } from "../mail/mail-types.js";
1
2
  import type { Upload } from "./attachments.js";
2
3
  import type { CounterObservation, CounterObservations } from "./counters.js";
3
4
  /**
@@ -421,6 +422,10 @@ export interface MailFields {
421
422
  thread: string;
422
423
  read: boolean | null;
423
424
  flagged: boolean | null;
425
+ /** What the email is, apart from its sender. @experimental */
426
+ mailType?: MailType;
427
+ /** How it reached the owner. @experimental */
428
+ reach?: MailTypeOf["reach"];
424
429
  /** How much the sender's mail looks like spam, a scam or a robot, and why; absent when the sender is not scored. */
425
430
  senderScore?: {
426
431
  score: number;
@@ -7,7 +7,7 @@ export declare const PERSON_KINDS: readonly ["person", "organization", "automate
7
7
  /** @experimental */
8
8
  export type PersonKind = (typeof PERSON_KINDS)[number];
9
9
  /** What decided a kind, besides the ties that make someone a `person`. @experimental */
10
- export type KindSignal = "test-data" | "bot" | "no-reply" | "notification-address" | "auto-submitted" | "null-return-path" | "bulk-mail" | "bulk-never-replied" | "automated-name" | "organization" | "role-address" | "company-name" | "no-tie" | "no-name";
10
+ export type KindSignal = "test-data" | "bot" | "no-reply" | "notification-address" | "auto-submitted" | "null-return-path" | "bulk-mail" | "bulk-never-replied" | "newsletter-only" | "automated-name" | "organization" | "role-address" | "company-name" | "no-tie" | "no-name";
11
11
  /**
12
12
  * A sender bot's reference, `sender-bot:<id>`: a program that writes to the owner, an entity apart from people.
13
13
  * `bot:` names the agents of the `bots` table. @experimental
@@ -501,6 +501,8 @@ export declare const contactMessages: v.StrictObjectSchema<{
501
501
  readonly thread: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
502
502
  readonly read: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
503
503
  readonly flagged: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
504
+ readonly mail_type: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
505
+ readonly reach: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
504
506
  readonly sender_score: v.OptionalSchema<v.StrictObjectSchema<{
505
507
  readonly score: v.NumberSchema<undefined>;
506
508
  readonly signals: v.ArraySchema<v.StringSchema<undefined>, undefined>;
@@ -1301,6 +1303,8 @@ export declare const contactContext: v.UnionSchema<[v.StrictObjectSchema<{
1301
1303
  readonly thread: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
1302
1304
  readonly read: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
1303
1305
  readonly flagged: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
1306
+ readonly mail_type: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1307
+ readonly reach: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
1304
1308
  readonly sender_score: v.OptionalSchema<v.StrictObjectSchema<{
1305
1309
  readonly score: v.NumberSchema<undefined>;
1306
1310
  readonly signals: v.ArraySchema<v.StringSchema<undefined>, undefined>;
@@ -219,6 +219,8 @@ export declare const conversationDetails: v.UnionSchema<[v.StrictObjectSchema<{
219
219
  readonly thread: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
220
220
  readonly read: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
221
221
  readonly flagged: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
222
+ readonly mail_type: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
223
+ readonly reach: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
222
224
  readonly sender_score: v.OptionalSchema<v.StrictObjectSchema<{
223
225
  readonly score: v.NumberSchema<undefined>;
224
226
  readonly signals: v.ArraySchema<v.StringSchema<undefined>, undefined>;
@@ -446,6 +448,8 @@ export declare const conversationDetails: v.UnionSchema<[v.StrictObjectSchema<{
446
448
  readonly thread: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
447
449
  readonly read: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
448
450
  readonly flagged: v.NullableSchema<v.BooleanSchema<undefined>, undefined>;
451
+ readonly mail_type: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
452
+ readonly reach: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
449
453
  readonly sender_score: v.OptionalSchema<v.StrictObjectSchema<{
450
454
  readonly score: v.NumberSchema<undefined>;
451
455
  readonly signals: v.ArraySchema<v.StringSchema<undefined>, undefined>;