@wirecat/cli-core 0.419.0 → 0.421.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 +48 -0
- package/dist/cli/bot/context.d.ts +3 -2
- package/dist/cli/bot/context.js +15 -0
- package/dist/cli/config-command.js +1 -2
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +0 -1
- package/dist/cli/messenger/context.js +3 -6
- package/dist/cli/permission-keys.d.ts +2 -0
- package/dist/cli/permission-keys.js +10 -3
- package/dist/cli/preview.d.ts +2 -2
- package/dist/cli/preview.js +4 -3
- package/dist/cli/program.js +4 -8
- package/dist/cli/settings.d.ts +0 -2
- package/dist/cli/settings.js +1 -5
- package/dist/domain/providers.d.ts +20 -2
- package/dist/domain/providers.js +23 -3
- package/dist/domain/tag-consolidation.d.ts +30 -1
- package/dist/entities/index.d.ts +4 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/surface.js +0 -4
- package/dist/mcp/tool.d.ts +1 -3
- package/dist/mcp/tool.js +1 -2
- package/dist/meetings/calendar-text.d.ts +13 -0
- package/dist/meetings/calendar-text.js +57 -0
- package/dist/meetings/event-store.d.ts +202 -0
- package/dist/meetings/event-store.js +1 -0
- package/dist/meetings/events.js +5 -1
- package/dist/meetings/index.d.ts +3 -0
- package/dist/meetings/index.js +2 -0
- package/dist/meetings/join-key.d.ts +7 -0
- package/dist/meetings/join-key.js +38 -0
- package/dist/meetings/mcp/index.d.ts +15 -15
- package/dist/meetings/model.d.ts +8 -2
- package/dist/meetings/read-answers.d.ts +6 -2
- package/dist/meetings/read-answers.js +9 -2
- package/dist/meetings/store.d.ts +2 -0
- package/dist/meetings/testing/event-store-contract.d.ts +10 -0
- package/dist/meetings/testing/event-store-contract.js +161 -0
- package/dist/meetings/testing/index.d.ts +1 -0
- package/dist/meetings/testing/index.js +1 -0
- package/dist/parity/manifest.js +0 -4
- package/dist/search/account-list.js +39 -7
- package/dist/sends/index.d.ts +1 -1
- package/dist/sends/index.js +1 -1
- package/dist/sends/permissions.d.ts +0 -13
- package/dist/sends/permissions.js +15 -142
- package/dist/services/agenda.js +5 -5
- package/dist/services/document-source.d.ts +7 -3
- package/dist/services/document-source.js +24 -12
- package/dist/services/documents/ingestion.d.ts +6 -1
- package/dist/services/documents/ingestion.js +4 -0
- package/dist/services/notes-search.js +3 -2
- package/dist/services/search-all.js +1 -0
- package/dist/services/task-tag-filters.d.ts +3 -0
- package/dist/services/task-tag-filters.js +8 -0
- package/dist/services/tasks.js +5 -9
- package/dist/store/document-transfer/index.js +12 -2
- package/dist/store/index.d.ts +2 -1
- package/dist/store/sqlite/accounts.js +1 -0
- package/dist/store/sqlite/calendar.d.ts +3 -0
- package/dist/store/sqlite/calendar.js +593 -0
- package/dist/store/sqlite/catalog.js +16 -5
- package/dist/store/sqlite/chat-rekey.js +1 -1
- package/dist/store/sqlite/chats.js +2 -2
- package/dist/store/sqlite/context-document-source.js +8 -4
- package/dist/store/sqlite/document-transfer/apply.js +24 -2
- package/dist/store/sqlite/document-transfer/collection.d.ts +19 -0
- package/dist/store/sqlite/document-transfer/collection.js +66 -0
- package/dist/store/sqlite/document-transfer/plan.js +15 -8
- package/dist/store/sqlite/document-transfer/snapshot.js +12 -7
- package/dist/store/sqlite/entity-types.d.ts +5 -1
- package/dist/store/sqlite/entity-types.js +5 -1
- package/dist/store/sqlite/events.d.ts +8 -2
- package/dist/store/sqlite/events.js +36 -12
- package/dist/store/sqlite/files.d.ts +93 -0
- package/dist/store/sqlite/files.js +293 -0
- package/dist/store/sqlite/folded.d.ts +3 -0
- package/dist/store/sqlite/folded.js +1 -0
- package/dist/store/sqlite/imported-documents.js +1 -1
- package/dist/store/sqlite/join-keys.d.ts +8 -0
- package/dist/store/sqlite/join-keys.js +27 -0
- package/dist/store/sqlite/knowledge.js +6 -6
- package/dist/store/sqlite/link-reviews.d.ts +9 -0
- package/dist/store/sqlite/link-reviews.js +12 -0
- package/dist/store/sqlite/lucene-fields.js +8 -6
- package/dist/store/sqlite/manifest.js +11 -0
- package/dist/store/sqlite/meeting-selection.js +1 -1
- package/dist/store/sqlite/meetings.js +6 -1
- package/dist/store/sqlite/migrations.generated.js +143 -0
- package/dist/store/sqlite/note-index.d.ts +8 -1
- package/dist/store/sqlite/note-index.js +14 -0
- package/dist/store/sqlite/note-search.js +6 -5
- package/dist/store/sqlite/notes.d.ts +18 -1
- package/dist/store/sqlite/notes.js +237 -40
- package/dist/store/sqlite/open-store.js +4 -0
- package/dist/store/sqlite/person-links.js +7 -2
- package/dist/store/sqlite/schema/canonical-tags.d.ts +87 -0
- package/dist/store/sqlite/schema/canonical-tags.js +8 -0
- package/dist/store/sqlite/schema/tag-consolidations.d.ts +270 -0
- package/dist/store/sqlite/schema/tag-consolidations.js +34 -0
- package/dist/store/sqlite/schema.d.ts +3589 -1634
- package/dist/store/sqlite/schema.js +191 -13
- package/dist/store/sqlite/tag-consolidation-apply.d.ts +3 -0
- package/dist/store/sqlite/tag-consolidation-apply.js +88 -0
- package/dist/store/sqlite/tag-consolidation-input.d.ts +16 -0
- package/dist/store/sqlite/tag-consolidation-input.js +52 -0
- package/dist/store/sqlite/tag-consolidation.js +51 -66
- package/dist/store/sqlite/tag-creation.js +17 -8
- package/dist/store/sqlite/tag-resolution.d.ts +5 -0
- package/dist/store/sqlite/tag-resolution.js +33 -0
- package/dist/store/sqlite/tags.d.ts +3 -1
- package/dist/store/sqlite/tags.js +70 -50
- package/dist/store/sqlite/tasks.d.ts +2 -0
- package/dist/store/sqlite/tasks.js +6 -1
- package/dist/store/sqlite/things.js +2 -1
- package/dist/store/sqlite/vocabulary.d.ts +1 -0
- package/dist/store/sqlite/vocabulary.js +30 -8
- package/dist/store/store.d.ts +6 -0
- package/dist/store/store.js +10 -0
- package/dist/store/tags.js +2 -2
- package/package.json +2 -1
- package/dist/cli/moved.d.ts +0 -18
- package/dist/cli/moved.js +0 -72
- package/dist/sends/permission-aliases.d.ts +0 -5
- package/dist/sends/permission-aliases.js +0 -50
package/dist/cli/moved.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-base";
|
|
2
|
-
import type { Command } from "commander";
|
|
3
|
-
/**
|
|
4
|
-
* Commands a source tool no longer has, each with the memo command that does the job
|
|
5
|
-
* (docs/dev/TOOL-BOUNDARIES.md). The CLI and the MCP server answer with the pointer instead of
|
|
6
|
-
* "unknown command"; a path the program still mounts never reaches it.
|
|
7
|
-
*/
|
|
8
|
-
export declare const MOVED_TO_MEMO: Readonly<Record<string, {
|
|
9
|
-
what: string;
|
|
10
|
-
memo: string;
|
|
11
|
-
}>>;
|
|
12
|
-
/** Retired spellings are guidance only; none is mounted as a command alias. */
|
|
13
|
-
export declare const RENAMED_COMMANDS: Readonly<Record<string, string>>;
|
|
14
|
-
export declare const movedPointer: (path: string) => string | undefined;
|
|
15
|
-
/** The longest moved path the words start with, unless the program still has it. */
|
|
16
|
-
export declare const movedPath: (words: readonly string[], has: (path: string) => boolean) => string | undefined;
|
|
17
|
-
/** The pointer for a moved or renamed path in `args`, for a CLI that parses without `run`. */
|
|
18
|
-
export declare const movedCommandError: (program: Command, args: readonly string[]) => CliError | undefined;
|
package/dist/cli/moved.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-base";
|
|
2
|
-
import { commandAt } from "./steps.js";
|
|
3
|
-
/**
|
|
4
|
-
* Commands a source tool no longer has, each with the memo command that does the job
|
|
5
|
-
* (docs/dev/TOOL-BOUNDARIES.md). The CLI and the MCP server answer with the pointer instead of
|
|
6
|
-
* "unknown command"; a path the program still mounts never reaches it.
|
|
7
|
-
*/
|
|
8
|
-
export const MOVED_TO_MEMO = {
|
|
9
|
-
"search mail": { what: "mail is searched by the separate memo CLI", memo: "memo search mail …" },
|
|
10
|
-
};
|
|
11
|
-
/** Retired spellings are guidance only; none is mounted as a command alias. */
|
|
12
|
-
export const RENAMED_COMMANDS = {
|
|
13
|
-
"contacts alias rm": "contacts aliases remove",
|
|
14
|
-
"contacts alias": "contacts aliases",
|
|
15
|
-
"contacts profile": "contacts info",
|
|
16
|
-
"contacts timeline": "contacts events",
|
|
17
|
-
"chats link revoke": "chats links remove",
|
|
18
|
-
"chats link": "chats links",
|
|
19
|
-
"chats members audit": "chats members check",
|
|
20
|
-
"chats requests accept": "chats requests confirm",
|
|
21
|
-
"chats requests decline": "chats requests reject",
|
|
22
|
-
"metadata get": "metadata show",
|
|
23
|
-
"metadata refresh": "metadata sync",
|
|
24
|
-
"tasks plan": "tasks update",
|
|
25
|
-
"tags auto": "tags rebuild",
|
|
26
|
-
"attachments text set": "attachments update",
|
|
27
|
-
"conversations build": "conversations links rebuild",
|
|
28
|
-
"conversations embed status": "conversations embeddings status",
|
|
29
|
-
"conversations embed clear": "conversations embeddings clear",
|
|
30
|
-
"conversations batches next": "conversations batches show",
|
|
31
|
-
"conversations consents revoke": "conversations consents remove",
|
|
32
|
-
"doctor report create": "doctor reports create",
|
|
33
|
-
"doctor report": "doctor reports show",
|
|
34
|
-
"mcp setup": "mcp add",
|
|
35
|
-
"mcp doctor": "mcp check",
|
|
36
|
-
"commands schema": "commands info",
|
|
37
|
-
"bot store fetch": "bot messages sync",
|
|
38
|
-
"store gaps plan": "store gaps show",
|
|
39
|
-
"store reindex": "store rebuild",
|
|
40
|
-
"stats messages counters refresh": "stats messages counters sync",
|
|
41
|
-
"models text key": "models keys",
|
|
42
|
-
"models audio list": "models list kind:audio",
|
|
43
|
-
"models text list": "models list kind:text",
|
|
44
|
-
"models audio download": "models download",
|
|
45
|
-
"models text download": "models download",
|
|
46
|
-
};
|
|
47
|
-
export const movedPointer = (path) => {
|
|
48
|
-
const renamed = RENAMED_COMMANDS[path];
|
|
49
|
-
if (renamed)
|
|
50
|
-
return `use \`${renamed}\``;
|
|
51
|
-
const moved = MOVED_TO_MEMO[path];
|
|
52
|
-
return moved && `${moved.what}: install @wirecat/cli-memo, then \`${moved.memo}\``;
|
|
53
|
-
};
|
|
54
|
-
/** The longest moved path the words start with, unless the program still has it. */
|
|
55
|
-
export const movedPath = (words, has) => [...Object.keys(MOVED_TO_MEMO), ...Object.keys(RENAMED_COMMANDS)]
|
|
56
|
-
.filter((path) => path.split(" ").every((word, at) => words[at] === word))
|
|
57
|
-
.sort((a, b) => b.length - a.length)
|
|
58
|
-
.find((path) => !has(path));
|
|
59
|
-
const mountedOrArgument = (program, path) => {
|
|
60
|
-
const words = path.split(" ");
|
|
61
|
-
return words.some((_, at) => {
|
|
62
|
-
const command = commandAt(program, words.slice(0, at + 1).join(" "));
|
|
63
|
-
return command !== undefined && (at === words.length - 1 || command.commands.length === 0);
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
/** The pointer for a moved or renamed path in `args`, for a CLI that parses without `run`. */
|
|
67
|
-
export const movedCommandError = (program, args) => {
|
|
68
|
-
const moved = movedPath(args.filter((word) => !word.startsWith("-")), (path) => mountedOrArgument(program, path));
|
|
69
|
-
return moved === undefined
|
|
70
|
-
? undefined
|
|
71
|
-
: new CliError("validation_error", `\`${program.name()} ${moved}\` is not here — ${movedPointer(moved)}`);
|
|
72
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Level } from "./permissions.js";
|
|
2
|
-
/** Canonical names for internal permission keys; saved moved paths are refused below. */
|
|
3
|
-
export declare const canonicalPermissionKey: (key: string) => string;
|
|
4
|
-
/** WC-PERM-8: a moved saved path must name the replacement before any command runs. */
|
|
5
|
-
export declare const canonicalPermissions: (levels: Readonly<Record<string, Level>>) => Record<string, Level>;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { CliError } from "@wirecat/cli-base";
|
|
2
|
-
const RENAMED = [
|
|
3
|
-
["models.audio.download", "models.download"],
|
|
4
|
-
["models.text.download", "models.download"],
|
|
5
|
-
["models.text.key", "models.keys"],
|
|
6
|
-
["models.audio", "models"],
|
|
7
|
-
["models.text", "models"],
|
|
8
|
-
["doctor.report", "doctor.reports"],
|
|
9
|
-
["contacts.aliases.rm", "contacts.aliases.remove"],
|
|
10
|
-
["contacts.alias.rm", "contacts.aliases.remove"],
|
|
11
|
-
["contacts.alias", "contacts.aliases"],
|
|
12
|
-
["contacts.profile", "contacts.info"],
|
|
13
|
-
["contacts.timeline", "contacts.events"],
|
|
14
|
-
["chats.links.revoke", "chats.links.remove"],
|
|
15
|
-
["chats.link.revoke", "chats.links.remove"],
|
|
16
|
-
["chats.link", "chats.links"],
|
|
17
|
-
["chats.members.audit", "chats.members.check"],
|
|
18
|
-
["chats.requests.accept", "chats.requests.confirm"],
|
|
19
|
-
["chats.requests.decline", "chats.requests.reject"],
|
|
20
|
-
["metadata.get", "metadata.show"],
|
|
21
|
-
["metadata.refresh", "metadata.sync"],
|
|
22
|
-
["tasks.plan", "tasks.update"],
|
|
23
|
-
["tags.auto", "tags.rebuild"],
|
|
24
|
-
["attachments.text.set", "attachments.update"],
|
|
25
|
-
["attachments.text", "attachments.update"],
|
|
26
|
-
["conversations.build", "conversations.links.rebuild"],
|
|
27
|
-
["conversations.embed", "conversations.embeddings"],
|
|
28
|
-
["conversations.batches.next", "conversations.batches.show"],
|
|
29
|
-
["conversations.consents.revoke", "conversations.consents.remove"],
|
|
30
|
-
["stats.messages.counters.refresh", "stats.messages.counters.sync"],
|
|
31
|
-
["store.fetch", "messages.sync"],
|
|
32
|
-
["store.gaps.plan", "store.gaps.show"],
|
|
33
|
-
["store.reindex", "store.rebuild"],
|
|
34
|
-
];
|
|
35
|
-
/** Canonical names for internal permission keys; saved moved paths are refused below. */
|
|
36
|
-
export const canonicalPermissionKey = (key) => {
|
|
37
|
-
if (key.startsWith("bot."))
|
|
38
|
-
return `bot.${canonicalPermissionKey(key.slice(4))}`;
|
|
39
|
-
const renamed = RENAMED.find(([old]) => key === old || key.startsWith(`${old}.`));
|
|
40
|
-
return renamed ? renamed[1] + key.slice(renamed[0].length) : key;
|
|
41
|
-
};
|
|
42
|
-
/** WC-PERM-8: a moved saved path must name the replacement before any command runs. */
|
|
43
|
-
export const canonicalPermissions = (levels) => {
|
|
44
|
-
for (const key of Object.keys(levels)) {
|
|
45
|
-
const canonical = canonicalPermissionKey(key);
|
|
46
|
-
if (key !== canonical)
|
|
47
|
-
throw new CliError("configuration_error", `permission path moved — rename permissions.${key} to permissions.${canonical}`, { permission: key, replacement: canonical, retryable: false });
|
|
48
|
-
}
|
|
49
|
-
return { ...levels };
|
|
50
|
-
};
|