@leemour/cli-messaging 0.43.0 → 0.44.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/README.md +1 -1
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/messenger/port.d.ts +2 -0
- package/dist/cli/messenger/port.d.ts.map +1 -1
- package/dist/cli/messenger/port.js.map +1 -1
- package/dist/cli/messenger/reactions-command.d.ts +20 -0
- package/dist/cli/messenger/reactions-command.d.ts.map +1 -0
- package/dist/cli/messenger/reactions-command.js +38 -0
- package/dist/cli/messenger/reactions-command.js.map +1 -0
- package/dist/mcp/tools/reactions.d.ts +5 -0
- package/dist/mcp/tools/reactions.d.ts.map +1 -0
- package/dist/mcp/tools/reactions.js +33 -0
- package/dist/mcp/tools/reactions.js.map +1 -0
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +2 -0
- package/dist/mcp/tools.js.map +1 -1
- package/dist/store/migrations.d.ts +1 -10
- package/dist/store/migrations.d.ts.map +1 -1
- package/dist/store/migrations.js +9 -5
- package/dist/store/migrations.js.map +1 -1
- package/dist/store/sqlite/manifest.d.ts +22 -0
- package/dist/store/sqlite/manifest.d.ts.map +1 -0
- package/dist/store/sqlite/manifest.js +11 -0
- package/dist/store/sqlite/manifest.js.map +1 -0
- package/dist/store/sqlite/migrations.generated.d.ts +5 -0
- package/dist/store/sqlite/migrations.generated.d.ts.map +1 -0
- package/dist/store/sqlite/migrations.generated.js +26 -0
- package/dist/store/sqlite/migrations.generated.js.map +1 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ provider has travels in `providerMetadata`.
|
|
|
20
20
|
| `.` | `Chat`, `Message`, `Contact`, `Page`… · `formatLocator` / `parseLocator` · `renderMessages` · `pickChat` / `pickPerson` |
|
|
21
21
|
| `./store` | `openCache` — `node:sqlite` under Node, `bun:sqlite` under Bun, WAL and a busy timeout on both · `openStore` — the shared message store, every method async: one file for every messenger (`MESSAGING_STORE` overrides where), forward-only migrations with `min_compatible`, every sender an identity with a person of their own, edits kept as revisions, a message by its id, deletions kept as tombstones, trigram search · `find` — by text, by sender, or both; `together` for the chats where every sender wrote, `perChat` to cap each chat · `savePeople` and `people` — usernames and bot flags, and a `PeopleLookup` for `pickPerson` |
|
|
22
22
|
| `./sends` | the send guard: read-only profiles, an allow-list of actions, a recipient list, an hourly limit, and a journal of every attempt that never holds the text; `newSendId` for a send's identity across retries |
|
|
23
|
-
| `./cli` | the command skeleton: `run` (never throws, returns an exit code), the global flags, `settingsFor` (flag → environment → file → default, one strict file schema with each CLI's own fields), the profile as the first word, `--timeout` that closes what a command holds, paging, and run records: `--record` keeps a run's ids and timings (never content), a failure is kept unless `--no-record`, and `runsCommand` gives `runs list\|show\|path` · `configCommand(app, config)` shows and changes the settings with where each came from · `completeCommand(messenger, config)` gives shell completion, chat ids from the store and never a connection · `doctorCommand(messenger)` reports the installation's state from disk (the store, the account, sends, runs, the messenger's own checks), and connects only with `--online`; `doctor report create` writes that, the failed run and the recent sends to a file with every id a label · `skillCommand(app, url)` prints the CLI's own SKILL.md for an agent (`skill show`) · `commandsCommand(app)` describes every command as JSON, with `contract` (`CONTRACT`, the major version of the output types) and which commands write · the shared read commands: a CLI describes its messenger once (`Messenger`: its app, a `connect` that returns a `MessengerAdapter`, how `me` maps to a chat) and gets `accountCommand`, `chatsCommand` (`list`, `show`), `contactsCommand` (`list`, `show`) `recipientsCommand`, `sendsCommand`, `watchCommand` (new messages as they arrive, `--jsonl`, until Ctrl-C or `--timeout`; `--events` adds edits, deletions and reactions, each kept in the store), `backfillCommand` (a chat's history into the store, resumable, FloodWait-aware; `--background` makes it a detached job that `backfill list|status|cancel` follow; `--estimate` prices what is left from the store alone), `syncCommand` and `exportCommand` (what the store holds; a chat's messages out of it, as JSON or `--format markdown`), `inboxCommand` (other people's unread messages in every chat, or with `--new` what arrived since the last check — each message once, the point moved only by a run that printed; copied from max-cli), `serveCommand` (keeps the store current until stopped — one per profile by a lock file, catch-up on, started by a person, `server start` or a unit), `serverCommand` (`server start|stop|restart|status|logs`: `serve` in the background, as max-cli's `server`; `install|uninstall` add a systemd user unit or a launchd agent per profile, and `install` starts nothing), and `messagesCommand` (`list`, `show`, `context`, `search` over the store by any three letters inside a word, or `--regex`, `send`/`reply` through the send guard (`--silent`, `--no-preview`, `--md`, `--file` and `--photo` with the text as the caption, and `--at` to send later, with `scheduled` listing the queue), `edit` of the owner's own message, `forward` to another chat and `pin`/`unpin` through it too (the adapter's optional `edit`, `forward`, `pin` and `unpin`); a `msg:` locator names a message) — every read saved to the store, `--offline` answered from it, each call a run event · `mcpCommand(messenger)` serves the profile to an agent over MCP on stdin and stdout (copied from max-cli: one connection held for minutes, one call at a time, read tools named `<cli>_<command words>` answering what `--json` prints, `<cli>_status` without connecting; `--allow-send` adds `<cli>_messages_send`, `_edit`, `_forward`, `_pin` and `
|
|
23
|
+
| `./cli` | the command skeleton: `run` (never throws, returns an exit code), the global flags, `settingsFor` (flag → environment → file → default, one strict file schema with each CLI's own fields), the profile as the first word, `--timeout` that closes what a command holds, paging, and run records: `--record` keeps a run's ids and timings (never content), a failure is kept unless `--no-record`, and `runsCommand` gives `runs list\|show\|path` · `configCommand(app, config)` shows and changes the settings with where each came from · `completeCommand(messenger, config)` gives shell completion, chat ids from the store and never a connection · `doctorCommand(messenger)` reports the installation's state from disk (the store, the account, sends, runs, the messenger's own checks), and connects only with `--online`; `doctor report create` writes that, the failed run and the recent sends to a file with every id a label · `skillCommand(app, url)` prints the CLI's own SKILL.md for an agent (`skill show`) · `commandsCommand(app)` describes every command as JSON, with `contract` (`CONTRACT`, the major version of the output types) and which commands write · the shared read commands: a CLI describes its messenger once (`Messenger`: its app, a `connect` that returns a `MessengerAdapter`, how `me` maps to a chat) and gets `accountCommand`, `chatsCommand` (`list`, `show`), `contactsCommand` (`list`, `show`) `recipientsCommand`, `sendsCommand`, `watchCommand` (new messages as they arrive, `--jsonl`, until Ctrl-C or `--timeout`; `--events` adds edits, deletions and reactions, each kept in the store), `backfillCommand` (a chat's history into the store, resumable, FloodWait-aware; `--background` makes it a detached job that `backfill list|status|cancel` follow; `--estimate` prices what is left from the store alone), `syncCommand` and `exportCommand` (what the store holds; a chat's messages out of it, as JSON or `--format markdown`), `inboxCommand` (other people's unread messages in every chat, or with `--new` what arrived since the last check — each message once, the point moved only by a run that printed; copied from max-cli), `serveCommand` (keeps the store current until stopped — one per profile by a lock file, catch-up on, started by a person, `server start` or a unit), `serverCommand` (`server start|stop|restart|status|logs`: `serve` in the background, as max-cli's `server`; `install|uninstall` add a systemd user unit or a launchd agent per profile, and `install` starts nothing), and `messagesCommand` (`list`, `show`, `context`, `search` over the store by any three letters inside a word, or `--regex`, `send`/`reply` through the send guard (`--silent`, `--no-preview`, `--md`, `--file` and `--photo` with the text as the caption, and `--at` to send later, with `scheduled` listing the queue), `edit` of the owner's own message, `forward` to another chat and `pin`/`unpin` through it too (the adapter's optional `edit`, `forward`, `pin` and `unpin`) · `reactionsCommand` (`add`, `remove`: the owner's reaction on a message, through the guard; the adapter's optional `react`); a `msg:` locator names a message) — every read saved to the store, `--offline` answered from it, each call a run event · `mcpCommand(messenger)` serves the profile to an agent over MCP on stdin and stdout (copied from max-cli: one connection held for minutes, one call at a time, read tools named `<cli>_<command words>` answering what `--json` prints, `<cli>_status` without connecting; `--allow-send` adds `<cli>_messages_send`, `_edit`, `_forward`, `_pin`, `_unpin`, `<cli>_reactions_add` and `_remove` through the same guard as their commands, and `--confirm-send` shows the owner every send in a form from the server first), and `mcp config` prints the entry for a desktop client |
|
|
24
24
|
|
|
25
25
|
⚠ **Errors are recognised by shape, not by class** (`isCliFailure`). A package linked during
|
|
26
26
|
development brings its own copy of cli-core, and an error built by one copy is not an `instanceof`
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export { type McpEnvironment, mcpCommand, serverEntry } from "./messenger/mcp-co
|
|
|
19
19
|
export { messagesCommand } from "./messenger/messages-command.js";
|
|
20
20
|
export { modelsCommand } from "./messenger/models-command.js";
|
|
21
21
|
export type { After, Download, MessengerAdapter, RemoteFile, SendOptions, Sent, Transcript } from "./messenger/port.js";
|
|
22
|
+
export { reactionsCommand } from "./messenger/reactions-command.js";
|
|
22
23
|
export { REVIEW_CHATS, reviewCommand, reviewIn, unanswered } from "./messenger/review.js";
|
|
23
24
|
export { serveCommand, servingProfiles } from "./messenger/serve-command.js";
|
|
24
25
|
export { type ServerSystem, serverCommand } from "./messenger/server-command.js";
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,WAAW,EACX,aAAa,EACb,SAAS,EACT,OAAO,GACR,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,KAAK,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO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boxCommand, momentOf, newIn, unreadIn } from "./messenge
|
|
|
18
18
|
export { mcpCommand, serverEntry } from "./messenger/mcp-command.js";
|
|
19
19
|
export { messagesCommand } from "./messenger/messages-command.js";
|
|
20
20
|
export { modelsCommand } from "./messenger/models-command.js";
|
|
21
|
+
export { reactionsCommand } from "./messenger/reactions-command.js";
|
|
21
22
|
export { REVIEW_CHATS, reviewCommand, reviewIn, unanswered } from "./messenger/review.js";
|
|
22
23
|
export { serveCommand, servingProfiles } from "./messenger/serve-command.js";
|
|
23
24
|
export { serverCommand } from "./messenger/server-command.js";
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,OAAO,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAGL,WAAW,EACX,aAAa,EACb,SAAS,EACT,OAAO,GACR,MAAM,cAAc,CAAA;AACrB,OAAO,EAAkB,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,EAA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
@@ -97,6 +97,8 @@ export interface MessengerAdapter {
|
|
|
97
97
|
notify: boolean;
|
|
98
98
|
}): Promise<void>;
|
|
99
99
|
unpin?(chatId: Id, messageId: Id): Promise<void>;
|
|
100
|
+
/** The owner's reaction on one message: an emoji replaces the one there was, `null` takes it off. */
|
|
101
|
+
react?(chatId: Id, messageId: Id, emoji: string | null): Promise<void>;
|
|
100
102
|
/**
|
|
101
103
|
* New messages and changes to messages as they arrive, until `signal` aborts. `onReady` once it is
|
|
102
104
|
* actually listening — a caller that sends on "listening" must not race the connection. Only on a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"port.d.ts","sourceRoot":"","sources":["../../../src/cli/messenger/port.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,KAAK,EACV,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,WAAW,EACX,EAAE,EACF,MAAM,EACN,OAAO,EACP,YAAY,EACZ,IAAI,EACJ,UAAU,EACV,eAAe,EAChB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAEnD,iIAAiI;AACjI,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,IAAI,aAAa,CAAC,UAAU,CAAC,CAAA;CACnC;AAED,qGAAqG;AACrG,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,UAAU,EAAE,CAAA;IACnB,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AAED,+FAA+F;AAC/F,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,qCAAqC;IACrC,OAAO,CAAC,EAAE,EAAE,CAAA;IACZ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W,CAAC,GAAG;QAAE,MAAM,EAAE,EAAE,CAAA;KAAE,CAAC,CAAA;IAC/G,mGAAmG;IACnG,UAAU,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;IACzE,wHAAwH;IACxH,MAAM,CAAC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,CAAA;IAC3C,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACvB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACvB;AAED,KAAK,MAAM,GAAG,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,CAAA;AAE3C;;;GAGG;AACH,eAAO,MAAM,cAAc,UAClB,gBAAgB,WACd,gBAAgB,SACnB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,KAAK,MAAM,KAC7E,gBAUC,CAAA;AAEJ,iFAAiF;AACjF,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,gBAAgB,WAChD,gBAAgB,UACjB,CAAC,QACH,MAAM,KACX,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAIjC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"port.js","sourceRoot":"","sources":["../../../src/cli/messenger/port.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"port.js","sourceRoot":"","sources":["../../../src/cli/messenger/port.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAkI5C;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,KAAuB,EACvB,OAAyB,EACzB,IAAI,GAA6E,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAChF,EAAE,CACpB,IAAI,KAAK,CAAC,OAAO,EAAE;IACjB,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAChB,IAAI,GAAG,IAAI,GAAG;YAAE,OAAO,GAAG,CAAC,GAA6B,CAAC,CAAA;QACzD,MAAM,KAAK,GAAG,KAAK,CAAC,GAA6B,CAAY,CAAA;QAC7D,OAAO,OAAO,KAAK,KAAK,UAAU;YAChC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAE,KAA+C,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YACrG,CAAC,CAAC,KAAK,CAAA;IACX,CAAC;IACD,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,KAAK;CAC9C,CAAC,CAAA;AAEJ,iFAAiF;AACjF,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,OAAyB,EACzB,MAAS,EACT,IAAY,EACsB,EAAE;IACpC,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IAC7B,IAAI,OAAO,KAAK,KAAK,UAAU;QAAE,MAAM,IAAI,QAAQ,CAAC,kBAAkB,EAAE,yBAAyB,IAAI,EAAE,CAAC,CAAA;IACxG,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,CAAqC,CAAA;AAChE,CAAC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import type { Id } from "../../domain/models.js";
|
|
3
|
+
import type { SendGuard } from "../../sends/guard.js";
|
|
4
|
+
import { type Messenger } from "./context.js";
|
|
5
|
+
import { type MessengerAdapter } from "./port.js";
|
|
6
|
+
export interface Reacted {
|
|
7
|
+
chatId: Id;
|
|
8
|
+
messageId: Id;
|
|
9
|
+
/** `null` once it is taken off. */
|
|
10
|
+
reaction: string | null;
|
|
11
|
+
}
|
|
12
|
+
/** `reactions add|remove`: the owner's own reaction on a message. */
|
|
13
|
+
export declare const reactionsCommand: (messenger: Messenger) => Command;
|
|
14
|
+
/** One path for `reactions add|remove` and their MCP tools. A reaction never counts toward the hourly limit. */
|
|
15
|
+
export declare const guardedReaction: (guard: SendGuard, connection: MessengerAdapter, { chat, message, emoji }: {
|
|
16
|
+
chat: string;
|
|
17
|
+
message: string;
|
|
18
|
+
emoji: string | null;
|
|
19
|
+
}) => Promise<Reacted>;
|
|
20
|
+
//# sourceMappingURL=reactions-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactions-command.d.ts","sourceRoot":"","sources":["../../../src/cli/messenger/reactions-command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAErD,OAAO,EAAE,KAAK,SAAS,EAAoB,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAE7D,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,EAAE,CAAA;IACV,SAAS,EAAE,EAAE,CAAA;IACb,mCAAmC;IACnC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;AAED,qEAAqE;AACrE,eAAO,MAAM,gBAAgB,cAAe,SAAS,KAAG,OA+BvD,CAAA;AAED,gHAAgH;AAChH,eAAO,MAAM,eAAe,UACnB,SAAS,cACJ,gBAAgB,4BACF;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,KAChF,OAAO,CAAC,OAAO,CAMjB,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CliError } from "@leemour/cli-core";
|
|
2
|
+
import { annotate } from "@leemour/cli-core/commands";
|
|
3
|
+
import { Command } from "commander";
|
|
4
|
+
import { guardedWrite } from "../../sends/guarded.js";
|
|
5
|
+
import { messengerContext } from "./context.js";
|
|
6
|
+
import { capability } from "./port.js";
|
|
7
|
+
/** `reactions add|remove`: the owner's own reaction on a message. */
|
|
8
|
+
export const reactionsCommand = (messenger) => {
|
|
9
|
+
const reactions = new Command("reactions").description("react to messages");
|
|
10
|
+
annotate(reactions.command("add"), { mutates: true })
|
|
11
|
+
.description("put your reaction on a message; it replaces the one you had")
|
|
12
|
+
.argument("<chat>", messenger.chatArgument)
|
|
13
|
+
.argument("<message>", "the message id")
|
|
14
|
+
.argument("<emoji>", "one emoji, for example 👍")
|
|
15
|
+
.action(async function (chat, message, emoji) {
|
|
16
|
+
const context = messengerContext(this, messenger);
|
|
17
|
+
context.renderer.result(await context.withMessenger((connection) => guardedReaction(context.guard, connection, { chat, message: message.trim(), emoji: emoji.trim() })));
|
|
18
|
+
});
|
|
19
|
+
annotate(reactions.command("remove"), { mutates: true })
|
|
20
|
+
.description("take your reaction off a message")
|
|
21
|
+
.argument("<chat>", messenger.chatArgument)
|
|
22
|
+
.argument("<message>", "the message id")
|
|
23
|
+
.action(async function (chat, message) {
|
|
24
|
+
const context = messengerContext(this, messenger);
|
|
25
|
+
context.renderer.result(await context.withMessenger((connection) => guardedReaction(context.guard, connection, { chat, message: message.trim(), emoji: null })));
|
|
26
|
+
});
|
|
27
|
+
return reactions;
|
|
28
|
+
};
|
|
29
|
+
/** One path for `reactions add|remove` and their MCP tools. A reaction never counts toward the hourly limit. */
|
|
30
|
+
export const guardedReaction = async (guard, connection, { chat, message, emoji }) => {
|
|
31
|
+
if (emoji === "")
|
|
32
|
+
throw new CliError("validation_error", "which emoji? give one, for example 👍");
|
|
33
|
+
const react = capability(connection, "react", "react to a message");
|
|
34
|
+
const { id: chatId } = await connection.resolve(chat);
|
|
35
|
+
await guardedWrite(guard, { chatId, kind: "reaction", messageId: message }, () => react(chatId, message, emoji));
|
|
36
|
+
return { chatId, messageId: message, reaction: emoji };
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=reactions-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactions-command.js","sourceRoot":"","sources":["../../../src/cli/messenger/reactions-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGnC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAkB,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,EAAE,UAAU,EAAyB,MAAM,WAAW,CAAA;AAS7D,qEAAqE;AACrE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAoB,EAAW,EAAE;IAChE,MAAM,SAAS,GAAG,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAA;IAE3E,QAAQ,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;SAClD,WAAW,CAAC,6DAA6D,CAAC;SAC1E,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,YAAY,CAAC;SAC1C,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC;SACvC,QAAQ,CAAC,SAAS,EAAE,2BAA2B,CAAC;SAChD,MAAM,CAAC,KAAK,WAA0B,IAAY,EAAE,OAAe,EAAE,KAAa;QACjF,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QACjD,OAAO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AG,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,oBAAoB,CAAC,CAAA;IACnE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACrD,MAAM,YAAY,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAA;IAChH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA;AACxD,CAAC,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Messenger } from "../../cli/messenger/context.js";
|
|
2
|
+
import { type AnyTool } from "../tool.js";
|
|
3
|
+
/** Offered with `--allow-send`, under the `reaction` permission. */
|
|
4
|
+
export declare const reactionTools: (messenger: Messenger) => Record<string, AnyTool>;
|
|
5
|
+
//# sourceMappingURL=reactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactions.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/reactions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAE/D,OAAO,EAAE,KAAK,OAAO,EAAyC,MAAM,YAAY,CAAA;AAEhF,oEAAoE;AACpE,eAAO,MAAM,aAAa,cAAe,SAAS,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CA8B1E,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
import { guardedReaction } from "../../cli/messenger/reactions-command.js";
|
|
3
|
+
import { APPROVE, chatOf, message, tool, WRITE } from "../tool.js";
|
|
4
|
+
/** Offered with `--allow-send`, under the `reaction` permission. */
|
|
5
|
+
export const reactionTools = (messenger) => {
|
|
6
|
+
const chat = chatOf(messenger);
|
|
7
|
+
return {
|
|
8
|
+
reactions_add: tool({
|
|
9
|
+
title: "React to a message",
|
|
10
|
+
description: "Put the owner's reaction on one message; it replaces the one there was. The sender sees it. " +
|
|
11
|
+
"Only when the owner asked for this reaction on this message.",
|
|
12
|
+
input: v.object({
|
|
13
|
+
chat,
|
|
14
|
+
message,
|
|
15
|
+
emoji: v.pipe(v.string(), v.minLength(1), v.description("one emoji, for example 👍")),
|
|
16
|
+
}),
|
|
17
|
+
annotations: WRITE,
|
|
18
|
+
_meta: APPROVE,
|
|
19
|
+
permission: "reaction",
|
|
20
|
+
online: (adapter, args, { guard }) => guardedReaction(guard, adapter, { chat: args.chat, message: args.message, emoji: args.emoji }),
|
|
21
|
+
}),
|
|
22
|
+
reactions_remove: tool({
|
|
23
|
+
title: "Take a reaction off",
|
|
24
|
+
description: "Take the owner's reaction off one message. Only when the owner asked for it.",
|
|
25
|
+
input: v.object({ chat, message }),
|
|
26
|
+
annotations: WRITE,
|
|
27
|
+
_meta: APPROVE,
|
|
28
|
+
permission: "reaction",
|
|
29
|
+
online: (adapter, args, { guard }) => guardedReaction(guard, adapter, { chat: args.chat, message: args.message, emoji: null }),
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=reactions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactions.js","sourceRoot":"","sources":["../../../src/mcp/tools/reactions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAA;AAC1E,OAAO,EAAgB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEhF,oEAAoE;AACpE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAoB,EAA2B,EAAE;IAC7E,MAAM,IAA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tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAaxC;;;GAGG;AACH,eAAO,MAAM,SAAS,cAAe,SAAS,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CASrE,CAAA;AAEF,wCAAwC;AACxC,eAAO,MAAM,SAAS,cAAe,SAAS,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAIrE,CAAA"}
|
package/dist/mcp/tools.js
CHANGED
|
@@ -7,6 +7,7 @@ import { messageActionTools } from "./tools/messages-actions.js";
|
|
|
7
7
|
import { messagesPhotoTools } from "./tools/messages-photo.js";
|
|
8
8
|
import { messageSendTools } from "./tools/messages-send.js";
|
|
9
9
|
import { messagesTranscribeTools } from "./tools/messages-transcribe.js";
|
|
10
|
+
import { reactionTools } from "./tools/reactions.js";
|
|
10
11
|
import { reviewTools } from "./tools/review.js";
|
|
11
12
|
/**
|
|
12
13
|
* The read tools, each answering what its command's `--json` prints. Named `<cli>_<command words>`,
|
|
@@ -26,5 +27,6 @@ export const readTools = (messenger) => ({
|
|
|
26
27
|
export const sendTools = (messenger) => ({
|
|
27
28
|
...messageSendTools(messenger),
|
|
28
29
|
...messageActionTools(messenger),
|
|
30
|
+
...reactionTools(messenger),
|
|
29
31
|
});
|
|
30
32
|
//# sourceMappingURL=tools.js.map
|
package/dist/mcp/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,SAAoB,EAA2B,EAAE,CAAC,CAAC;IAC3E,GAAG,UAAU,CAAC,SAAS,CAAC;IACxB,GAAG,WAAW,CAAC,SAAS,CAAC;IACzB,GAAG,YAAY,CAAC,SAAS,CAAC;IAC1B,GAAG,UAAU,CAAC,SAAS,CAAC;IACxB,GAAG,aAAa,CAAC,SAAS,CAAC;IAC3B,GAAG,aAAa,CAAC,SAAS,CAAC;IAC3B,GAAG,kBAAkB,CAAC,SAAS,CAAC;IAChC,GAAG,uBAAuB,CAAC,SAAS,CAAC;CACtC,CAAC,CAAA;AAEF,wCAAwC;AACxC,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,SAAoB,EAA2B,EAAE,CAAC,CAAC;IAC3E,GAAG,gBAAgB,CAAC,SAAS,CAAC;IAC9B,GAAG,kBAAkB,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/mcp/tools.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16 +5,7 @@ export interface Migration {
|
|
|
5
5
|
minCompatible: number;
|
|
6
6
|
statements: string[];
|
|
7
7
|
}
|
|
8
|
-
/**
|
|
9
|
-
* ⚠ **Append only. A migration that has reached anyone's file is never edited.** Forward-only and
|
|
10
|
-
* additive: no `DROP` and no rebuild of a base table, a new column is nullable or has a default,
|
|
11
|
-
* and every `INSERT` in the store names its columns — that is what lets an older `tg` keep writing
|
|
12
|
-
* to a file a newer `max` has migrated. Only a breaking change raises `minCompatible`, and that is
|
|
13
|
-
* a major version of this package. The search indexes are derived and may be dropped and rebuilt.
|
|
14
|
-
*
|
|
15
|
-
* Times are epoch milliseconds: an integer sorts and ranges without a format to agree on. Ids are
|
|
16
|
-
* text: they are 64-bit, and they are not arithmetic.
|
|
17
|
-
*/
|
|
8
|
+
/** Every version this build speaks: the hand-written ones, then the generated ones. */
|
|
18
9
|
export declare const MIGRATIONS: Migration[];
|
|
19
10
|
/**
|
|
20
11
|
* Brings the file up to this version, or opens a newer one it can still write to, or refuses.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/store/migrations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/store/migrations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAGhD,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,uFAAuF;IACvF,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,EAAE,CAAA;CACrB;AAyQD,uFAAuF;AACvF,eAAO,MAAM,UAAU,EAAE,SAAS,EAAgD,CAAA;AAiBlF;;;GAGG;AACH,eAAO,MAAM,OAAO,aACR,aAAa,wBACsB;IAAE,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAA;CAAE,KAC5F,IAyBF,CAAA"}
|
package/dist/store/migrations.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { CliError } from "@leemour/cli-core";
|
|
2
|
+
import { generatedMigrations } from "./sqlite/manifest.js";
|
|
2
3
|
/**
|
|
3
|
-
* ⚠ **
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* ⚠ **Versions 1–5, frozen: a migration that has reached anyone's file is never edited.** From
|
|
5
|
+
* version 6 on, migrations are generated by drizzle-kit and numbered in `sqlite/manifest.ts`; the
|
|
6
|
+
* rules here hold for them too. Forward-only and additive: no `DROP` and no rebuild of a base
|
|
7
|
+
* table, a new column is nullable or has a default, and every `INSERT` in the store names its
|
|
8
|
+
* columns — that is what lets an older `tg` keep writing to a file a newer `max` has migrated. Only a breaking change raises `minCompatible`, and that is
|
|
7
9
|
* a major version of this package. The search indexes are derived and may be dropped and rebuilt.
|
|
8
10
|
*
|
|
9
11
|
* Times are epoch milliseconds: an integer sorts and ranges without a format to agree on. Ids are
|
|
10
12
|
* text: they are 64-bit, and they are not arithmetic.
|
|
11
13
|
*/
|
|
12
|
-
|
|
14
|
+
const HAND_WRITTEN = [
|
|
13
15
|
{
|
|
14
16
|
version: 1,
|
|
15
17
|
minCompatible: 1,
|
|
@@ -250,6 +252,8 @@ export const MIGRATIONS = [
|
|
|
250
252
|
],
|
|
251
253
|
},
|
|
252
254
|
];
|
|
255
|
+
/** Every version this build speaks: the hand-written ones, then the generated ones. */
|
|
256
|
+
export const MIGRATIONS = [...HAND_WRITTEN, ...generatedMigrations()];
|
|
253
257
|
const HISTORY = `CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
254
258
|
version INTEGER PRIMARY KEY,
|
|
255
259
|
min_compatible INTEGER NOT NULL,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../src/store/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../src/store/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAS1D;;;;;;;;;;GAUG;AACH,MAAM,YAAY,GAAgB;IAChC;QACE,OAAO,EAAE,CAAC;QACV,aAAa,EAAE,CAAC;QAChB,UAAU,EAAE;YACV;;;;;;;SAOG;YAEH;;;;;;;SAOG;YAEH,2FAA2F;YAC3F;;;;;;;;;;;;SAYG;YAEH;;;;;;;SAOG;YACH,qEAAqE;YAErE,6EAA6E;YAC7E;;;;;;;;SAQG;YAEH;;;;;;;;;;;;SAYG;YACH,2EAA2E;YAE3E,8FAA8F;YAC9F,sEAAsE;YACtE;;;;;;;;;;;;;;;;;;;;;;SAsBG;YACH,mEAAmE;YACnE,sFAAsF;YACtF,sEAAsE;YACtE,kEAAkE;YAElE;;;;;SAKG;YACH,qEAAqE;YAErE;;;;;;;;;;;;;;;;SAgBG;YAEH,6FAA6F;YAC7F,uEAAuE;YACvE,gHAAgH;YAChH,2GAA2G;YAC3G,8HAA8H;YAE9H,sGAAsG;YACtG;;WAEK;YACL;;WAEK;YACL;;;WAGK;YACL;;WAEK;YACL;;WAEK;YACL;;;WAGK;YACL;;WAEK;YACL;;WAEK;YACL;;;WAGK;SACN;KACF;IACD;QACE,OAAO,EAAE,CAAC;QACV,aAAa,EAAE,CAAC;QAChB,UAAU,EAAE;YACV,+FAA+F;YAC/F,8FAA8F;YAC9F;;;;;SAKG;SACJ;KACF;IACD;QACE,OAAO,EAAE,CAAC;QACV,aAAa,EAAE,CAAC;QAChB,UAAU,EAAE;YACV,gGAAgG;YAChG,+FAA+F;YAC/F,8FAA8F;YAC9F,8BAA8B;YAC9B,8BAA8B;YAC9B,8B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AAE;IACR,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;IAC/B,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;IAChC,IAAI,CAAC;QACH,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACtB,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAA;QAChC,IAAI,IAAI,CAAC,OAAO,GAAG,IAAI,IAAI,IAAI,CAAC,aAAa,GAAG,IAAI,EAAE,CAAC;YACrD,MAAM,IAAI,QAAQ,CAChB,qBAAqB,EACrB,4DAA4D,IAAI,CAAC,OAAO,mBAAmB;gBACzF,GAAG,IAAI,CAAC,aAAa,qBAAqB,IAAI,uBAAuB,CACxE,CAAA;QACH,CAAC;QACD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACnC,IAAI,SAAS,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO;gBAAE,SAAQ;YAC/C,KAAK,MAAM,SAAS,IAAI,SAAS,CAAC,UAAU;gBAAE,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;YACtE,QAAQ;iBACL,OAAO,CAAC,sFAAsF,CAAC;iBAC/F,GAAG,CAAC,SAAS,CAAC,OAAO,EAAE,SAAS,CAAC,aAAa,EAAE,GAAG,EAAE,CAAC,CAAA;QAC3D,CAAC;QACD,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACzB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACzB,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Migration } from "../migrations.js";
|
|
2
|
+
/**
|
|
3
|
+
* Every folder drizzle-kit generated, in order, and the schema version it becomes. The version and
|
|
4
|
+
* `minCompatible` are ours, not Drizzle's: `schema_migrations` is the only log, and every build
|
|
5
|
+
* already installed decides by it.
|
|
6
|
+
*/
|
|
7
|
+
export type ManifestEntry = {
|
|
8
|
+
name: string;
|
|
9
|
+
version: number;
|
|
10
|
+
minCompatible: number;
|
|
11
|
+
}
|
|
12
|
+
/** Built by versions 1–5 before Drizzle; kept only as what drizzle-kit diffs against. */
|
|
13
|
+
| {
|
|
14
|
+
name: string;
|
|
15
|
+
coveredByHandWritten: true;
|
|
16
|
+
};
|
|
17
|
+
export declare const MANIFEST: ManifestEntry[];
|
|
18
|
+
export declare const generatedMigrations: (manifest?: ManifestEntry[], generated?: {
|
|
19
|
+
name: string;
|
|
20
|
+
statements: string[];
|
|
21
|
+
}[]) => Migration[];
|
|
22
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/store/sqlite/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAGjD;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE;AAC1D,yFAAyF;GACvF;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,oBAAoB,EAAE,IAAI,CAAA;CAAE,CAAA;AAEhD,eAAO,MAAM,QAAQ,EAAE,aAAa,EAAsE,CAAA;AAE1G,eAAO,MAAM,mBAAmB,cACpB,aAAa,EAAE,cACd;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,EAAE,KAClD,SAAS,EAMR,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GENERATED } from "./migrations.generated.js";
|
|
2
|
+
export const MANIFEST = [{ name: "20260929205838_baseline", coveredByHandWritten: true }];
|
|
3
|
+
export const generatedMigrations = (manifest = MANIFEST, generated = GENERATED) => manifest.flatMap((entry) => {
|
|
4
|
+
if ("coveredByHandWritten" in entry)
|
|
5
|
+
return [];
|
|
6
|
+
const found = generated.find(({ name }) => name === entry.name);
|
|
7
|
+
if (!found)
|
|
8
|
+
throw new Error(`migration ${entry.name} is in the manifest and not in the bundle — run pnpm db:bundle`);
|
|
9
|
+
return [{ version: entry.version, minCompatible: entry.minCompatible, statements: found.statements }];
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/store/sqlite/manifest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAYrD,MAAM,CAAC,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,CAAA;AAE1G,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,QAAQ,GAAoB,QAAQ,EACpC,SAAS,GAA6C,SAAS,EAClD,EAAE,CACf,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;IACzB,IAAI,sBAAsB,IAAI,KAAK;QAAE,OAAO,EAAE,CAAA;IAC9C,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,CAAA;IAC/D,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,aAAa,KAAK,CAAC,IAAI,gEAAgE,CAAC,CAAA;IACpH,OAAO,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC,aAAa,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,CAAA;AACvG,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrations.generated.d.ts","sourceRoot":"","sources":["../../../src/store/sqlite/migrations.generated.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,EAuB7D,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Written by scripts/bundle-migrations.ts from drizzle/ — run `pnpm db:bundle`, do not edit.
|
|
2
|
+
export const GENERATED = [
|
|
3
|
+
{
|
|
4
|
+
"name": "20260929205838_baseline",
|
|
5
|
+
"statements": [
|
|
6
|
+
"CREATE TABLE `account_identities` (\n\t`account_pk` integer NOT NULL,\n\t`identity_pk` integer NOT NULL,\n\t`first_seen_at` integer NOT NULL,\n\tCONSTRAINT `account_identities_pk` PRIMARY KEY(`account_pk`, `identity_pk`),\n\tCONSTRAINT `fk_account_identities_account_pk_accounts_pk_fk` FOREIGN KEY (`account_pk`) REFERENCES `accounts`(`pk`),\n\tCONSTRAINT `fk_account_identities_identity_pk_identities_pk_fk` FOREIGN KEY (`identity_pk`) REFERENCES `identities`(`pk`)\n);",
|
|
7
|
+
"CREATE TABLE `accounts` (\n\t`pk` integer PRIMARY KEY,\n\t`provider` text NOT NULL,\n\t`native_id` text NOT NULL,\n\t`name` text,\n\t`created_at` integer NOT NULL,\n\tCONSTRAINT `accounts_provider_native_id_unique` UNIQUE(`provider`,`native_id`)\n);",
|
|
8
|
+
"CREATE TABLE `attachments` (\n\t`pk` integer PRIMARY KEY,\n\t`message_pk` integer NOT NULL,\n\t`position` integer NOT NULL,\n\t`kind` text NOT NULL,\n\t`mime` text,\n\t`name` text,\n\t`title` text,\n\t`url` text,\n\t`size` integer,\n\t`width` integer,\n\t`height` integer,\n\t`duration` real,\n\t`provider_ref` text,\n\t`local_path` text,\n\tCONSTRAINT `fk_attachments_message_pk_messages_pk_fk` FOREIGN KEY (`message_pk`) REFERENCES `messages`(`pk`),\n\tCONSTRAINT `attachments_message_pk_position_unique` UNIQUE(`message_pk`,`position`)\n);",
|
|
9
|
+
"CREATE TABLE `chats` (\n\t`pk` integer PRIMARY KEY,\n\t`account_pk` integer NOT NULL,\n\t`native_id` text NOT NULL,\n\t`kind` text NOT NULL,\n\t`title` text,\n\t`unread_count` integer,\n\t`last_message_at` integer,\n\t`participants_count` integer,\n\t`provider_metadata` text,\n\t`updated_at` integer NOT NULL,\n\tCONSTRAINT `fk_chats_account_pk_accounts_pk_fk` FOREIGN KEY (`account_pk`) REFERENCES `accounts`(`pk`),\n\tCONSTRAINT `chats_account_pk_native_id_unique` UNIQUE(`account_pk`,`native_id`)\n);",
|
|
10
|
+
"CREATE TABLE `identities` (\n\t`pk` integer PRIMARY KEY,\n\t`provider` text NOT NULL,\n\t`native_id` text NOT NULL,\n\t`username` text,\n\t`name` text,\n\t`is_bot` integer,\n\t`phone_hmac` text,\n\t`provider_metadata` text,\n\t`first_seen_at` integer NOT NULL,\n\t`updated_at` integer NOT NULL,\n\tCONSTRAINT `identities_provider_native_id_unique` UNIQUE(`provider`,`native_id`)\n);",
|
|
11
|
+
"CREATE TABLE `identity_link_events` (\n\t`pk` integer PRIMARY KEY,\n\t`identity_pk` integer NOT NULL,\n\t`from_person_pk` integer,\n\t`to_person_pk` integer NOT NULL,\n\t`method` text NOT NULL,\n\t`at` integer NOT NULL,\n\t`by` text NOT NULL,\n\tCONSTRAINT `fk_identity_link_events_identity_pk_identities_pk_fk` FOREIGN KEY (`identity_pk`) REFERENCES `identities`(`pk`),\n\tCONSTRAINT `fk_identity_link_events_from_person_pk_persons_pk_fk` FOREIGN KEY (`from_person_pk`) REFERENCES `persons`(`pk`),\n\tCONSTRAINT `fk_identity_link_events_to_person_pk_persons_pk_fk` FOREIGN KEY (`to_person_pk`) REFERENCES `persons`(`pk`)\n);",
|
|
12
|
+
"CREATE TABLE `identity_links` (\n\t`identity_pk` integer PRIMARY KEY,\n\t`person_pk` integer NOT NULL,\n\t`method` text NOT NULL,\n\t`confidence` real NOT NULL,\n\t`linked_at` integer NOT NULL,\n\t`linked_by` text NOT NULL,\n\tCONSTRAINT `fk_identity_links_identity_pk_identities_pk_fk` FOREIGN KEY (`identity_pk`) REFERENCES `identities`(`pk`),\n\tCONSTRAINT `fk_identity_links_person_pk_persons_pk_fk` FOREIGN KEY (`person_pk`) REFERENCES `persons`(`pk`)\n);",
|
|
13
|
+
"CREATE TABLE `message_revisions` (\n\t`message_pk` integer NOT NULL,\n\t`text` text NOT NULL,\n\t`edited_at` integer,\n\t`captured_at` integer NOT NULL,\n\tCONSTRAINT `fk_message_revisions_message_pk_messages_pk_fk` FOREIGN KEY (`message_pk`) REFERENCES `messages`(`pk`)\n);",
|
|
14
|
+
"CREATE TABLE `messages` (\n\t`pk` integer PRIMARY KEY,\n\t`chat_pk` integer NOT NULL,\n\t`account_pk` integer NOT NULL,\n\t`native_id` text NOT NULL,\n\t`thread_native_id` text,\n\t`sender_identity_pk` integer,\n\t`sender_chat_native_id` text,\n\t`sender_name` text,\n\t`sent_at` integer NOT NULL,\n\t`edited_at` integer,\n\t`deleted_at` integer,\n\t`text` text NOT NULL,\n\t`reply_to_native_id` text,\n\t`reply_to` text,\n\t`forward` text,\n\t`outgoing` integer,\n\t`reactions` text,\n\t`provider_metadata` text,\n\t`ingested_at` integer NOT NULL,\n\t`ingested_via` text NOT NULL,\n\tCONSTRAINT `fk_messages_chat_pk_chats_pk_fk` FOREIGN KEY (`chat_pk`) REFERENCES `chats`(`pk`),\n\tCONSTRAINT `fk_messages_account_pk_accounts_pk_fk` FOREIGN KEY (`account_pk`) REFERENCES `accounts`(`pk`),\n\tCONSTRAINT `fk_messages_sender_identity_pk_identities_pk_fk` FOREIGN KEY (`sender_identity_pk`) REFERENCES `identities`(`pk`),\n\tCONSTRAINT `messages_chat_pk_native_id_unique` UNIQUE(`chat_pk`,`native_id`)\n);",
|
|
15
|
+
"CREATE TABLE `persons` (\n\t`pk` integer PRIMARY KEY,\n\t`uid` text NOT NULL UNIQUE,\n\t`name` text,\n\t`is_self` integer DEFAULT 0 NOT NULL,\n\t`created_at` integer NOT NULL,\n\t`updated_at` integer NOT NULL\n);",
|
|
16
|
+
"CREATE TABLE `sync_ranges` (\n\t`chat_pk` integer NOT NULL,\n\t`from_key` integer NOT NULL,\n\t`to_key` integer NOT NULL,\n\tCONSTRAINT `sync_ranges_pk` PRIMARY KEY(`chat_pk`, `from_key`),\n\tCONSTRAINT `fk_sync_ranges_chat_pk_chats_pk_fk` FOREIGN KEY (`chat_pk`) REFERENCES `chats`(`pk`)\n);",
|
|
17
|
+
"CREATE INDEX `chats_by_recency` ON `chats` (`account_pk`,\"last_message_at\" desc);",
|
|
18
|
+
"CREATE INDEX `identity_links_by_person` ON `identity_links` (`person_pk`);",
|
|
19
|
+
"CREATE INDEX `revisions_by_message` ON `message_revisions` (`message_pk`);",
|
|
20
|
+
"CREATE INDEX `messages_by_time` ON `messages` (`chat_pk`,\"sent_at\" desc);",
|
|
21
|
+
"CREATE INDEX `messages_by_account` ON `messages` (`account_pk`,`native_id`);",
|
|
22
|
+
"CREATE INDEX `messages_by_sender` ON `messages` (`sender_identity_pk`);"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
//# sourceMappingURL=migrations.generated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrations.generated.js","sourceRoot":"","sources":["../../../src/store/sqlite/migrations.generated.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,MAAM,CAAC,MAAM,SAAS,GAA6C;IACjE;QACE,MAAM,EAAE,yBAAyB;QACjC,YAAY,EAAE;YACZ,wdAAwd;YACxd,2PAA2P;YAC3P,giBAAgiB;YAChiB,0fAA0f;YAC1f,gYAAgY;YAChY,mnBAAmnB;YACnnB,8cAA8c;YAC9c,oRAAoR;YACpR,6+BAA6+B;YAC7+B,sNAAsN;YACtN,sSAAsS;YACtS,qFAAqF;YACrF,4EAA4E;YAC5E,4EAA4E;YAC5E,6EAA6E;YAC7E,8EAA8E;YAC9E,yEAAyE;SAC1E;KACF;CACF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leemour/cli-messaging",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0",
|
|
4
4
|
"description": "The messenger-neutral half of a messaging CLI: domain model, message locators, rendering, name resolution, the SQLite seam, the command skeleton and shared read commands, the send guard, run records and the message store",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"lint": "biome check .",
|
|
43
43
|
"lint:fix": "biome check --write .",
|
|
44
44
|
"db:generate": "drizzle-kit generate",
|
|
45
|
+
"db:bundle": "node scripts/bundle-migrations.ts",
|
|
45
46
|
"docs:check": "node --experimental-strip-types scripts/docs-check.ts",
|
|
46
47
|
"test": "vitest run",
|
|
47
48
|
"test:watch": "vitest",
|