@wirecat/cli-core 0.653.0 → 0.655.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/cli/bot/mcp.js +2 -1
  3. package/dist/cli/command-availability.d.ts +3 -1
  4. package/dist/cli/command-availability.js +6 -4
  5. package/dist/cli/early-refusal.d.ts +5 -5
  6. package/dist/cli/early-refusal.js +7 -7
  7. package/dist/cli/messenger/search-answers.js +1 -0
  8. package/dist/cli/preview.js +8 -4
  9. package/dist/cli/program.js +3 -7
  10. package/dist/cli/setup-answers.d.ts +3 -2
  11. package/dist/cli/setup-answers.js +5 -6
  12. package/dist/domain/providers.js +2 -0
  13. package/dist/entities/hit.d.ts +2 -0
  14. package/dist/entities/hit.js +2 -0
  15. package/dist/entities/index.d.ts +7 -0
  16. package/dist/google/errors.d.ts +18 -0
  17. package/dist/google/errors.js +71 -0
  18. package/dist/google/index.d.ts +2 -0
  19. package/dist/google/index.js +2 -0
  20. package/dist/google/pages.d.ts +11 -0
  21. package/dist/google/pages.js +23 -0
  22. package/dist/kit/index.d.ts +1 -0
  23. package/dist/kit/index.js +1 -0
  24. package/dist/kit/sync-after-install.d.ts +26 -0
  25. package/dist/kit/sync-after-install.js +72 -0
  26. package/dist/mcp/agent.d.ts +3 -0
  27. package/dist/mcp/agent.js +5 -4
  28. package/dist/mcp/app-server.js +4 -1
  29. package/dist/mcp/bot/server.d.ts +2 -0
  30. package/dist/mcp/bot/server.js +2 -0
  31. package/dist/mcp/server.js +4 -1
  32. package/dist/meetings/answers.d.ts +11 -1
  33. package/dist/meetings/answers.js +17 -0
  34. package/dist/meetings/index.d.ts +3 -3
  35. package/dist/meetings/index.js +1 -1
  36. package/dist/meetings/pull.js +3 -0
  37. package/dist/meetings/source.d.ts +3 -1
  38. package/dist/meetings/store.d.ts +24 -0
  39. package/dist/meetings/store.js +1 -0
  40. package/dist/meetings/transcript-store.d.ts +9 -1
  41. package/dist/oauth/requests.js +22 -4
  42. package/dist/services/search-all.d.ts +2 -0
  43. package/dist/services/search-all.js +30 -11
  44. package/dist/store/sqlite/meeting-documents.d.ts +13 -0
  45. package/dist/store/sqlite/meeting-documents.js +110 -0
  46. package/dist/store/sqlite/meetings.js +5 -2
  47. package/package.json +5 -1
  48. package/dist/store/sqlite/meeting-transcript-documents.d.ts +0 -10
  49. package/dist/store/sqlite/meeting-transcript-documents.js +0 -52
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-core",
3
- "version": "0.653.0",
3
+ "version": "0.655.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": "Apache-2.0",
6
6
  "author": "Viacheslav Ptsarev",
@@ -187,6 +187,10 @@
187
187
  "types": "./dist/sftp/index.d.ts",
188
188
  "default": "./dist/sftp/index.js"
189
189
  },
190
+ "./google": {
191
+ "types": "./dist/google/index.d.ts",
192
+ "default": "./dist/google/index.js"
193
+ },
190
194
  "./oauth": {
191
195
  "types": "./dist/oauth/index.d.ts",
192
196
  "default": "./dist/oauth/index.js"
@@ -1,10 +0,0 @@
1
- import type { MeetingTranscriptDocumentStore } from "../../meetings/index.js";
2
- import type { CacheDatabase } from "../driver.js";
3
- import type { StoreContext } from "./open.js";
4
- /**
5
- * The meeting's transcript is this Drive file: an `attached` link to the file's document, waiting by its Drive id when
6
- * Drive has not stored it yet. Drive's later import resolves it (`linkAttached`), so either order ends in one link.
7
- * A new transcript version that names another file replaces the old link; a replay of an old version keeps it.
8
- */
9
- export declare const attachTranscriptDocument: (database: CacheDatabase, meetingId: number, fileId: string, now: number, replaces: boolean) => void;
10
- export declare const meetingTranscriptDocumentsOver: ({ database }: StoreContext) => MeetingTranscriptDocumentStore;
@@ -1,52 +0,0 @@
1
- import { driveDocumentOf, driveFileTarget } from "./files.js";
2
- import { read } from "./transaction.js";
3
- const TRANSCRIPT_ROLE = "transcript";
4
- /**
5
- * The meeting's transcript is this Drive file: an `attached` link to the file's document, waiting by its Drive id when
6
- * Drive has not stored it yet. Drive's later import resolves it (`linkAttached`), so either order ends in one link.
7
- * A new transcript version that names another file replaces the old link; a replay of an old version keeps it.
8
- */
9
- export const attachTranscriptDocument = (database, meetingId, fileId, now, replaces) => {
10
- const file = fileId.trim();
11
- if (!file)
12
- return;
13
- const target = driveFileTarget(file);
14
- if (replaces)
15
- database
16
- .prepare("DELETE FROM links WHERE from_type = 'meeting' AND from_id = ? AND kind = 'attached' AND role = ? " +
17
- "AND target_text <> ?")
18
- .run(meetingId, TRANSCRIPT_ROLE, target);
19
- const held = database
20
- .prepare("SELECT id, to_id FROM links WHERE from_type = 'meeting' AND from_id = ? AND kind = 'attached' AND target_text = ?")
21
- .get(meetingId, target);
22
- if (!held) {
23
- database
24
- .prepare(`INSERT INTO links (from_type, from_id, to_type, to_id, kind, source, target_text, role, confirmed, author,
25
- created_at, updated_at) VALUES ('meeting', ?, 'document', ?, 'attached', 'meeting', ?, ?, 1, 'rule', ?, ?)`)
26
- .run(meetingId, driveDocumentOf(database, file), target, TRANSCRIPT_ROLE, now, now);
27
- return;
28
- }
29
- if (held.to_id != null)
30
- return;
31
- const document = driveDocumentOf(database, file);
32
- if (document !== null)
33
- database.prepare("UPDATE links SET to_id = ?, updated_at = ? WHERE id = ?").run(document, now, Number(held.id));
34
- };
35
- export const meetingTranscriptDocumentsOver = ({ database }) => ({
36
- async transcriptMeetings(documentIds) {
37
- if (!documentIds.length)
38
- return new Map();
39
- return read(database, () => {
40
- const rows = database
41
- .prepare(`SELECT l.to_id AS document_id, l.from_id AS meeting_id FROM links l JOIN meetings m ON m.id = l.from_id
42
- WHERE l.kind = 'attached' AND l.from_type = 'meeting' AND l.to_type = 'document' AND l.role = ?
43
- AND m.deleted_at IS NULL AND l.to_id IN (SELECT value FROM json_each(?)) ORDER BY l.id`)
44
- .all(TRANSCRIPT_ROLE, JSON.stringify(documentIds));
45
- const found = new Map();
46
- for (const row of rows)
47
- if (!found.has(Number(row.document_id)))
48
- found.set(Number(row.document_id), Number(row.meeting_id));
49
- return found;
50
- });
51
- },
52
- });