@rikaidev/yomi 0.6.0 → 0.6.1

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.
@@ -200,11 +200,12 @@ export class CredentialStore {
200
200
  this.filePath = fallbackFilePath;
201
201
  this.cache = new Map();
202
202
  this.loaded = false;
203
- // Desktop background bridges are deliberately read-only. They must use
204
- // the user-isolated credential file and never invoke `security` to mutate
205
- // the Keychain during a 15s poll (which causes repeated macOS prompts).
203
+ // The user-isolated credential file (0600 mode) is fast, reliable, and avoids
204
+ // triggering disruptive macOS SecurityAgent GUI prompts. Mutating the Keychain
205
+ // via `security` CLI is opt-in (via YOMI_USE_KEYCHAIN=1) rather than default.
206
206
  this.secureStorageEnabled =
207
207
  process.platform === 'darwin' &&
208
+ process.env.YOMI_USE_KEYCHAIN === '1' &&
208
209
  process.env.YOMI_NO_KEYCHAIN !== '1' &&
209
210
  process.env.YOMI_READ_ONLY_SESSION !== '1';
210
211
  this.keychainService = this.secureStorageEnabled
@@ -233,8 +234,12 @@ export class CredentialStore {
233
234
  }
234
235
  }
235
236
  catch { }
236
- if (this.secureStorageEnabled && this.keychainService) {
237
- const result = await this.keychainService.getCredential(this.keychainAccount);
237
+ const keychain = this.keychainService ??
238
+ (process.platform === 'darwin' && process.env.YOMI_NO_KEYCHAIN !== '1'
239
+ ? getKeychainService()
240
+ : null);
241
+ if (keychain) {
242
+ const result = await keychain.getCredential(this.keychainAccount);
238
243
  if (result.success && result.password) {
239
244
  try {
240
245
  const fs = await import('node:fs/promises');
@@ -247,7 +252,6 @@ export class CredentialStore {
247
252
  catch { }
248
253
  return result.password;
249
254
  }
250
- return null;
251
255
  }
252
256
  return null;
253
257
  }
@@ -79,19 +79,33 @@ description: Manage and interact with user's LINE account via Yomi E2EE MCP Serv
79
79
 
80
80
  # Yomi LINE Copilot Skill
81
81
 
82
- You have real-time access to the user's LINE account through the Yomi Letter-Sealing E2EE MCP Server.
82
+ You have real-time access to the user's LINE account through the Yomi Letter-Sealing E2EE server. Discover the current tools and complete a scoped read before claiming that access; the names below describe expected capabilities, not proof they are connected.
83
83
 
84
- ## Capabilities
85
- 1. \`get_recent_messages\`: Retrieve recent decrypted messages.
86
- 2. \`search_messages\`: Full-text search across conversations.
87
- 3. \`list_contacts\`: Retrieve friends and group information.
88
- 4. \`send_message\`: Send messages to chats with confirmation.
84
+ ## Reading
85
+ 1. \`list_conversations\`: List the chats the account can see.
86
+ 2. \`get_chat_messages\`: Read the recent decrypted messages of one chat.
87
+ 3. \`collect_messages\`: Collect messages across several chats.
88
+ 4. \`search_messages\`: Full-text search across conversations.
89
+ 5. \`get_unread_digest\`: Summarize what is unread.
90
+ 6. \`get_insight\`: Ask the account model for an insight about the messages.
91
+ 7. \`find_contact\` and \`list_contacts\`: Resolve a person or a group to its chat id.
92
+
93
+ ## Writing
94
+ 1. \`send_message\`: Send a text message to a chat.
95
+ 2. \`unsend_message\`: Recall a message the account sent.
96
+
97
+ ## Operating the server
98
+ - The Model Context Protocol server speaks stdio and lives only while its stdin stays open. A command that closes stdin ends the server, so keep the pipe open for as long as the session needs it.
99
+ - The \`yomi messages\` CLI reports an empty list; only the Model Context Protocol tools above return real messages.
100
+ - \`unsend_message\` is irreversible, and LINE accepts a recall only within one hour of sending. A recall past that window is refused by LINE itself, not by the tool.
89
101
 
90
102
  ## Guidelines
91
103
  - Summarize conversations concisely and highlight action items or mentions needing attention.
92
- - When drafting a reply, ask the user for confirmation before executing \`send_message\`.
104
+ - Drafting does not authorize sending. Require explicit sending authorization for the recipient and content; reuse that exact authorization when already given.
105
+ - A recall writes to the conversation as well, so it needs the same explicit authorization as sending.
93
106
  `;
94
107
  const skillDirs = [
108
+ join(home, '.agents', 'skills', 'yomi-line-manager'),
95
109
  join(home, '.claude', 'skills', 'yomi-line-manager'),
96
110
  join(home, '.gemini', 'antigravity-cli', 'builtin', 'skills', 'yomi-line-manager'),
97
111
  join(home, '.codex', 'skills', 'yomi-line-manager'),
package/dist/version.js CHANGED
@@ -4,4 +4,4 @@
4
4
  * virtual filesystem). MUST stay equal to the "version" field in
5
5
  * package.json — the test in version.test.ts enforces that.
6
6
  */
7
- export const YOMI_VERSION = '0.6.0';
7
+ export const YOMI_VERSION = '0.6.1';
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "engines": {
4
4
  "node": ">=22.13.0 <23.0.0 || >=23.4.0"
5
5
  },
6
- "version": "0.6.0",
6
+ "version": "0.6.1",
7
7
  "description": "Open-source personal LINE MCP server for AI agents. Read, reply, send images, and search LINE conversations locally with Letter-Sealing E2EE.",
8
8
  "type": "module",
9
9
  "license": "MIT",
@@ -67,7 +67,7 @@
67
67
  "desktop:windows:qc": "npm run typecheck && npm run lint && npm run lint:comments && cargo test --manifest-path desktop/Cargo.toml && npm run desktop:windows:lint",
68
68
  "desktop:windows:i18n": "node scripts/windows-i18n-harness.mjs",
69
69
  "desktop:windows:harness": "node scripts/windows-desktop-harness.mjs",
70
- "version": "node scripts/sync-version.mjs && git add src/version.ts",
70
+ "version": "node scripts/sync-version.mjs && git add src/version.ts desktop/mac-native/Info.plist desktop/Cargo.toml",
71
71
  "prepublishOnly": "npm run build",
72
72
  "test:fixture-hygiene": "node scripts/test-fixture-hygiene.mjs",
73
73
  "desktop:install-local": "bash scripts/install-swift-desktop-local.sh"
package/run.mjs CHANGED
@@ -268,6 +268,29 @@ switch (cmd) {
268
268
  }));
269
269
  process.exit(0);
270
270
  }
271
+ case 'unsend-message':
272
+ case 'unsend': {
273
+ const messageId = args[1];
274
+ if (!messageId) {
275
+ console.error(JSON.stringify({ error: 'messageId required' }));
276
+ process.exit(1);
277
+ }
278
+ const { LineProtocolService } = await load('line/core/service');
279
+ const service = new LineProtocolService();
280
+ if (!(await service.resumeSession())) process.exit(1);
281
+ try {
282
+ const res = await service.unsendMessage(messageId);
283
+ console.log(JSON.stringify({
284
+ unsent: true,
285
+ messageId,
286
+ ...res,
287
+ }));
288
+ process.exit(0);
289
+ } catch (err) {
290
+ console.error(JSON.stringify({ error: err.message || String(err) }));
291
+ process.exit(1);
292
+ }
293
+ }
271
294
  case 'send-image': {
272
295
  const chatId = args[1];
273
296
  const imagePath = args[2];
@@ -419,6 +442,7 @@ Usage:
419
442
  yomi Start the MCP stdio server (default)
420
443
  yomi serve Same as above, explicit
421
444
  yomi login [...] Run the passwordless login flow in a terminal
445
+ yomi unsend <id> Retract (unsend) a message sent within the last hour
422
446
  yomi help Show this help
423
447
  yomi version Print version
424
448