@wirecat/cli-core 0.399.0 → 0.401.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.
- package/CHANGELOG.md +111 -0
- package/README.md +1 -1
- package/dist/analysis/consents.d.ts +11 -6
- package/dist/analysis/consents.js +5 -2
- package/dist/cli/bot/mcp.js +2 -1
- package/dist/cli/bot/store.js +1 -1
- package/dist/cli/config-command.js +20 -1
- package/dist/cli/context.d.ts +2 -0
- package/dist/cli/context.js +1 -1
- package/dist/cli/effects.d.ts +4 -1
- package/dist/cli/effects.js +10 -2
- package/dist/cli/index.d.ts +3 -2
- package/dist/cli/index.js +3 -2
- package/dist/cli/json-fields.js +12 -1
- package/dist/cli/meeting-evidence-answer.d.ts +46 -0
- package/dist/cli/meeting-evidence-answer.js +22 -0
- package/dist/cli/meeting-preparation-answer.js +1 -13
- package/dist/cli/messenger/account-command.js +15 -6
- package/dist/cli/messenger/account-profile-query.d.ts +2 -0
- package/dist/cli/messenger/account-profile-query.js +13 -0
- package/dist/cli/messenger/account-sessions-command.js +1 -2
- package/dist/cli/messenger/admin-commands.js +12 -12
- package/dist/cli/messenger/admin-contacts-command.js +6 -3
- package/dist/cli/messenger/admin-folders-command.js +5 -5
- package/dist/cli/messenger/admin-moderation-command.js +4 -4
- package/dist/cli/messenger/admin-statistics-command.js +6 -14
- package/dist/cli/messenger/analysis-consents-query.d.ts +5 -0
- package/dist/cli/messenger/analysis-consents-query.js +20 -0
- package/dist/cli/messenger/archive-commands.js +3 -3
- package/dist/cli/messenger/attachments-command.js +3 -0
- package/dist/cli/messenger/backfill-command.js +5 -4
- package/dist/cli/messenger/chat-queries.d.ts +1 -0
- package/dist/cli/messenger/chat-queries.js +12 -2
- package/dist/cli/messenger/chats-command.js +2 -2
- package/dist/cli/messenger/chats-documents-command.js +7 -5
- package/dist/cli/messenger/chats-members-command.js +7 -3
- package/dist/cli/messenger/chats-read-command.js +1 -1
- package/dist/cli/messenger/chats-tracking-command.js +14 -6
- package/dist/cli/messenger/contacts-command.js +9 -5
- package/dist/cli/messenger/conversations-command.js +20 -16
- package/dist/cli/messenger/doctor-command.js +4 -1
- package/dist/cli/messenger/document-links-query.d.ts +2 -0
- package/dist/cli/messenger/document-links-query.js +9 -0
- package/dist/cli/messenger/download-command.js +1 -0
- package/dist/cli/messenger/flood-command.d.ts +2 -2
- package/dist/cli/messenger/flood-command.js +3 -3
- package/dist/cli/messenger/gaps-command.js +2 -2
- package/dist/cli/messenger/guard-commands.js +35 -13
- package/dist/cli/messenger/images-command.js +1 -0
- package/dist/cli/messenger/media-archive-command.js +2 -0
- package/dist/cli/messenger/media-archive-move-command.js +1 -0
- package/dist/cli/messenger/media-archive-timer-command.js +1 -1
- package/dist/cli/messenger/mentions-command.js +15 -2
- package/dist/cli/messenger/message-writes.d.ts +192 -2
- package/dist/cli/messenger/message-writes.js +6 -2
- package/dist/cli/messenger/messages-command.js +2 -0
- package/dist/cli/messenger/messages-delete-command.js +1 -0
- package/dist/cli/messenger/messages-edit-command.js +1 -0
- package/dist/cli/messenger/messages-evidence-command.js +3 -1
- package/dist/cli/messenger/messages-forward-command.js +1 -0
- package/dist/cli/messenger/messages-pin-command.js +3 -0
- package/dist/cli/messenger/messages-send-command.js +10 -6
- package/dist/cli/messenger/metadata-command.js +6 -1
- package/dist/cli/messenger/models-command.js +10 -5
- package/dist/cli/messenger/polls-command.js +4 -0
- package/dist/cli/messenger/private-people-command.js +3 -3
- package/dist/cli/messenger/rankings-command.js +6 -11
- package/dist/cli/messenger/reactions-command.js +2 -0
- package/dist/cli/messenger/recipients-query.d.ts +5 -0
- package/dist/cli/messenger/recipients-query.js +18 -0
- package/dist/cli/messenger/records-command.js +13 -8
- package/dist/cli/messenger/review.js +1 -1
- package/dist/cli/messenger/schedule-command.js +2 -2
- package/dist/cli/messenger/search-answers.js +2 -0
- package/dist/cli/messenger/search-command.js +3 -1
- package/dist/cli/messenger/searches-command.js +5 -1
- package/dist/cli/messenger/sends-query.d.ts +5 -0
- package/dist/cli/messenger/sends-query.js +33 -0
- package/dist/cli/messenger/serve-command.js +1 -0
- package/dist/cli/messenger/server-command.js +0 -3
- package/dist/cli/messenger/statistics-query.d.ts +14 -0
- package/dist/cli/messenger/statistics-query.js +143 -0
- package/dist/cli/messenger/stats-command.js +5 -5
- package/dist/cli/messenger/store-maintenance-command.js +10 -10
- package/dist/cli/messenger/stored.js +4 -1
- package/dist/cli/messenger/tags-command.js +7 -1
- package/dist/cli/messenger/tasks-command.js +57 -14
- package/dist/cli/messenger/transcribe-command.js +1 -0
- package/dist/cli/messenger/watch-answers.d.ts +6 -0
- package/dist/cli/messenger/watch-answers.js +69 -0
- package/dist/cli/messenger/watch-command.d.ts +1 -1
- package/dist/cli/messenger/watch-command.js +56 -7
- package/dist/cli/program.js +5 -1
- package/dist/cli/runs/command.js +25 -38
- package/dist/cli/runs/query.d.ts +5 -0
- package/dist/cli/runs/query.js +32 -0
- package/dist/cli/runs/search-command.d.ts +4 -0
- package/dist/cli/runs/search-command.js +27 -0
- package/dist/cli/runs/search-query.d.ts +4 -0
- package/dist/cli/runs/search-query.js +50 -0
- package/dist/cli/runs/search.d.ts +2 -1
- package/dist/cli/runs/search.js +6 -6
- package/dist/documents/index.d.ts +1 -0
- package/dist/documents/index.js +1 -0
- package/dist/domain/attachments.js +9 -1
- package/dist/domain/rankings-options.js +3 -3
- package/dist/entities/account-change.d.ts +89 -0
- package/dist/entities/account-change.js +20 -0
- package/dist/entities/account-profile.d.ts +7 -0
- package/dist/entities/account-profile.js +8 -0
- package/dist/entities/analysis-consent.d.ts +9 -0
- package/dist/entities/analysis-consent.js +4 -0
- package/dist/entities/attachment-results.d.ts +96 -0
- package/dist/entities/attachment-results.js +31 -0
- package/dist/entities/batch-result.d.ts +27 -0
- package/dist/entities/batch-result.js +18 -0
- package/dist/entities/chat-admin.d.ts +234 -0
- package/dist/entities/chat-admin.js +84 -0
- package/dist/entities/chat-change.d.ts +25 -0
- package/dist/entities/chat-change.js +11 -0
- package/dist/entities/chat-metadata.d.ts +34 -0
- package/dist/entities/chat-metadata.js +15 -0
- package/dist/entities/chat-moderation.d.ts +44 -0
- package/dist/entities/chat-moderation.js +37 -0
- package/dist/entities/chat-tracking.d.ts +26 -0
- package/dist/entities/chat-tracking.js +23 -0
- package/dist/entities/contact-activity.d.ts +52 -0
- package/dist/entities/contact-activity.js +42 -0
- package/dist/entities/contact-context.d.ts +1568 -0
- package/dist/entities/contact-context.js +191 -0
- package/dist/entities/contact-write.d.ts +22 -0
- package/dist/entities/contact-write.js +6 -0
- package/dist/entities/conversation-preparation.d.ts +63 -0
- package/dist/entities/conversation-preparation.js +23 -0
- package/dist/entities/conversation-results.d.ts +567 -0
- package/dist/entities/conversation-results.js +94 -0
- package/dist/entities/document-link.d.ts +13 -0
- package/dist/entities/document-link.js +11 -0
- package/dist/entities/extraction-report.d.ts +95 -0
- package/dist/entities/extraction-report.js +34 -0
- package/dist/entities/hit.d.ts +4 -0
- package/dist/entities/hit.js +4 -0
- package/dist/entities/image-embedding.d.ts +9 -0
- package/dist/entities/image-embedding.js +10 -0
- package/dist/entities/index.d.ts +8284 -1921
- package/dist/entities/index.js +178 -3
- package/dist/entities/listener.d.ts +2150 -0
- package/dist/entities/listener.js +46 -0
- package/dist/entities/media-archive.d.ts +43 -0
- package/dist/entities/media-archive.js +32 -0
- package/dist/entities/meeting-evidence.d.ts +86 -0
- package/dist/entities/meeting-evidence.js +25 -0
- package/dist/entities/meeting-preparation-parts.d.ts +14 -0
- package/dist/entities/meeting-preparation-parts.js +15 -13
- package/dist/entities/meeting-task-proposal.d.ts +14 -0
- package/dist/entities/meeting-task-proposal.js +19 -0
- package/dist/entities/meeting.d.ts +1 -1
- package/dist/entities/meeting.js +1 -1
- package/dist/entities/mention.d.ts +63 -0
- package/dist/entities/mention.js +44 -0
- package/dist/entities/message-change.d.ts +19 -0
- package/dist/entities/message-change.js +6 -0
- package/dist/entities/message-context.d.ts +617 -0
- package/dist/entities/message-context.js +20 -0
- package/dist/entities/message-read.d.ts +73 -0
- package/dist/entities/message-read.js +58 -0
- package/dist/entities/message-transfer.d.ts +379 -0
- package/dist/entities/message-transfer.js +83 -0
- package/dist/entities/message-write.d.ts +378 -0
- package/dist/entities/message-write.js +10 -0
- package/dist/entities/model-key.d.ts +14 -0
- package/dist/entities/model-key.js +10 -0
- package/dist/entities/poll.d.ts +40 -0
- package/dist/entities/poll.js +16 -0
- package/dist/entities/private-contact.d.ts +10 -0
- package/dist/entities/private-contact.js +4 -0
- package/dist/entities/reaction-change.d.ts +7 -0
- package/dist/entities/reaction-change.js +8 -0
- package/dist/entities/recipient.d.ts +29 -0
- package/dist/entities/recipient.js +11 -0
- package/dist/entities/recorded-run.d.ts +103 -0
- package/dist/entities/recorded-run.js +44 -0
- package/dist/entities/saved-search.d.ts +4 -0
- package/dist/entities/saved-search.js +2 -0
- package/dist/entities/send-attempt.d.ts +31 -0
- package/dist/entities/send-attempt.js +29 -0
- package/dist/entities/store-maintenance.d.ts +319 -0
- package/dist/entities/store-maintenance.js +145 -0
- package/dist/entities/store-records.d.ts +442 -0
- package/dist/entities/store-records.js +99 -0
- package/dist/entities/tag-change.d.ts +74 -0
- package/dist/entities/tag-change.js +31 -0
- package/dist/entities/task-pair.d.ts +31 -0
- package/dist/entities/task-pair.js +23 -0
- package/dist/entities/task-results.d.ts +524 -0
- package/dist/entities/task-results.js +142 -0
- package/dist/errors/reasons.js +3 -0
- package/dist/mcp/agent.d.ts +3 -1
- package/dist/mcp/agent.js +17 -10
- package/dist/mcp/bot/server.d.ts +2 -0
- package/dist/mcp/bot/server.js +1 -0
- package/dist/mcp/server.js +3 -1
- package/dist/mcp/tools/attachments.js +1 -0
- package/dist/meetings/cli/index.js +4 -2
- package/dist/meetings/cli/passage.js +1 -0
- package/dist/meetings/index.d.ts +2 -1
- package/dist/meetings/index.js +1 -0
- package/dist/meetings/links.d.ts +16 -0
- package/dist/meetings/read-answers.d.ts +185 -0
- package/dist/meetings/read-answers.js +213 -0
- package/dist/ports/messenger.d.ts +10 -1
- package/dist/runs/run.d.ts +10 -2
- package/dist/runs/run.js +11 -3
- package/dist/sends/guard.d.ts +1 -1
- package/dist/sends/guard.js +9 -5
- package/dist/sends/journal.d.ts +9 -2
- package/dist/sends/journal.js +9 -2
- package/dist/sends/permissions.d.ts +5 -1
- package/dist/sends/permissions.js +42 -2
- package/dist/sends/recipients.d.ts +8 -0
- package/dist/sends/recipients.js +9 -0
- package/dist/sends/upload.d.ts +4 -4
- package/dist/sends/upload.js +24 -20
- package/dist/services/admin-statistics.js +3 -3
- package/dist/services/chat-documents.d.ts +1 -0
- package/dist/services/chat-documents.js +9 -3
- package/dist/services/chats.d.ts +1 -1
- package/dist/services/chats.js +5 -2
- package/dist/services/documents/mirrors.d.ts +98 -0
- package/dist/services/documents/mirrors.js +144 -0
- package/dist/services/meeting-links.d.ts +2 -17
- package/dist/services/messages.js +1 -0
- package/dist/services/search-all-meetings.js +21 -8
- package/dist/services/task-rules.d.ts +1 -1
- package/dist/services/tasks.d.ts +2 -2
- package/dist/services/tasks.js +1 -1
- package/dist/store/exports.d.ts +1 -1
- package/dist/store/exports.js +1 -1
- package/dist/store/messages.d.ts +3 -1
- package/dist/store/messages.js +2 -2
- package/dist/store/roster.d.ts +4 -1
- package/dist/store/roster.js +2 -2
- package/dist/store/sqlite/chats.d.ts +12 -0
- package/dist/store/sqlite/chats.js +1 -0
- package/dist/store/sqlite/document-links.d.ts +1 -1
- package/dist/store/sqlite/document-links.js +5 -5
- package/dist/store/sqlite/drizzle/bun.js +3 -3
- package/dist/store/sqlite/drizzle/bun.js.map +1 -1
- package/dist/store/sqlite/drizzle/core.js +2 -2
- package/dist/store/sqlite/drizzle/core.js.map +1 -1
- package/dist/store/sqlite/drizzle/node.js +3 -3
- package/dist/store/sqlite/drizzle/node.js.map +1 -1
- package/dist/store/sqlite/drizzle/{shared-O7CTKP45.js → shared-HKXF6HKX.js} +57 -57
- package/dist/store/sqlite/drizzle/{shared-O7CTKP45.js.map → shared-HKXF6HKX.js.map} +1 -1
- package/dist/store/sqlite/involvements.js +2 -1
- package/dist/store/sqlite/roster.d.ts +2 -1
- package/dist/store/sqlite/roster.js +3 -2
- package/package.json +2 -2
- package/parity.json +14 -69
|
@@ -87,7 +87,10 @@ export const contactsCommand = (messenger) => {
|
|
|
87
87
|
: [],
|
|
88
88
|
}));
|
|
89
89
|
});
|
|
90
|
-
const contextCommand = annotate(contacts.command("context"), {
|
|
90
|
+
const contextCommand = annotate(contacts.command("context"), {
|
|
91
|
+
effects: REMOTE_READ,
|
|
92
|
+
output: { entity: "contact_context" },
|
|
93
|
+
})
|
|
91
94
|
.summary("what the local archive knows about a person")
|
|
92
95
|
.description("what the store holds about one person, in every messenger linked to them: shared chats, the last " +
|
|
93
96
|
"messages each way, their recent messages, where others mentioned them — never connects")
|
|
@@ -142,6 +145,7 @@ export const contactsCommand = (messenger) => {
|
|
|
142
145
|
});
|
|
143
146
|
annotate(contacts.command("prepare"), {
|
|
144
147
|
effects: REMOTE_READ,
|
|
148
|
+
output: { entity: "contact_preparation" },
|
|
145
149
|
examples: [`${messenger.app.command} contacts prepare Ana`],
|
|
146
150
|
})
|
|
147
151
|
.summary("what to know before you talk to someone, each item with its reference")
|
|
@@ -169,7 +173,7 @@ export const contactsCommand = (messenger) => {
|
|
|
169
173
|
meta: { ...window.meta, ...(hasMore ? { truncated: true } : {}) },
|
|
170
174
|
}));
|
|
171
175
|
});
|
|
172
|
-
annotate(contacts.command("timeline"), { effects: REMOTE_READ })
|
|
176
|
+
annotate(contacts.command("timeline"), { effects: REMOTE_READ, output: { entity: "contact_activity" } })
|
|
173
177
|
.summary("one person's activity across their linked identities")
|
|
174
178
|
.description("everything one person took part in, in every messenger linked to them — messages they wrote or were " +
|
|
175
179
|
"mentioned in, chats, mail, meetings, tasks — newest first, from the store; never connects")
|
|
@@ -211,7 +215,7 @@ export const contactsCommand = (messenger) => {
|
|
|
211
215
|
meta: { ...window.meta, ...(pending > 0 ? { truncated: true } : {}) },
|
|
212
216
|
}));
|
|
213
217
|
});
|
|
214
|
-
annotate(contacts.command("check"), { effects: REMOTE_READ })
|
|
218
|
+
annotate(contacts.command("check"), { effects: REMOTE_READ, output: { entity: "contact_check" } })
|
|
215
219
|
.summary("check a person's profile and messages for signs of abuse")
|
|
216
220
|
.description(registriesCover(messenger.provider)
|
|
217
221
|
? "whether one person looks like a bot, a fake or a spammer: their profile, what they wrote in the store, " +
|
|
@@ -239,7 +243,7 @@ export const contactsCommand = (messenger) => {
|
|
|
239
243
|
const { notes: _, ...answer } = checked;
|
|
240
244
|
renderAnswer(this, context, itemOf(snakeKeys(answer)));
|
|
241
245
|
});
|
|
242
|
-
annotate(contacts.command("link"), { effects: LOCAL_WRITE })
|
|
246
|
+
annotate(contacts.command("link"), { effects: LOCAL_WRITE, output: { entity: "linked_person" } })
|
|
243
247
|
.summary("link identities that belong to one person")
|
|
244
248
|
.description("record that two people in the store are one person — the same name is never enough")
|
|
245
249
|
.argument("<person>", "their id, @username, or part of their name")
|
|
@@ -250,7 +254,7 @@ export const contactsCommand = (messenger) => {
|
|
|
250
254
|
renderAnswer(this, context, itemOf(snakeKeys(linked)));
|
|
251
255
|
context.renderer.success(`${linked.identities.length} identities are now one person`);
|
|
252
256
|
});
|
|
253
|
-
annotate(contacts.command("unlink"), { effects: LOCAL_WRITE })
|
|
257
|
+
annotate(contacts.command("unlink"), { effects: LOCAL_WRITE, output: { entity: "linked_person" } })
|
|
254
258
|
.description("undo contacts link for one identity: it is a person of its own again")
|
|
255
259
|
.argument("<person>", "their id, @username, or part of their name; <messenger>:<person> for another messenger")
|
|
256
260
|
.action(async function (person) {
|
|
@@ -18,6 +18,7 @@ import { listQuery, pagedList, pageOf, typedQuery, withQuery } from "../list-que
|
|
|
18
18
|
import { positiveCount } from "../paging.js";
|
|
19
19
|
import { readsStdin } from "../stdin-field.js";
|
|
20
20
|
import { nextStep, rootOf, runnable, stepLine } from "../steps.js";
|
|
21
|
+
import { ANALYSIS_CONSENTS_QUERY, analysisConsentFilter } from "./analysis-consents-query.js";
|
|
21
22
|
import { answerOf as askOwner } from "./ask.js";
|
|
22
23
|
import { messengerContext, refuseLocalWrite } from "./context.js";
|
|
23
24
|
import { conversationShown, foundConversations, readinessList, refreshedAnswer } from "./conversation-answers.js";
|
|
@@ -33,7 +34,7 @@ export const conversationsCommand = (messenger) => {
|
|
|
33
34
|
const conversations = new Command("conversations")
|
|
34
35
|
.summary("group stored messages into conversations")
|
|
35
36
|
.description("the conversations inside a chat, found in the stored messages by replies, mentions and who wrote next");
|
|
36
|
-
boundOptions(reachesOtherService(annotate(conversations.command("build"), { effects: REMOTE_WRITE }))
|
|
37
|
+
boundOptions(reachesOtherService(annotate(conversations.command("build"), { output: { entity: "conversation_build" }, effects: REMOTE_WRITE }))
|
|
37
38
|
.summary("build conversation links from stored messages")
|
|
38
39
|
.description("find a chat's conversations in what the store holds, replacing the last build; without --chat, every " +
|
|
39
40
|
"chat that changed since its build and every group never built; never asks the messenger")
|
|
@@ -130,7 +131,7 @@ export const conversationsCommand = (messenger) => {
|
|
|
130
131
|
if (found.items.length === 0 && context.format === "pretty")
|
|
131
132
|
context.renderer.note("no conversations match");
|
|
132
133
|
});
|
|
133
|
-
annotate(conversations.command("show"), { effects: LOCAL_READ })
|
|
134
|
+
annotate(conversations.command("show"), { output: { entity: "conversation", view: "details" }, effects: LOCAL_READ })
|
|
134
135
|
.summary("one conversation and its messages")
|
|
135
136
|
.description("one conversation's messages, oldest first — by its id, or the one a message is in")
|
|
136
137
|
.argument("<conversation>", `a conversation id from \`conversations list\`; or ${messenger.chatArgument}, with a message`)
|
|
@@ -159,7 +160,7 @@ export const conversationsCommand = (messenger) => {
|
|
|
159
160
|
else
|
|
160
161
|
renderAnswer(this, context, conversationShown(account, { summary, messages }));
|
|
161
162
|
});
|
|
162
|
-
withModelOptions(annotate(conversations.command("related"), { effects: LOCAL_READ })
|
|
163
|
+
withModelOptions(annotate(conversations.command("related"), { output: { entity: "conversation_hit" }, effects: LOCAL_READ })
|
|
163
164
|
.summary("conversations nearest in meaning to a message's conversation")
|
|
164
165
|
.description("the conversations nearest in meaning to the one a message is in, in every built chat, best first — " +
|
|
165
166
|
"from the vectors `conversations embed` stored; runs no model")
|
|
@@ -175,7 +176,7 @@ export const conversationsCommand = (messenger) => {
|
|
|
175
176
|
if (found.hits.length === 0 && context.format === "pretty")
|
|
176
177
|
context.renderer.note(`no other conversation has vectors of ${found.model}`);
|
|
177
178
|
});
|
|
178
|
-
withModelOptions(annotate(conversations.command("status"), { effects: LOCAL_READ })
|
|
179
|
+
withModelOptions(annotate(conversations.command("status"), { output: { entity: "conversation_readiness" }, effects: LOCAL_READ })
|
|
179
180
|
.summary("which chats are ready for conversation search")
|
|
180
181
|
.description("how fresh each built chat's conversations and vectors are: messages the build has not seen, chunks " +
|
|
181
182
|
"with a current, stale or missing vector")
|
|
@@ -193,7 +194,7 @@ export const conversationsCommand = (messenger) => {
|
|
|
193
194
|
.summary("batches waiting for an agent's conversation links")
|
|
194
195
|
.description("windows of a chat for your own AI agent to link: which earlier message each one answers");
|
|
195
196
|
const sizeOption = (command) => command.option("--size <n>", `messages to answer per batch, ${BATCH_SIZE.min}–${BATCH_SIZE.max}; ${BATCH_SIZE.default} by default`, positiveCount("--size"));
|
|
196
|
-
sizeOption(annotate(batches.command("status"), { effects: LOCAL_READ })
|
|
197
|
+
sizeOption(annotate(batches.command("status"), { output: { entity: "conversation_batch_status" }, effects: LOCAL_READ })
|
|
197
198
|
.summary("progress of conversation-link batches")
|
|
198
199
|
.description("how many messages still wait for an answer, in how many batches, and how much text")
|
|
199
200
|
.requiredOption("--chat <chat>", messenger.chatArgument)).action(async function () {
|
|
@@ -203,7 +204,7 @@ export const conversationsCommand = (messenger) => {
|
|
|
203
204
|
renderAnswer(this, context, itemOf(snakeKeys(status)), () => `${status.messages} messages to answer, about ${status.batches} batches, ` +
|
|
204
205
|
`${status.characters} characters (about ${status.tokensEstimate} tokens)\n`);
|
|
205
206
|
});
|
|
206
|
-
sizeOption(annotate(batches.command("next"), { effects: LOCAL_READ })
|
|
207
|
+
sizeOption(annotate(batches.command("next"), { output: { entity: "conversation_batch" }, effects: LOCAL_READ })
|
|
207
208
|
.summary("get the next batch of messages to link")
|
|
208
209
|
.description("the next window to answer, with the messages before it; message text goes to stdout only")
|
|
209
210
|
.requiredOption("--chat <chat>", messenger.chatArgument)).action(async function () {
|
|
@@ -230,7 +231,7 @@ export const conversationsCommand = (messenger) => {
|
|
|
230
231
|
const links = conversations
|
|
231
232
|
.command("links")
|
|
232
233
|
.description("your agent's answers: which earlier message each message of a batch answers");
|
|
233
|
-
readsStdin(annotate(links.command("add"), { effects: LOCAL_WRITE }), {
|
|
234
|
+
readsStdin(annotate(links.command("add"), { output: { entity: "conversation_change" }, effects: LOCAL_WRITE }), {
|
|
234
235
|
name: "answer",
|
|
235
236
|
description: '{ "model", "skill"?, "answers": [{ "message", "parent", "confidence" }] }',
|
|
236
237
|
json: true,
|
|
@@ -247,7 +248,7 @@ export const conversationsCommand = (messenger) => {
|
|
|
247
248
|
const stored = await context.withServices((services) => services.conversations.addAnswers(batch, answer));
|
|
248
249
|
renderAnswer(this, context, itemOf(stored, { next: [nextStep("conversations.build", { args: { chat: stored.chat } })] }), () => `${stored.stored} answers stored\n`);
|
|
249
250
|
});
|
|
250
|
-
annotate(links.command("clear"), { effects: LOCAL_WRITE })
|
|
251
|
+
annotate(links.command("clear"), { output: { entity: "conversation_change" }, effects: LOCAL_WRITE })
|
|
251
252
|
.summary("remove an agent's saved conversation-link answers")
|
|
252
253
|
.description("drop your agent's answers for a chat, or only one model's; messages are never touched")
|
|
253
254
|
.requiredOption("--chat <chat>", messenger.chatArgument)
|
|
@@ -260,7 +261,7 @@ export const conversationsCommand = (messenger) => {
|
|
|
260
261
|
const cleared = await context.withServices((services) => services.conversations.clearAnswers(chat, answerModel ?? model));
|
|
261
262
|
renderAnswer(this, context, itemOf(cleared), () => `${cleared.cleared} answers dropped\n`);
|
|
262
263
|
});
|
|
263
|
-
const embed = withModelOptions(reachesOtherService(annotate(new Command("embed"), { effects: REMOTE_WRITE }))
|
|
264
|
+
const embed = withModelOptions(reachesOtherService(annotate(new Command("embed"), { output: { entity: "conversation_embedding" }, effects: REMOTE_WRITE }))
|
|
264
265
|
.summary("prepare conversation vectors for meaning search")
|
|
265
266
|
.description("compute a vector for each chunk of a chat's conversations for search by meaning — on this machine, or " +
|
|
266
267
|
"with --embedding-provider through a service and your key; resumes where it stopped; without --chat, every " +
|
|
@@ -307,7 +308,7 @@ export const conversationsCommand = (messenger) => {
|
|
|
307
308
|
next: done.skipped ? [nextStep("conversations.build", { args: { chat } })] : [],
|
|
308
309
|
}), () => `${done.embedded} chunks embedded with ${done.model}${done.skipped ? `, ${done.skipped} changed since the build` : ""}\n`);
|
|
309
310
|
});
|
|
310
|
-
withModelOptions(annotate(embed.command("status"), { effects: LOCAL_READ })
|
|
311
|
+
withModelOptions(annotate(embed.command("status"), { output: { entity: "conversation_embedding_status" }, effects: LOCAL_READ })
|
|
311
312
|
.summary("which conversation vectors are ready or stale")
|
|
312
313
|
.description("how many chunks of a chat have a vector of the model, how many are left, and what is left costs")
|
|
313
314
|
.option("--chat <chat>", messenger.chatArgument)).action(async function () {
|
|
@@ -321,7 +322,7 @@ export const conversationsCommand = (messenger) => {
|
|
|
321
322
|
(status.priceAtMost ? `, at most ${dollars(status.priceAtMost.usd)}` : "") +
|
|
322
323
|
"\n");
|
|
323
324
|
});
|
|
324
|
-
withModelOptions(destroysNothing(annotate(embed.command("clear"), { effects: LOCAL_WRITE }))
|
|
325
|
+
withModelOptions(destroysNothing(annotate(embed.command("clear"), { output: { entity: "conversation_change" }, effects: LOCAL_WRITE }))
|
|
325
326
|
.summary("remove stored conversation vectors")
|
|
326
327
|
.description("drop a chat's vectors, or only one model's; messages and conversations are never touched")
|
|
327
328
|
.option("--chat <chat>", messenger.chatArgument)).action(async function () {
|
|
@@ -338,6 +339,7 @@ export const conversationsCommand = (messenger) => {
|
|
|
338
339
|
renderAnswer(this, context, itemOf(cleared), () => `${cleared.cleared} vectors dropped\n`);
|
|
339
340
|
});
|
|
340
341
|
boundOptions(destroysNothing(annotate(conversations.command("rebuild"), {
|
|
342
|
+
output: { entity: "conversation_preparation" },
|
|
341
343
|
effects: LOCAL_WRITE,
|
|
342
344
|
examples: [`${messenger.app.command} conversations rebuild --max-chats 5`],
|
|
343
345
|
}))
|
|
@@ -359,18 +361,19 @@ export const conversationsCommand = (messenger) => {
|
|
|
359
361
|
const consents = conversations
|
|
360
362
|
.command("consents")
|
|
361
363
|
.description("remembered analysis permissions for this account's chats and provider endpoints");
|
|
362
|
-
annotate(consents.command("list"), { effects: LOCAL_READ })
|
|
364
|
+
withQuery(annotate(consents.command("list"), { effects: LOCAL_READ }), ANALYSIS_CONSENTS_QUERY)
|
|
363
365
|
.description("which chats and provider endpoints you allowed to analyse, and when")
|
|
364
|
-
.action(async function () {
|
|
366
|
+
.action(async function (words) {
|
|
367
|
+
const filter = analysisConsentFilter(words);
|
|
365
368
|
const context = messengerContext(this, messenger);
|
|
366
|
-
const items = await context.withStore((store, account) => analysisConsents(store, account).list());
|
|
369
|
+
const items = await context.withStore((store, account) => analysisConsents(store, account).list(filter));
|
|
367
370
|
renderAnswer(this, context, listOf("conversations consents list", {
|
|
368
371
|
items: items.map(snakeKeys),
|
|
369
372
|
limit: Math.max(1, items.length),
|
|
370
373
|
has_more: false,
|
|
371
374
|
}));
|
|
372
375
|
});
|
|
373
|
-
annotate(consents.command("revoke"), { effects: LOCAL_WRITE })
|
|
376
|
+
annotate(consents.command("revoke"), { effects: LOCAL_WRITE, output: { entity: "analysis_consent_revocation" } })
|
|
374
377
|
.description("forget analysis permissions so the next analysis asks again")
|
|
375
378
|
.option("--chat <chat>", "revoke only this chat's consents; defaults to every chat")
|
|
376
379
|
.addOption(new Option("--consent-provider <identity>", "exact provider identity from consents list; defaults to every provider").conflicts("provider"))
|
|
@@ -505,6 +508,7 @@ const answerOf = (text) => {
|
|
|
505
508
|
};
|
|
506
509
|
/** `messages links`: why a message sits where it does in its conversation. */
|
|
507
510
|
export const linksCommand = (messenger) => annotate(new Command("links"), {
|
|
511
|
+
output: { entity: "message_links" },
|
|
508
512
|
examples: [`${messenger.app.command} personal messages links "Book club" 101`],
|
|
509
513
|
effects: LOCAL_READ,
|
|
510
514
|
})
|
|
@@ -540,7 +544,7 @@ const readinessLine = ({ chat, state, graph, pending, vectors }, model) => graph
|
|
|
540
544
|
`${pending.deleted} deleted · ${model}: ${vectors.current} current, ${vectors.stale} stale, ` +
|
|
541
545
|
`${vectors.missing} missing of ${vectors.chunks} chunks`;
|
|
542
546
|
/** `search conversations`: the conversations nearest to a query, in meaning and in words. */
|
|
543
|
-
export const conversationsSearchCommand = (messenger) => syncOptions(boundOptions(withModelOptions(reachesOtherService(annotate(new Command("conversations"), { effects: REMOTE_READ })))), messenger)
|
|
547
|
+
export const conversationsSearchCommand = (messenger) => syncOptions(boundOptions(withModelOptions(reachesOtherService(annotate(new Command("conversations"), { output: { entity: "conversation_hit" }, effects: REMOTE_READ })))), messenger)
|
|
544
548
|
.summary("find conversations by words and meaning")
|
|
545
549
|
.description("the conversations nearest to a query in meaning and in words, best first, in one chat or every one — " +
|
|
546
550
|
"meaning after `conversations embed`; runs on this machine")
|
|
@@ -74,7 +74,10 @@ const reportCommand = (messenger) => {
|
|
|
74
74
|
`About a given run: ${create} --run <id> (ids: ${lineOf(this, "runs list")})`,
|
|
75
75
|
].join("\n"));
|
|
76
76
|
});
|
|
77
|
-
destroysNothing(annotate(report.command("create"), {
|
|
77
|
+
destroysNothing(annotate(report.command("create"), {
|
|
78
|
+
effects: LOCAL_WRITE,
|
|
79
|
+
examples: [`${app.command} personal doctor report create --output ./problem-report.json`],
|
|
80
|
+
}))
|
|
78
81
|
.description("write a problem report to a file, and say where to send it")
|
|
79
82
|
.option("--run <id>", "the run the report is about; the newest failed one if not given")
|
|
80
83
|
.option("--output <file>", "where to write it; a new file in this directory if not given")
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { queryFieldsOf } from "@wirecat/cli-base/query";
|
|
2
|
+
import { documentLink } from "../../entities/index.js";
|
|
3
|
+
export const DOCUMENT_LINKS_QUERY = {
|
|
4
|
+
entity: "document_link",
|
|
5
|
+
backend: "native",
|
|
6
|
+
fields: queryFieldsOf(documentLink, { native: ["ref"], examples: { ref: 'ref:"msg:chat/500/7/1"' } }).map((field) => field.native
|
|
7
|
+
? { ...field, operators: field.operators.filter((operator) => operator === "term" || operator === "phrase") }
|
|
8
|
+
: field),
|
|
9
|
+
};
|
|
@@ -18,6 +18,7 @@ import { messengerContext, refuseLocalWrite } from "./context.js";
|
|
|
18
18
|
import { stopOnSignal } from "./patience.js";
|
|
19
19
|
/** `messages download`: every file of one message, or with `--all` of a whole chat, never over a file already there. */
|
|
20
20
|
export const downloadSubcommand = (messages, messenger) => annotate(messages.command("download"), {
|
|
21
|
+
output: { entity: "message_download" },
|
|
21
22
|
examples: [`${messenger.app.command} personal messages download "Book club" 101 --output-dir ./downloads`],
|
|
22
23
|
effects: FETCH,
|
|
23
24
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { type Messenger } from "./context.js";
|
|
3
3
|
/**
|
|
4
|
-
* The owner's way out of a remembered wait or a hold on writes, once they know it is over.
|
|
5
|
-
*
|
|
4
|
+
* The owner's way out of a remembered wait or a hold on writes, once they know it is over. An agent gets it only
|
|
5
|
+
* under `mcp.authority`: one that could lift a hold would send straight into a spam limit again.
|
|
6
6
|
*/
|
|
7
7
|
export declare const floodCommand: (messenger: Messenger) => Command;
|
|
@@ -6,13 +6,13 @@ import { grantsAuthority, LOCAL_WRITE } from "../effects.js";
|
|
|
6
6
|
import { itemOf, renderAnswer, snakeKeys } from "../envelope.js";
|
|
7
7
|
import { messengerContext } from "./context.js";
|
|
8
8
|
/**
|
|
9
|
-
* The owner's way out of a remembered wait or a hold on writes, once they know it is over.
|
|
10
|
-
*
|
|
9
|
+
* The owner's way out of a remembered wait or a hold on writes, once they know it is over. An agent gets it only
|
|
10
|
+
* under `mcp.authority`: one that could lift a hold would send straight into a spam limit again.
|
|
11
11
|
*/
|
|
12
12
|
export const floodCommand = (messenger) => {
|
|
13
13
|
const { app } = messenger;
|
|
14
14
|
const name = messenger.name ?? app.command;
|
|
15
|
-
return
|
|
15
|
+
return new Command("flood")
|
|
16
16
|
.description(`the waits ${name} asked this profile to keep, and a hold on its writes`)
|
|
17
17
|
.addCommand(grantsAuthority(annotate(new Command("clear"), { effects: LOCAL_WRITE, examples: [`${app.command} personal flood clear`] }))
|
|
18
18
|
.summary("clear a profile's stored rate-limit hold")
|
|
@@ -21,7 +21,7 @@ const count = (value) => {
|
|
|
21
21
|
};
|
|
22
22
|
export const gapsCommand = (messenger) => {
|
|
23
23
|
const group = new Command("gaps").description("inspect recorded interior coverage gaps and explicitly fetch them");
|
|
24
|
-
annotate(group.command("plan"), { effects: LOCAL_READ })
|
|
24
|
+
annotate(group.command("plan"), { output: { entity: "store_gap_plan" }, effects: LOCAL_READ })
|
|
25
25
|
.description("local coverage plan; missing message ids alone do not imply missing history")
|
|
26
26
|
.argument("<chat>", messenger.chatArgument)
|
|
27
27
|
.action(async function (chat) {
|
|
@@ -29,7 +29,7 @@ export const gapsCommand = (messenger) => {
|
|
|
29
29
|
renderAnswer(this, context, itemOf(snakeKeys(await context.withServices((services) => services.gaps.plan(chat)))));
|
|
30
30
|
});
|
|
31
31
|
const fetching = messenger.fetching ?? FETCHING;
|
|
32
|
-
annotate(group.command("repair"), { effects: FETCH })
|
|
32
|
+
annotate(group.command("repair"), { output: { entity: "store_gap_repair" }, effects: FETCH })
|
|
33
33
|
.description("fetch bounded interior gaps and recheck coverage; never delete unseen messages")
|
|
34
34
|
.argument("<chat>", messenger.chatArgument)
|
|
35
35
|
.option("--limit <n>", "total messages in this repair, 500 by default", count)
|
|
@@ -5,10 +5,12 @@ import { SendJournal, sendsPathFor } from "../../sends/journal.js";
|
|
|
5
5
|
import { RecipientList, recipientsPathFor } from "../../sends/recipients.js";
|
|
6
6
|
import { FETCH, grantsAuthority, LOCAL_READ, LOCAL_WRITE } from "../effects.js";
|
|
7
7
|
import { itemOf, renderAnswer, snakeKeys } from "../envelope.js";
|
|
8
|
-
import { pagedList } from "../list-query.js";
|
|
8
|
+
import { pagedList, typedQuery, withQuery } from "../list-query.js";
|
|
9
9
|
import { withPaging } from "../paging.js";
|
|
10
10
|
import { wholeList } from "./chat-answers.js";
|
|
11
11
|
import { messengerContext } from "./context.js";
|
|
12
|
+
import { RECIPIENTS_QUERY, recipientFilter } from "./recipients-query.js";
|
|
13
|
+
import { SENDS_QUERY, sendFilter } from "./sends-query.js";
|
|
12
14
|
/**
|
|
13
15
|
* The chats this profile may send to. Off until the first `add`; `clear` deletes it, which turns it off again. It stops
|
|
14
16
|
* a model that a message talked into writing somewhere, not an agent set on getting around it.
|
|
@@ -17,19 +19,26 @@ export const recipientsCommand = (messenger) => {
|
|
|
17
19
|
const tool = `${messenger.app.command} personal`;
|
|
18
20
|
const listFor = (profile, env) => new RecipientList(recipientsPathFor(messenger.app, profile, env), messenger.app.command);
|
|
19
21
|
const command = new Command("recipients").description("the chats this profile may send to, when the list is on");
|
|
20
|
-
annotate(command.command("list"), {
|
|
22
|
+
withQuery(annotate(command.command("list"), { examples: [`${tool} recipients list`], effects: LOCAL_READ }), RECIPIENTS_QUERY)
|
|
21
23
|
.description("the chats on the list; empty and off until the first add")
|
|
22
|
-
.action(async function () {
|
|
24
|
+
.action(async function (words) {
|
|
25
|
+
const filter = recipientFilter(words);
|
|
23
26
|
const context = messengerContext(this, messenger);
|
|
24
27
|
const { settings, renderer, env } = context;
|
|
25
|
-
const
|
|
26
|
-
renderAnswer(this, context, wholeList("recipients list",
|
|
27
|
-
if (
|
|
28
|
+
const found = listFor(settings.profile, env).list(filter);
|
|
29
|
+
renderAnswer(this, context, wholeList("recipients list", found.items.map(snakeKeys)));
|
|
30
|
+
if (found.state === "off")
|
|
28
31
|
renderer.note("the recipient list is off — this profile may send to any chat");
|
|
29
|
-
else if (
|
|
32
|
+
else if (found.state === "empty")
|
|
30
33
|
renderer.note("the recipient list is on and empty — this profile may send nowhere");
|
|
34
|
+
else if (found.items.length === 0)
|
|
35
|
+
renderer.note("no recipients match the query");
|
|
31
36
|
});
|
|
32
|
-
grantsAuthority(annotate(command.command("add"), {
|
|
37
|
+
grantsAuthority(annotate(command.command("add"), {
|
|
38
|
+
examples: [`${tool} recipients add "Book club"`],
|
|
39
|
+
effects: FETCH,
|
|
40
|
+
output: { entity: "recipient_change", view: "added" },
|
|
41
|
+
}))
|
|
33
42
|
.argument("<chat>", messenger.chatArgument)
|
|
34
43
|
.description("allow sending to this chat; the first add turns the list on")
|
|
35
44
|
.action(async function (chat) {
|
|
@@ -44,7 +53,11 @@ export const recipientsCommand = (messenger) => {
|
|
|
44
53
|
});
|
|
45
54
|
renderAnswer(this, context, itemOf({ id: found.id, title: found.title, added }));
|
|
46
55
|
});
|
|
47
|
-
grantsAuthority(annotate(command.command("remove"), {
|
|
56
|
+
grantsAuthority(annotate(command.command("remove"), {
|
|
57
|
+
examples: [`${tool} recipients remove "Book club"`],
|
|
58
|
+
effects: LOCAL_WRITE,
|
|
59
|
+
output: { entity: "recipient_change", view: "removed" },
|
|
60
|
+
}))
|
|
48
61
|
.argument("<chat>", "chat id, or the title as the list shows it")
|
|
49
62
|
.description("stop allowing this chat; the list stays on")
|
|
50
63
|
.action(async function (chat) {
|
|
@@ -55,7 +68,11 @@ export const recipientsCommand = (messenger) => {
|
|
|
55
68
|
throw new CliError("not_found", `${chat.trim()} is not on the recipient list of ${settings.profile}`);
|
|
56
69
|
renderAnswer(this, context, itemOf({ id: gone.id, title: gone.title, removed: true }));
|
|
57
70
|
});
|
|
58
|
-
grantsAuthority(annotate(command.command("clear"), {
|
|
71
|
+
grantsAuthority(annotate(command.command("clear"), {
|
|
72
|
+
examples: [`${tool} recipients clear`],
|
|
73
|
+
effects: LOCAL_WRITE,
|
|
74
|
+
output: { entity: "recipient_change", view: "off" },
|
|
75
|
+
}))
|
|
59
76
|
.description("delete the list, which turns it off: this profile may send to any chat again")
|
|
60
77
|
.action(async function () {
|
|
61
78
|
const context = messengerContext(this, messenger);
|
|
@@ -65,16 +82,21 @@ export const recipientsCommand = (messenger) => {
|
|
|
65
82
|
return command;
|
|
66
83
|
};
|
|
67
84
|
/** Every attempt to send from this profile, kept whatever `--record` says. Never the text. */
|
|
68
|
-
export const sendsCommand = (messenger) => new Command("sends").description("every attempt to send from this profile — never the text").addCommand(withPaging(annotate(new Command("list"), {
|
|
85
|
+
export const sendsCommand = (messenger) => new Command("sends").description("every attempt to send from this profile — never the text").addCommand(withQuery(withPaging(annotate(new Command("list"), {
|
|
86
|
+
effects: LOCAL_READ,
|
|
87
|
+
examples: [`${messenger.app.command} personal sends list --limit 10`],
|
|
88
|
+
}).description("attempts to send, newest first: sent, refused, failed, or not known")), SENDS_QUERY).action(async function (words) {
|
|
89
|
+
const filter = sendFilter(words);
|
|
69
90
|
const context = messengerContext(this, messenger);
|
|
70
91
|
const { settings, renderer, env } = context;
|
|
71
|
-
const entries = new SendJournal(sendsPathFor(messenger.app, settings.profile, env)).entries().reverse();
|
|
92
|
+
const entries = new SendJournal(sendsPathFor(messenger.app, settings.profile, env)).entries(filter).reverse();
|
|
72
93
|
const from = settings.all ? 0 : (settings.page - 1) * settings.limit;
|
|
73
94
|
const shown = settings.all ? entries : entries.slice(from, from + settings.limit);
|
|
74
95
|
renderAnswer(this, context, pagedList("sends list", settings, {
|
|
75
96
|
items: shown.map(snakeKeys),
|
|
97
|
+
args: words.length ? { query: typedQuery(words) } : {},
|
|
76
98
|
has_more: from + shown.length < entries.length,
|
|
77
99
|
}));
|
|
78
100
|
if (entries.length === 0)
|
|
79
|
-
renderer.note(`profile ${settings.profile} has not tried to send anything`);
|
|
101
|
+
renderer.note(filter ? "no send attempts match the query" : `profile ${settings.profile} has not tried to send anything`);
|
|
80
102
|
}));
|
|
@@ -13,6 +13,7 @@ const DEFAULT_LIMIT = 100;
|
|
|
13
13
|
export const imagesCommand = (messenger) => {
|
|
14
14
|
const images = new Command("images").description("search pictures by what they show, with a model on this machine");
|
|
15
15
|
annotate(images.command("embed"), {
|
|
16
|
+
output: { entity: "image_embedding" },
|
|
16
17
|
effects: FETCH,
|
|
17
18
|
offline: false,
|
|
18
19
|
examples: [`${messenger.app.command} images embed`, `${messenger.app.command} images embed --limit 500`],
|
|
@@ -13,6 +13,7 @@ import { addMediaArchiveTimers } from "./media-archive-timer-command.js";
|
|
|
13
13
|
import { stopOnSignal } from "./patience.js";
|
|
14
14
|
export const addMediaArchiveCommands = (archive, messenger) => {
|
|
15
15
|
annotate(archive.command("download"), {
|
|
16
|
+
output: { entity: "media_archive" },
|
|
16
17
|
effects: FETCH,
|
|
17
18
|
examples: [`${messenger.app.command} attachments download ./media-archive`],
|
|
18
19
|
})
|
|
@@ -54,6 +55,7 @@ export const addMediaArchiveCommands = (archive, messenger) => {
|
|
|
54
55
|
}
|
|
55
56
|
});
|
|
56
57
|
annotate(archive.command("check"), {
|
|
58
|
+
output: { entity: "media_archive_check" },
|
|
57
59
|
effects: LOCAL_READ,
|
|
58
60
|
examples: [`${messenger.app.command} attachments check ./media-archive`],
|
|
59
61
|
})
|
|
@@ -8,6 +8,7 @@ import { itemOf, renderAnswer, snakeKeys } from "../envelope.js";
|
|
|
8
8
|
import { messengerContext, refuseLocalWrite } from "./context.js";
|
|
9
9
|
export const addMediaArchiveMove = (attachments, messenger) => {
|
|
10
10
|
annotate(attachments.command("move"), {
|
|
11
|
+
output: { entity: "media_archive_move" },
|
|
11
12
|
effects: LOCAL_WRITE,
|
|
12
13
|
examples: [
|
|
13
14
|
`${messenger.app.command} attachments move ./media-archive ./older-images --before-time 2026-10-01T00:00:00Z --dry-run`,
|
|
@@ -14,8 +14,8 @@ export const addMediaArchiveTimers = (attachments, messenger) => {
|
|
|
14
14
|
const archive = attachments.command("jobs").description("daily media archive timers for this profile");
|
|
15
15
|
for (const action of ["install", "start", "stop", "status", "uninstall"]) {
|
|
16
16
|
const command = annotate(archive.command(action), {
|
|
17
|
+
output: { entity: "media_archive_timer" },
|
|
17
18
|
effects: action === "status" ? LOCAL_READ : LOCAL_WRITE,
|
|
18
|
-
...(action === "status" ? {} : { mcp: false }),
|
|
19
19
|
examples: [`${messenger.app.command} attachments jobs ${action} ./media-archive`],
|
|
20
20
|
})
|
|
21
21
|
.description({
|
|
@@ -16,6 +16,7 @@ export const mentionsCommand = (messenger) => {
|
|
|
16
16
|
const tool = messenger.app.command;
|
|
17
17
|
const mentions = new Command("mentions").description("phones, e-mail, links, documents, names and addresses in stored messages");
|
|
18
18
|
annotate(mentions.command("list"), {
|
|
19
|
+
output: { entity: "mention" },
|
|
19
20
|
effects: LOCAL_READ,
|
|
20
21
|
query: MENTION_QUERY,
|
|
21
22
|
examples: [
|
|
@@ -55,6 +56,7 @@ export const mentionsCommand = (messenger) => {
|
|
|
55
56
|
context.renderer.note("more remain — a larger --limit shows them all and moves the --new point");
|
|
56
57
|
});
|
|
57
58
|
annotate(mentions.command("domains"), {
|
|
59
|
+
output: { entity: "mention_domain" },
|
|
58
60
|
effects: LOCAL_READ,
|
|
59
61
|
query: MENTION_QUERY,
|
|
60
62
|
examples: [`${tool} mentions domains`, `${tool} mentions domains status:found`],
|
|
@@ -77,7 +79,11 @@ export const mentionsCommand = (messenger) => {
|
|
|
77
79
|
`${firstAt.slice(0, 10)}…${lastAt.slice(0, 10)}\n`)
|
|
78
80
|
.join(""));
|
|
79
81
|
});
|
|
80
|
-
annotate(mentions.command("places"), {
|
|
82
|
+
annotate(mentions.command("places"), {
|
|
83
|
+
output: { entity: "place" },
|
|
84
|
+
effects: LOCAL_READ,
|
|
85
|
+
examples: [`${tool} mentions places`],
|
|
86
|
+
})
|
|
81
87
|
.summary("confirmed street addresses, most mentioned first")
|
|
82
88
|
.description("confirmed addresses, in every account, most mentioned first; `mentions confirm <id>` adds one")
|
|
83
89
|
.option("--limit <n>", "how many to show", positiveCount("--limit"))
|
|
@@ -90,7 +96,11 @@ export const mentionsCommand = (messenger) => {
|
|
|
90
96
|
has_more: places.hasMore,
|
|
91
97
|
}), () => places.items.map(({ id, address, mentions }) => `${id} ${address} ${mentions} mentioned\n`).join(""));
|
|
92
98
|
});
|
|
93
|
-
annotate(mentions.command("show"), {
|
|
99
|
+
annotate(mentions.command("show"), {
|
|
100
|
+
output: { entity: "mention", view: "details" },
|
|
101
|
+
effects: LOCAL_READ,
|
|
102
|
+
examples: [`${tool} mentions show 12`],
|
|
103
|
+
})
|
|
94
104
|
.description("one mention, the text around it, and how many other places hold its value")
|
|
95
105
|
.argument("<id>", "the mention's id, from mentions list", positiveCount("<id>"))
|
|
96
106
|
.action(async function (id) {
|
|
@@ -101,6 +111,7 @@ export const mentionsCommand = (messenger) => {
|
|
|
101
111
|
(found.candidates.length > 0 ? `may be ${found.candidates.join(", ")}\n` : ""));
|
|
102
112
|
});
|
|
103
113
|
annotate(mentions.command("confirm"), {
|
|
114
|
+
output: { entity: "mention_decision" },
|
|
104
115
|
effects: LOCAL_WRITE,
|
|
105
116
|
examples: [
|
|
106
117
|
`${tool} mentions confirm 12 person:7`,
|
|
@@ -123,6 +134,7 @@ export const mentionsCommand = (messenger) => {
|
|
|
123
134
|
renderAnswer(this, context, itemOf(snakeKeys(decided)));
|
|
124
135
|
});
|
|
125
136
|
annotate(mentions.command("reject"), {
|
|
137
|
+
output: { entity: "mention_decision" },
|
|
126
138
|
effects: LOCAL_WRITE,
|
|
127
139
|
examples: [`${tool} mentions reject 12`],
|
|
128
140
|
})
|
|
@@ -140,6 +152,7 @@ export const mentionsCommand = (messenger) => {
|
|
|
140
152
|
renderAnswer(this, context, itemOf(snakeKeys(decided)));
|
|
141
153
|
});
|
|
142
154
|
destroysNothing(annotate(mentions.command("rebuild"), {
|
|
155
|
+
output: { entity: "mention_rebuild" },
|
|
143
156
|
effects: LOCAL_WRITE,
|
|
144
157
|
examples: [`${tool} mentions rebuild`, `${tool} mentions rebuild person-name`],
|
|
145
158
|
}))
|