@plosson/agentio 0.2.2 → 0.2.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plosson/agentio",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "CLI for LLM agents to interact with communication and tracking services",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -275,26 +275,28 @@ Query Syntax Examples:
275
275
  });
276
276
 
277
277
  gmail
278
- .command('archive <message-id>')
279
- .description('Archive a message')
278
+ .command('archive <message-id...>')
279
+ .description('Archive one or more messages')
280
280
  .option('--profile <name>', 'Profile name')
281
- .action(async (messageId: string, options) => {
281
+ .action(async (messageIds: string[], options) => {
282
282
  try {
283
283
  const { client } = await getGmailClient(options.profile);
284
- await client.archive(messageId);
285
- printArchived(messageId);
284
+ for (const messageId of messageIds) {
285
+ await client.archive(messageId);
286
+ printArchived(messageId);
287
+ }
286
288
  } catch (error) {
287
289
  handleError(error);
288
290
  }
289
291
  });
290
292
 
291
293
  gmail
292
- .command('mark <message-id>')
293
- .description('Mark message as read or unread')
294
+ .command('mark <message-id...>')
295
+ .description('Mark one or more messages as read or unread')
294
296
  .option('--profile <name>', 'Profile name')
295
297
  .option('--read', 'Mark as read')
296
298
  .option('--unread', 'Mark as unread')
297
- .action(async (messageId: string, options) => {
299
+ .action(async (messageIds: string[], options) => {
298
300
  try {
299
301
  if (!options.read && !options.unread) {
300
302
  throw new CliError('INVALID_PARAMS', 'Specify --read or --unread');
@@ -304,8 +306,10 @@ Query Syntax Examples:
304
306
  }
305
307
 
306
308
  const { client } = await getGmailClient(options.profile);
307
- await client.mark(messageId, options.read);
308
- printMarked(messageId, options.read);
309
+ for (const messageId of messageIds) {
310
+ await client.mark(messageId, options.read);
311
+ printMarked(messageId, options.read);
312
+ }
309
313
  } catch (error) {
310
314
  handleError(error);
311
315
  }