@wirecat/cli-core 0.410.0 → 0.412.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 (113) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/cli/bot/command.js +4 -3
  3. package/dist/cli/bot/messages-sync.d.ts +7 -0
  4. package/dist/cli/bot/{store.js → messages-sync.js} +4 -5
  5. package/dist/cli/bot/port.d.ts +4 -4
  6. package/dist/cli/bot/setup.js +11 -5
  7. package/dist/cli/commands-command.js +18 -12
  8. package/dist/cli/config-command.js +1 -0
  9. package/dist/cli/contract-evidence.d.ts +26 -0
  10. package/dist/cli/contract-evidence.js +58 -0
  11. package/dist/cli/contract-templates.d.ts +4 -0
  12. package/dist/cli/contract-templates.js +83 -0
  13. package/dist/cli/discovery-descriptions.d.ts +4 -0
  14. package/dist/cli/discovery-descriptions.js +4 -0
  15. package/dist/cli/index.d.ts +21 -55
  16. package/dist/cli/index.js +18 -55
  17. package/dist/cli/messenger/chat-answers.d.ts +1 -1
  18. package/dist/cli/messenger/chat-answers.js +1 -1
  19. package/dist/cli/messenger/chat-lists.d.ts +1 -1
  20. package/dist/cli/messenger/chats-command.js +3 -0
  21. package/dist/cli/messenger/contacts-command.js +23 -15
  22. package/dist/cli/messenger/guard-commands.d.ts +5 -1
  23. package/dist/cli/messenger/guard-commands.js +5 -3
  24. package/dist/cli/messenger/messages-press-command.js +4 -1
  25. package/dist/cli/messenger/models-command.js +3 -11
  26. package/dist/cli/messenger/records-command.js +1 -1
  27. package/dist/cli/messenger/store-maintenance-command.d.ts +1 -1
  28. package/dist/cli/messenger/tasks-command.js +14 -4
  29. package/dist/cli/model-catalogue-command.d.ts +15 -0
  30. package/dist/cli/model-catalogue-command.js +110 -0
  31. package/dist/cli/moved.js +1 -0
  32. package/dist/cli/program.js +2 -0
  33. package/dist/cli/runs/search-command.js +2 -3
  34. package/dist/cli/runs/search-query.d.ts +1 -1
  35. package/dist/cli/runs/search-query.js +18 -2
  36. package/dist/cli/runs/search.d.ts +2 -1
  37. package/dist/cli/runs/search.js +4 -3
  38. package/dist/cli/settings.d.ts +2 -0
  39. package/dist/cli/settings.js +5 -1
  40. package/dist/cli/shared-command-exports.d.ts +644 -0
  41. package/dist/cli/shared-command-exports.js +114 -0
  42. package/dist/cli/shared-contracts.d.ts +1 -0
  43. package/dist/cli/shared-contracts.js +1 -0
  44. package/dist/domain/providers.d.ts +25 -3
  45. package/dist/domain/providers.js +89 -5
  46. package/dist/entities/chat.d.ts +3 -3
  47. package/dist/entities/chat.js +2 -2
  48. package/dist/entities/contact-context.d.ts +8 -8
  49. package/dist/entities/contact.d.ts +4 -4
  50. package/dist/entities/index.d.ts +40 -13
  51. package/dist/entities/index.js +5 -1
  52. package/dist/entities/knowledge-lists.d.ts +28 -0
  53. package/dist/entities/knowledge-lists.js +29 -0
  54. package/dist/entities/list-results.d.ts +1 -1
  55. package/dist/entities/list-results.js +1 -1
  56. package/dist/entities/send-attempt.d.ts +0 -1
  57. package/dist/entities/send-attempt.js +0 -1
  58. package/dist/errors/reasons.d.ts +1 -1
  59. package/dist/errors/reasons.js +7 -0
  60. package/dist/index.d.ts +1 -0
  61. package/dist/index.js +1 -0
  62. package/dist/meetings/cli/index.d.ts +1 -1
  63. package/dist/meetings/cli/index.js +25 -9
  64. package/dist/meetings/cli/passage.d.ts +0 -1
  65. package/dist/meetings/cli/passage.js +5 -3
  66. package/dist/meetings/cli/project-evidence.js +3 -2
  67. package/dist/meetings/cli/search.d.ts +2 -2
  68. package/dist/meetings/cli/search.js +9 -7
  69. package/dist/meetings/event-query.d.ts +1 -0
  70. package/dist/meetings/event-query.js +15 -0
  71. package/dist/meetings/index.d.ts +1 -0
  72. package/dist/meetings/index.js +1 -0
  73. package/dist/meetings/store.d.ts +2 -0
  74. package/dist/meetings/testing/memory.js +5 -0
  75. package/dist/search/account-list.d.ts +5 -2
  76. package/dist/search/account-list.js +27 -11
  77. package/dist/search/query.js +3 -1
  78. package/dist/sends/permission-aliases.js +1 -0
  79. package/dist/services/documents/knowledge.d.ts +5 -3
  80. package/dist/services/documents/knowledge.js +4 -4
  81. package/dist/services/meeting-links.d.ts +3 -1
  82. package/dist/services/meeting-links.js +2 -2
  83. package/dist/services/messages-search.js +15 -3
  84. package/dist/services/search-all.js +5 -2
  85. package/dist/services/tasks.d.ts +2 -0
  86. package/dist/services/tasks.js +6 -4
  87. package/dist/store/accounts.d.ts +3 -0
  88. package/dist/store/accounts.js +2 -0
  89. package/dist/store/exports.d.ts +1 -0
  90. package/dist/store/exports.js +1 -0
  91. package/dist/store/index.d.ts +3 -1
  92. package/dist/store/index.js +2 -0
  93. package/dist/store/knowledge-query.d.ts +6 -0
  94. package/dist/store/knowledge-query.js +34 -0
  95. package/dist/store/providers.d.ts +7 -0
  96. package/dist/store/providers.js +5 -0
  97. package/dist/store/sqlite/events.d.ts +2 -1
  98. package/dist/store/sqlite/events.js +16 -1
  99. package/dist/store/sqlite/knowledge.d.ts +5 -4
  100. package/dist/store/sqlite/knowledge.js +50 -17
  101. package/dist/store/sqlite/mail-rules.d.ts +2 -1
  102. package/dist/store/sqlite/mail-rules.js +12 -2
  103. package/dist/store/sqlite/meetings.js +3 -0
  104. package/dist/store/sqlite/notes.d.ts +11 -5
  105. package/dist/store/sqlite/notes.js +9 -2
  106. package/dist/store/sqlite/open-store.js +2 -0
  107. package/dist/store/sqlite/providers.d.ts +12 -0
  108. package/dist/store/sqlite/providers.js +45 -0
  109. package/dist/store/sqlite/tags.d.ts +1 -1
  110. package/dist/store/sqlite/tags.js +3 -3
  111. package/package.json +3 -3
  112. package/parity.json +92 -111
  113. package/dist/cli/bot/store.d.ts +0 -7
@@ -0,0 +1,114 @@
1
+ import { botAdminsCommand as botAdminsCommandDefinition, botMembersCommand as botMembersCommandDefinition, } from "./bot/admins.js";
2
+ import { generatedApiCommand as generatedApiCommandDefinition } from "./bot/api.js";
3
+ import { botCommand as botCommandDefinition } from "./bot/command.js";
4
+ import { botMcpCommand as botMcpCommandDefinition } from "./bot/mcp.js";
5
+ import { botMessagesCommand as botMessagesCommandDefinition } from "./bot/messages.js";
6
+ import { commandsCommand as commandsCommandDefinition } from "./commands-command.js";
7
+ import { configCommand as configCommandDefinition } from "./config-command.js";
8
+ import { guideCommand as guideCommandDefinition } from "./guide.js";
9
+ import { addMeetingBatchCommand as addMeetingBatchCommandDefinition } from "./meeting-batch.js";
10
+ import { addMeetingPreparationCommand as addMeetingPreparationCommandDefinition } from "./meeting-preparation-command.js";
11
+ import { addMeetingProjectCandidatesCommand as addMeetingProjectCandidatesCommandDefinition } from "./meeting-project-candidates-command.js";
12
+ import { addMeetingSeriesInventoryCommand as addMeetingSeriesInventoryCommandDefinition } from "./meeting-series-inventory-command.js";
13
+ import { accountCommand as accountCommandDefinition } from "./messenger/account-command.js";
14
+ import { storeCommand as storeCommandDefinition } from "./messenger/archive-commands.js";
15
+ import { attachmentsCommand as attachmentsCommandDefinition } from "./messenger/attachments-command.js";
16
+ import { chatsCommand as chatsCommandDefinition } from "./messenger/chats-command.js";
17
+ import { markReadCommand as markReadCommandDefinition } from "./messenger/chats-read-command.js";
18
+ import { completeCommand as completeCommandDefinition } from "./messenger/complete-command.js";
19
+ import { contactsCommand as contactsCommandDefinition } from "./messenger/contacts-command.js";
20
+ import { conversationsCommand as conversationsCommandDefinition } from "./messenger/conversations-command.js";
21
+ import { doctorCommand as doctorCommandDefinition } from "./messenger/doctor-command.js";
22
+ import { floodCommand as floodCommandDefinition } from "./messenger/flood-command.js";
23
+ import { recipientsCommand as recipientsCommandDefinition, sendsCommand as sendsCommandDefinition, } from "./messenger/guard-commands.js";
24
+ import { imagesCommand as imagesCommandDefinition } from "./messenger/images-command.js";
25
+ import { inboxCommand as inboxCommandDefinition } from "./messenger/inbox.js";
26
+ import { mcpCommand as mcpCommandDefinition } from "./messenger/mcp-command.js";
27
+ import { mentionsCommand as mentionsCommandDefinition } from "./messenger/mentions-command.js";
28
+ import { messagesCommand as messagesCommandDefinition, sendCommand as sendCommandDefinition, } from "./messenger/messages-command.js";
29
+ import { deleteCommand as deleteCommandDefinition } from "./messenger/messages-delete-command.js";
30
+ import { editCommand as editCommandDefinition } from "./messenger/messages-edit-command.js";
31
+ import { forwardCommand as forwardCommandDefinition } from "./messenger/messages-forward-command.js";
32
+ import { pinCommand as pinCommandDefinition, starCommands as starCommandsDefinition, unpinCommand as unpinCommandDefinition, } from "./messenger/messages-pin-command.js";
33
+ import { metadataCommand as metadataCommandDefinition } from "./messenger/metadata-command.js";
34
+ import { modelsCommand as modelsCommandDefinition } from "./messenger/models-command.js";
35
+ import { pollsCommand as pollsCommandDefinition } from "./messenger/polls-command.js";
36
+ import { reactionsCommand as reactionsCommandDefinition } from "./messenger/reactions-command.js";
37
+ import { callsCommand as callsCommandDefinition, stickersCommand as stickersCommandDefinition, } from "./messenger/records-command.js";
38
+ import { repliesCommand as repliesCommandDefinition } from "./messenger/replies-command.js";
39
+ import { reviewCommand as reviewCommandDefinition } from "./messenger/review.js";
40
+ import { scheduleCommand as scheduleCommandDefinition } from "./messenger/schedule-command.js";
41
+ import { searchCommand as searchCommandDefinition } from "./messenger/search-command.js";
42
+ import { searchesCommand as searchesCommandDefinition } from "./messenger/searches-command.js";
43
+ import { serveCommand as serveCommandDefinition } from "./messenger/serve-command.js";
44
+ import { serverCommand as serverCommandDefinition } from "./messenger/server-command.js";
45
+ import { statsCommand as statsCommandDefinition } from "./messenger/stats-command.js";
46
+ import { tagsCommand as tagsCommandDefinition } from "./messenger/tags-command.js";
47
+ import { tasksCommand as tasksCommandDefinition, tasksStatsCommand as tasksStatsCommandDefinition, } from "./messenger/tasks-command.js";
48
+ import { topicsCommand as topicsCommandDefinition } from "./messenger/topics-command.js";
49
+ import { watchCommand as watchCommandDefinition } from "./messenger/watch-command.js";
50
+ import { runsCommand as runsCommandDefinition } from "./runs/command.js";
51
+ import { sharedCommand } from "./shared-contracts.js";
52
+ import { skillCommand as skillCommandDefinition } from "./skill-command.js";
53
+ import { upgradeCommand as upgradeCommandDefinition } from "./upgrade-command.js";
54
+ export const botAdminsCommand = sharedCommand(botAdminsCommandDefinition);
55
+ export const botMembersCommand = sharedCommand(botMembersCommandDefinition);
56
+ export const generatedApiCommand = sharedCommand(generatedApiCommandDefinition);
57
+ export const botCommand = sharedCommand(botCommandDefinition);
58
+ export const botMcpCommand = sharedCommand(botMcpCommandDefinition);
59
+ export const botMessagesCommand = sharedCommand(botMessagesCommandDefinition);
60
+ export const commandsCommand = sharedCommand(commandsCommandDefinition);
61
+ export const configCommand = sharedCommand(configCommandDefinition);
62
+ export const guideCommand = sharedCommand(guideCommandDefinition);
63
+ export const addMeetingBatchCommand = sharedCommand(addMeetingBatchCommandDefinition);
64
+ export const addMeetingPreparationCommand = sharedCommand(addMeetingPreparationCommandDefinition);
65
+ export const addMeetingProjectCandidatesCommand = sharedCommand(addMeetingProjectCandidatesCommandDefinition);
66
+ export const addMeetingSeriesInventoryCommand = sharedCommand(addMeetingSeriesInventoryCommandDefinition);
67
+ export const accountCommand = sharedCommand(accountCommandDefinition);
68
+ export const storeCommand = sharedCommand(storeCommandDefinition);
69
+ export const attachmentsCommand = sharedCommand(attachmentsCommandDefinition);
70
+ export const chatsCommand = sharedCommand(chatsCommandDefinition);
71
+ export const markReadCommand = sharedCommand(markReadCommandDefinition);
72
+ export const completeCommand = sharedCommand(completeCommandDefinition);
73
+ export const contactsCommand = sharedCommand(contactsCommandDefinition);
74
+ export const conversationsCommand = sharedCommand(conversationsCommandDefinition);
75
+ export const doctorCommand = sharedCommand(doctorCommandDefinition);
76
+ export const floodCommand = sharedCommand(floodCommandDefinition);
77
+ export const recipientsCommand = sharedCommand(recipientsCommandDefinition);
78
+ export const sendsCommand = sharedCommand(sendsCommandDefinition);
79
+ export const imagesCommand = sharedCommand(imagesCommandDefinition);
80
+ export const inboxCommand = sharedCommand(inboxCommandDefinition);
81
+ export const mcpCommand = sharedCommand(mcpCommandDefinition);
82
+ export const mentionsCommand = sharedCommand(mentionsCommandDefinition);
83
+ export const messagesCommand = sharedCommand(messagesCommandDefinition);
84
+ export const sendCommand = sharedCommand(sendCommandDefinition);
85
+ export const deleteCommand = sharedCommand(deleteCommandDefinition);
86
+ export const editCommand = sharedCommand(editCommandDefinition);
87
+ export const forwardCommand = sharedCommand(forwardCommandDefinition);
88
+ export const pinCommand = sharedCommand(pinCommandDefinition);
89
+ export const starCommands = sharedCommand(starCommandsDefinition);
90
+ export const unpinCommand = sharedCommand(unpinCommandDefinition);
91
+ export const metadataCommand = sharedCommand(metadataCommandDefinition);
92
+ export const modelsCommand = sharedCommand(modelsCommandDefinition);
93
+ export const pollsCommand = sharedCommand(pollsCommandDefinition);
94
+ export const reactionsCommand = sharedCommand(reactionsCommandDefinition);
95
+ export const callsCommand = sharedCommand(callsCommandDefinition);
96
+ export const stickersCommand = sharedCommand(stickersCommandDefinition);
97
+ export const repliesCommand = sharedCommand(repliesCommandDefinition);
98
+ export const reviewCommand = sharedCommand(reviewCommandDefinition);
99
+ export const scheduleCommand = sharedCommand(scheduleCommandDefinition);
100
+ export const searchCommand = sharedCommand(searchCommandDefinition);
101
+ export const searchesCommand = sharedCommand(searchesCommandDefinition);
102
+ export const serveCommand = sharedCommand(serveCommandDefinition);
103
+ export const serverCommand = sharedCommand(serverCommandDefinition);
104
+ export const statsCommand = sharedCommand(statsCommandDefinition);
105
+ export const tagsCommand = sharedCommand(tagsCommandDefinition);
106
+ export const tasksCommand = sharedCommand(tasksCommandDefinition);
107
+ export const tasksStatsCommand = sharedCommand(tasksStatsCommandDefinition);
108
+ export const topicsCommand = sharedCommand(topicsCommandDefinition);
109
+ export const watchCommand = sharedCommand(watchCommandDefinition);
110
+ export const runsCommand = sharedCommand(runsCommandDefinition);
111
+ export const skillCommand = sharedCommand(skillCommandDefinition);
112
+ export const upgradeCommand = sharedCommand(upgradeCommandDefinition);
113
+ import { modelCatalogueCommand as modelCatalogueDefinition } from "./model-catalogue-command.js";
114
+ export const modelCatalogueCommand = sharedCommand(modelCatalogueDefinition);
@@ -0,0 +1 @@
1
+ export { assertSharedContracts, customizeSharedCommand, hasSharedContract, overrideSharedContract, type SharedContractOverride, sharedCommand, sharedContractOverrides, sharedContracts, } from "@wirecat/cli-base/commands";
@@ -0,0 +1 @@
1
+ export { assertSharedContracts, customizeSharedCommand, hasSharedContract, overrideSharedContract, sharedCommand, sharedContractOverrides, sharedContracts, } from "@wirecat/cli-base/commands";
@@ -1,20 +1,42 @@
1
1
  import type { Provider } from "./models.js";
2
2
  /** What a search reads; the same names `--only`, `searched` and `skipped` use. */
3
- export declare const KINDS: readonly ["messages", "mail", "notes", "documents", "meetings"];
3
+ export declare const KINDS: readonly ["messages", "mail", "notes", "documents", "meetings", "events"];
4
4
  export type Kind = (typeof KINDS)[number];
5
5
  export interface ProviderEntry {
6
6
  name: Provider;
7
7
  kind: Kind;
8
8
  aliases: readonly string[];
9
+ /** The CLI that wrote the entry (`zm`, `drive`). One CLI may write several providers, so it is not an alias. */
10
+ command?: string;
9
11
  }
10
- /** Adding a provider is one entry here; `--source` and every search read it. */
12
+ /** The seed: what cli-core knows before any CLI has written its entry into the store. */
11
13
  export declare const PROVIDERS: readonly ProviderEntry[];
12
14
  /** The store keeps a notes folder as an `accounts` row of this provider; people call it `notes`. */
13
15
  export declare const FOLDER_PROVIDER = "folder";
14
16
  /** Notes written in memo have no account row; this is their account. */
15
17
  export declare const INTERNAL_NOTES = "internal";
18
+ /** The reason a search gives for an account whose provider no entry names. */
19
+ export declare const UNKNOWN_PROVIDER = "unknown provider \u2014 run its CLI once";
20
+ /** An entry as a CLI or the store gives it, checked: anything else is a `validation_error`. */
21
+ export declare const providerEntryOf: (value: unknown) => ProviderEntry;
22
+ /** The built-ins and the entries the store or the CLI running gave; what `kindOf` and `providerNamed` read. */
23
+ export declare const providers: () => readonly ProviderEntry[];
24
+ /**
25
+ * Replaces the entries beyond the built-ins. Opening the store calls it with the stored entries; a test or a CLI
26
+ * with no store may call it too. Two entries that disagree on a kind, or one word naming two providers, throw.
27
+ */
28
+ export declare const useProviders: (entries: readonly ProviderEntry[]) => void;
29
+ /**
30
+ * Like `useProviders`, but an entry that clashes is left out instead of failing: what the store holds was written
31
+ * by CLIs of other versions, and one stale entry must not stop the store opening. Answers the entries left out.
32
+ */
33
+ export declare const useStoredProviders: (entries: readonly unknown[]) => unknown[];
34
+ /** Adds one entry to those in use, strictly: a clash throws and leaves the registry as it was. */
35
+ export declare const addProvider: (entry: ProviderEntry) => void;
16
36
  export declare const isKind: (word: string) => word is Kind;
17
37
  /** The registry's provider a name or alias stands for. */
18
38
  export declare const providerNamed: (word: string) => ProviderEntry | undefined;
19
- /** A provider the registry does not list is a messenger: consumers define their own and tests use made-up ones. */
39
+ /** The kind of a provider the registry knows; `undefined` for one no entry names, which a search skips. */
40
+ export declare const kindIn: (provider: Provider) => Kind | undefined;
41
+ /** A provider the registry does not list counts as a messenger here; a search asks `kindIn` and skips it. */
20
42
  export declare const kindOf: (provider: Provider) => Kind;
@@ -1,6 +1,7 @@
1
+ import { CliError } from "@wirecat/cli-base";
1
2
  /** What a search reads; the same names `--only`, `searched` and `skipped` use. */
2
- export const KINDS = ["messages", "mail", "notes", "documents", "meetings"];
3
- /** Adding a provider is one entry here; `--source` and every search read it. */
3
+ export const KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
4
+ /** The seed: what cli-core knows before any CLI has written its entry into the store. */
4
5
  export const PROVIDERS = [
5
6
  { name: "telegram", kind: "messages", aliases: ["tg"] },
6
7
  { name: "telegram-bot", kind: "messages", aliases: ["tg-bot"] },
@@ -16,11 +17,94 @@ export const PROVIDERS = [
16
17
  export const FOLDER_PROVIDER = "folder";
17
18
  /** Notes written in memo have no account row; this is their account. */
18
19
  export const INTERNAL_NOTES = "internal";
20
+ /** The reason a search gives for an account whose provider no entry names. */
21
+ export const UNKNOWN_PROVIDER = "unknown provider — run its CLI once";
22
+ const WORD = /^[a-z0-9][a-z0-9_-]*$/;
23
+ const invalid = (message) => {
24
+ throw new CliError("validation_error", message);
25
+ };
26
+ const wordOf = (value, what) => typeof value === "string" && WORD.test(value)
27
+ ? value
28
+ : invalid(`${what} is lowercase letters, digits, - and _ — not ${JSON.stringify(value)}`);
29
+ /** An entry as a CLI or the store gives it, checked: anything else is a `validation_error`. */
30
+ export const providerEntryOf = (value) => {
31
+ if (typeof value !== "object" || value === null || Array.isArray(value))
32
+ return invalid("a provider entry is an object");
33
+ const { name, kind, aliases = [], command } = value;
34
+ const named = wordOf(name, "a provider's name");
35
+ if (typeof kind !== "string" || !KINDS.includes(kind))
36
+ invalid(`provider ${named}'s kind is one of ${KINDS.join(", ")} — not ${JSON.stringify(kind)}`);
37
+ if (!Array.isArray(aliases))
38
+ invalid(`provider ${named}'s aliases are a list`);
39
+ return {
40
+ name: named,
41
+ kind: kind,
42
+ aliases: [...new Set(aliases.map((alias) => wordOf(alias, `an alias of ${named}`)))],
43
+ ...(command === undefined ? {} : { command: wordOf(command, `the command of ${named}`) }),
44
+ };
45
+ };
46
+ const describe = ({ name, kind, command }) => `${name} (${kind}${command ? `, from ${command}` : ""})`;
47
+ const wordsOf = ({ name, aliases }) => [name, ...aliases];
48
+ /** `entry` joined to `known`: the same name keeps one entry with both entries' aliases; a clash is an error. */
49
+ const joined = (known, entry) => {
50
+ const same = known.find(({ name }) => name === entry.name);
51
+ if (same && same.kind !== entry.kind)
52
+ invalid(`two provider entries disagree on the kind: ${describe(same)} and ${describe(entry)}`);
53
+ const merged = same
54
+ ? {
55
+ ...same,
56
+ aliases: [...new Set([...same.aliases, ...entry.aliases])],
57
+ ...(entry.command ? { command: entry.command } : {}),
58
+ }
59
+ : entry;
60
+ const others = known.filter((one) => one !== same);
61
+ for (const word of wordsOf(merged)) {
62
+ const owner = others.find((one) => wordsOf(one).includes(word));
63
+ if (owner)
64
+ invalid(`"${word}" names two providers: ${describe(owner)} and ${describe(merged)}`);
65
+ }
66
+ return same ? known.map((one) => (one === same ? merged : one)) : [...known, merged];
67
+ };
68
+ let registry = PROVIDERS;
69
+ /** The built-ins and the entries the store or the CLI running gave; what `kindOf` and `providerNamed` read. */
70
+ export const providers = () => registry;
71
+ /**
72
+ * Replaces the entries beyond the built-ins. Opening the store calls it with the stored entries; a test or a CLI
73
+ * with no store may call it too. Two entries that disagree on a kind, or one word naming two providers, throw.
74
+ */
75
+ export const useProviders = (entries) => {
76
+ registry = entries.map(providerEntryOf).reduce(joined, PROVIDERS);
77
+ };
78
+ /**
79
+ * Like `useProviders`, but an entry that clashes is left out instead of failing: what the store holds was written
80
+ * by CLIs of other versions, and one stale entry must not stop the store opening. Answers the entries left out.
81
+ */
82
+ export const useStoredProviders = (entries) => {
83
+ const left = [];
84
+ registry = entries.reduce((known, entry) => {
85
+ try {
86
+ return joined(known, providerEntryOf(entry));
87
+ }
88
+ catch (error) {
89
+ if (!(error instanceof CliError))
90
+ throw error;
91
+ left.push(entry);
92
+ return known;
93
+ }
94
+ }, PROVIDERS);
95
+ return left;
96
+ };
97
+ /** Adds one entry to those in use, strictly: a clash throws and leaves the registry as it was. */
98
+ export const addProvider = (entry) => {
99
+ registry = joined(registry, providerEntryOf(entry));
100
+ };
19
101
  export const isKind = (word) => KINDS.includes(word.toLowerCase());
20
102
  /** The registry's provider a name or alias stands for. */
21
103
  export const providerNamed = (word) => {
22
104
  const wanted = word.toLowerCase();
23
- return PROVIDERS.find(({ name, aliases }) => name === wanted || aliases.includes(wanted));
105
+ return registry.find((entry) => wordsOf(entry).includes(wanted));
24
106
  };
25
- /** A provider the registry does not list is a messenger: consumers define their own and tests use made-up ones. */
26
- export const kindOf = (provider) => provider === FOLDER_PROVIDER ? "notes" : (providerNamed(provider)?.kind ?? "messages");
107
+ /** The kind of a provider the registry knows; `undefined` for one no entry names, which a search skips. */
108
+ export const kindIn = (provider) => provider === FOLDER_PROVIDER ? "notes" : registry.find(({ name }) => name === provider)?.kind;
109
+ /** A provider the registry does not list counts as a messenger here; a search asks `kindIn` and skips it. */
110
+ export const kindOf = (provider) => kindIn(provider) ?? "messages";
@@ -34,8 +34,8 @@ export declare const chat: v.StrictObjectSchema<{
34
34
  readonly only_admins_edit_info: v.OptionalSchema<v.NullableSchema<v.BooleanSchema<undefined>, undefined>, undefined>;
35
35
  readonly disappearing_seconds: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
36
36
  }, undefined>, undefined>;
37
- /** `chats show`: who is in it, as far as anyone recorded; `null` when nobody did — a channel, always. */
38
- readonly members: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.StrictObjectSchema<{
37
+ /** `chats show`: absent when no roster is known; an empty list is a known empty roster. */
38
+ readonly members: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
39
39
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
40
40
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
41
41
  readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -51,5 +51,5 @@ export declare const chat: v.StrictObjectSchema<{
51
51
  readonly score: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
52
52
  readonly reasons: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
53
53
  readonly check: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
54
- }, undefined>, undefined>, undefined>, undefined>;
54
+ }, undefined>, undefined>, undefined>;
55
55
  }, undefined>;
@@ -37,6 +37,6 @@ export const chat = v.strictObject({
37
37
  only_admins_edit_info: setting,
38
38
  disappearing_seconds: v.optional(v.nullable(count)),
39
39
  })),
40
- /** `chats show`: who is in it, as far as anyone recorded; `null` when nobody did — a channel, always. */
41
- members: v.optional(v.nullable(v.array(member))),
40
+ /** `chats show`: absent when no roster is known; an empty list is a known empty roster. */
41
+ members: v.optional(v.array(member)),
42
42
  });
@@ -39,7 +39,7 @@ export declare const contactMessages: v.StrictObjectSchema<{
39
39
  readonly only_admins_edit_info: v.OptionalSchema<v.NullableSchema<v.BooleanSchema<undefined>, undefined>, undefined>;
40
40
  readonly disappearing_seconds: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
41
41
  }, undefined>, undefined>;
42
- readonly members: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.StrictObjectSchema<{
42
+ readonly members: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
43
43
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
44
44
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
45
45
  readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -55,7 +55,7 @@ export declare const contactMessages: v.StrictObjectSchema<{
55
55
  readonly score: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
56
56
  readonly reasons: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
57
57
  readonly check: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
58
- }, undefined>, undefined>, undefined>, undefined>;
58
+ }, undefined>, undefined>, undefined>;
59
59
  }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
60
60
  readonly entries: Pick<{
61
61
  readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
@@ -89,7 +89,7 @@ export declare const contactMessages: v.StrictObjectSchema<{
89
89
  readonly only_admins_edit_info: v.OptionalSchema<v.NullableSchema<v.BooleanSchema<undefined>, undefined>, undefined>;
90
90
  readonly disappearing_seconds: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
91
91
  }, undefined>, undefined>;
92
- readonly members: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.StrictObjectSchema<{
92
+ readonly members: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
93
93
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
94
94
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
95
95
  readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -105,7 +105,7 @@ export declare const contactMessages: v.StrictObjectSchema<{
105
105
  readonly score: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
106
106
  readonly reasons: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
107
107
  readonly check: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
108
- }, undefined>, undefined>, undefined>, undefined>;
108
+ }, undefined>, undefined>, undefined>;
109
109
  }, "id" | "kind" | "title">;
110
110
  readonly "~standard": v.StandardProps<{
111
111
  id: string;
@@ -769,7 +769,7 @@ export declare const contactContext: v.UnionSchema<[v.StrictObjectSchema<{
769
769
  readonly only_admins_edit_info: v.OptionalSchema<v.NullableSchema<v.BooleanSchema<undefined>, undefined>, undefined>;
770
770
  readonly disappearing_seconds: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
771
771
  }, undefined>, undefined>;
772
- readonly members: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.StrictObjectSchema<{
772
+ readonly members: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
773
773
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
774
774
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
775
775
  readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -785,7 +785,7 @@ export declare const contactContext: v.UnionSchema<[v.StrictObjectSchema<{
785
785
  readonly score: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
786
786
  readonly reasons: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
787
787
  readonly check: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
788
- }, undefined>, undefined>, undefined>, undefined>;
788
+ }, undefined>, undefined>, undefined>;
789
789
  }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
790
790
  readonly entries: Pick<{
791
791
  readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
@@ -819,7 +819,7 @@ export declare const contactContext: v.UnionSchema<[v.StrictObjectSchema<{
819
819
  readonly only_admins_edit_info: v.OptionalSchema<v.NullableSchema<v.BooleanSchema<undefined>, undefined>, undefined>;
820
820
  readonly disappearing_seconds: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
821
821
  }, undefined>, undefined>;
822
- readonly members: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.StrictObjectSchema<{
822
+ readonly members: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
823
823
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
824
824
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
825
825
  readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -835,7 +835,7 @@ export declare const contactContext: v.UnionSchema<[v.StrictObjectSchema<{
835
835
  readonly score: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
836
836
  readonly reasons: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
837
837
  readonly check: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
838
- }, undefined>, undefined>, undefined>, undefined>;
838
+ }, undefined>, undefined>, undefined>;
839
839
  }, "id" | "kind" | "title">;
840
840
  readonly "~standard": v.StandardProps<{
841
841
  id: string;
@@ -50,7 +50,7 @@ export declare const contact: v.StrictObjectSchema<{
50
50
  readonly only_admins_edit_info: v.OptionalSchema<v.NullableSchema<v.BooleanSchema<undefined>, undefined>, undefined>;
51
51
  readonly disappearing_seconds: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
52
52
  }, undefined>, undefined>;
53
- readonly members: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.StrictObjectSchema<{
53
+ readonly members: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
54
54
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
55
55
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
56
56
  readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -66,7 +66,7 @@ export declare const contact: v.StrictObjectSchema<{
66
66
  readonly score: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
67
67
  readonly reasons: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
68
68
  readonly check: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
69
- }, undefined>, undefined>, undefined>, undefined>;
69
+ }, undefined>, undefined>, undefined>;
70
70
  }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
71
71
  readonly entries: Pick<{
72
72
  readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
@@ -100,7 +100,7 @@ export declare const contact: v.StrictObjectSchema<{
100
100
  readonly only_admins_edit_info: v.OptionalSchema<v.NullableSchema<v.BooleanSchema<undefined>, undefined>, undefined>;
101
101
  readonly disappearing_seconds: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
102
102
  }, undefined>, undefined>;
103
- readonly members: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.StrictObjectSchema<{
103
+ readonly members: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
104
104
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
105
105
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
106
106
  readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -116,7 +116,7 @@ export declare const contact: v.StrictObjectSchema<{
116
116
  readonly score: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
117
117
  readonly reasons: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
118
118
  readonly check: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
119
- }, undefined>, undefined>, undefined>, undefined>;
119
+ }, undefined>, undefined>, undefined>;
120
120
  }, "id" | "kind" | "last_message_at" | "ref" | "title">;
121
121
  readonly "~standard": v.StandardProps<{
122
122
  ref: string;
@@ -39,6 +39,7 @@ import { imageEmbedding } from "./image-embedding.js";
39
39
  import { inviteLink } from "./invite-link.js";
40
40
  import { job } from "./job.js";
41
41
  import { joinRequest } from "./join-request.js";
42
+ import { organization, project, reminder } from "./knowledge-lists.js";
42
43
  import { botAdmin, botMenuEntry, botProfile, botSeenChat, botTemplate, botWebhook, callRecord, scheduledJob, stickerInventory } from "./list-results.js";
43
44
  import { messageEvent, serveSummary, watchedMessage, watchItem } from "./listener.js";
44
45
  import { mediaArchive, mediaArchiveCheck, mediaArchiveMove, mediaArchiveTimer } from "./media-archive.js";
@@ -85,7 +86,7 @@ import { topic } from "./topic.js";
85
86
  * subset of its fields, never a renamed one. Commands move onto these one by one; until then, a schema
86
87
  * is the target, not a description of today's output.
87
88
  */
88
- 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, 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, contactProfile, 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, 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, person, place, poll, pollChange, pollVote, ranking, reactionChange, recipient, recipientAdded, recipientChange, recipientOff, recipientRemoved, recordedRun, reference, relationship, removedModelKey, retention, runDetails, runHit, runLocation, savedSearch, scheduledJob, searchHistoryClear, sendAttempt, serveSummary, stickerInventory, storeBackup, storeChatStatus, storeCheck, storeClear, storeCopyRemoval, storeDecrypt, storedModelKey, storeExport, storeGapPlan, storeGapRepair, storeInfo, storeJobCancel, storeJobClear, storeJobDetails, storeJobRetry, storeMigration, storeReindex, storeRepair, storeReset, storeRestore, tagChange, tagging, task, taskCard, taskCategories, taskClosed, taskCreated, taskLinks, taskMerge, taskPair, taskScan, taskSimilar, taskStats, taskUnmerge, topic, trackedChat, trackedChatHistory, watchedMessage, watchItem, };
89
+ 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, 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, contactProfile, 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, 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, reactionChange, recipient, recipientAdded, recipientChange, recipientOff, recipientRemoved, recordedRun, reference, relationship, reminder, removedModelKey, retention, runDetails, runHit, runLocation, savedSearch, scheduledJob, searchHistoryClear, sendAttempt, serveSummary, stickerInventory, storeBackup, storeChatStatus, storeCheck, storeClear, storeCopyRemoval, storeDecrypt, storedModelKey, storeExport, storeGapPlan, storeGapRepair, storeInfo, storeJobCancel, storeJobClear, storeJobDetails, storeJobRetry, storeMigration, storeReindex, storeRepair, storeReset, storeRestore, tagChange, tagging, task, taskCard, taskCategories, taskClosed, taskCreated, taskLinks, taskMerge, taskPair, taskScan, taskSimilar, taskStats, taskUnmerge, topic, trackedChat, trackedChatHistory, watchedMessage, watchItem, };
89
90
  export declare const ENTITIES: {
90
91
  readonly meeting_ingestion: v.StrictObjectSchema<{
91
92
  readonly meetings: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -3207,7 +3208,7 @@ export declare const ENTITIES: {
3207
3208
  readonly only_admins_edit_info: v.OptionalSchema<v.NullableSchema<v.BooleanSchema<undefined>, undefined>, undefined>;
3208
3209
  readonly disappearing_seconds: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
3209
3210
  }, undefined>, undefined>;
3210
- readonly members: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.StrictObjectSchema<{
3211
+ readonly members: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
3211
3212
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
3212
3213
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3213
3214
  readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -3223,7 +3224,7 @@ export declare const ENTITIES: {
3223
3224
  readonly score: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
3224
3225
  readonly reasons: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
3225
3226
  readonly check: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
3226
- }, undefined>, undefined>, undefined>, undefined>;
3227
+ }, undefined>, undefined>, undefined>;
3227
3228
  }, undefined>;
3228
3229
  readonly mention: v.StrictObjectSchema<{
3229
3230
  readonly id: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
@@ -3468,7 +3469,7 @@ export declare const ENTITIES: {
3468
3469
  readonly only_admins_edit_info: v.OptionalSchema<v.NullableSchema<v.BooleanSchema<undefined>, undefined>, undefined>;
3469
3470
  readonly disappearing_seconds: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
3470
3471
  }, undefined>, undefined>;
3471
- readonly members: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.StrictObjectSchema<{
3472
+ readonly members: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
3472
3473
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
3473
3474
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3474
3475
  readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -3484,7 +3485,7 @@ export declare const ENTITIES: {
3484
3485
  readonly score: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
3485
3486
  readonly reasons: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
3486
3487
  readonly check: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
3487
- }, undefined>, undefined>, undefined>, undefined>;
3488
+ }, undefined>, undefined>, undefined>;
3488
3489
  }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
3489
3490
  readonly entries: Pick<{
3490
3491
  readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
@@ -3518,7 +3519,7 @@ export declare const ENTITIES: {
3518
3519
  readonly only_admins_edit_info: v.OptionalSchema<v.NullableSchema<v.BooleanSchema<undefined>, undefined>, undefined>;
3519
3520
  readonly disappearing_seconds: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
3520
3521
  }, undefined>, undefined>;
3521
- readonly members: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.StrictObjectSchema<{
3522
+ readonly members: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
3522
3523
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
3523
3524
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
3524
3525
  readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -3534,7 +3535,7 @@ export declare const ENTITIES: {
3534
3535
  readonly score: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
3535
3536
  readonly reasons: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
3536
3537
  readonly check: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
3537
- }, undefined>, undefined>, undefined>, undefined>;
3538
+ }, undefined>, undefined>, undefined>;
3538
3539
  }, "id" | "kind" | "title">;
3539
3540
  readonly "~standard": v.StandardProps<{
3540
3541
  id: string;
@@ -4362,7 +4363,7 @@ export declare const ENTITIES: {
4362
4363
  readonly only_admins_edit_info: v.OptionalSchema<v.NullableSchema<v.BooleanSchema<undefined>, undefined>, undefined>;
4363
4364
  readonly disappearing_seconds: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
4364
4365
  }, undefined>, undefined>;
4365
- readonly members: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.StrictObjectSchema<{
4366
+ readonly members: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
4366
4367
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4367
4368
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4368
4369
  readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -4378,7 +4379,7 @@ export declare const ENTITIES: {
4378
4379
  readonly score: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
4379
4380
  readonly reasons: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
4380
4381
  readonly check: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
4381
- }, undefined>, undefined>, undefined>, undefined>;
4382
+ }, undefined>, undefined>, undefined>;
4382
4383
  }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
4383
4384
  readonly entries: Pick<{
4384
4385
  readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
@@ -4412,7 +4413,7 @@ export declare const ENTITIES: {
4412
4413
  readonly only_admins_edit_info: v.OptionalSchema<v.NullableSchema<v.BooleanSchema<undefined>, undefined>, undefined>;
4413
4414
  readonly disappearing_seconds: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, undefined>;
4414
4415
  }, undefined>, undefined>;
4415
- readonly members: v.OptionalSchema<v.NullableSchema<v.ArraySchema<v.StrictObjectSchema<{
4416
+ readonly members: v.OptionalSchema<v.ArraySchema<v.StrictObjectSchema<{
4416
4417
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4417
4418
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4418
4419
  readonly username: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -4428,7 +4429,7 @@ export declare const ENTITIES: {
4428
4429
  readonly score: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
4429
4430
  readonly reasons: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
4430
4431
  readonly check: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
4431
- }, undefined>, undefined>, undefined>, undefined>;
4432
+ }, undefined>, undefined>, undefined>;
4432
4433
  }, "id" | "kind" | "last_message_at" | "ref" | "title">;
4433
4434
  readonly "~standard": v.StandardProps<{
4434
4435
  ref: string;
@@ -4742,6 +4743,33 @@ export declare const ENTITIES: {
4742
4743
  readonly account: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
4743
4744
  readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4744
4745
  }, undefined>;
4746
+ readonly organization: v.StrictObjectSchema<{
4747
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4748
+ readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
4749
+ readonly kind: v.PicklistSchema<["company", "team", "family", "community"], undefined>;
4750
+ readonly name: v.StringSchema<undefined>;
4751
+ readonly scope: v.PicklistSchema<["personal", "work"], undefined>;
4752
+ readonly created_at: 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`">]>;
4753
+ }, undefined>;
4754
+ readonly project: v.StrictObjectSchema<{
4755
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4756
+ readonly ref: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "a reference such as `note:42`">]>;
4757
+ readonly key: v.StringSchema<undefined>;
4758
+ readonly name: v.StringSchema<undefined>;
4759
+ readonly type: v.PicklistSchema<["work", "client", "personal", "oss", "other"], undefined>;
4760
+ readonly organization_id: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
4761
+ readonly scope: v.PicklistSchema<["personal", "work"], undefined>;
4762
+ readonly created_at: 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`">]>;
4763
+ }, undefined>;
4764
+ readonly reminder: v.StrictObjectSchema<{
4765
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4766
+ readonly task: v.StringSchema<undefined>;
4767
+ readonly due_at: 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`">]>;
4768
+ readonly timezone: v.StringSchema<undefined>;
4769
+ readonly state: v.PicklistSchema<["pending", "leased", "delivered", "cancelled"], undefined>;
4770
+ readonly revision: v.NumberSchema<undefined>;
4771
+ readonly receipt: v.NullableSchema<v.StringSchema<undefined>, undefined>;
4772
+ }, undefined>;
4745
4773
  readonly bot_profile: v.StrictObjectSchema<{
4746
4774
  readonly name: v.StringSchema<undefined>;
4747
4775
  readonly token: v.StringSchema<undefined>;
@@ -4788,7 +4816,7 @@ export declare const ENTITIES: {
4788
4816
  }, undefined>;
4789
4817
  readonly bot_webhook: v.StrictObjectSchema<{
4790
4818
  readonly url: v.StringSchema<undefined>;
4791
- readonly types: v.NullableSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
4819
+ readonly types: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
4792
4820
  }, undefined>;
4793
4821
  readonly scheduled_job: v.StrictObjectSchema<{
4794
4822
  readonly name: v.StringSchema<undefined>;
@@ -7128,7 +7156,6 @@ export declare const ENTITIES: {
7128
7156
  readonly key: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7129
7157
  readonly count: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>;
7130
7158
  readonly for_everyone: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
7131
- readonly send_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
7132
7159
  readonly operation_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
7133
7160
  readonly parent_operation_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;
7134
7161
  readonly reply_to: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>;