openmates 0.15.0-alpha.24 → 0.15.0-alpha.26

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.
@@ -58328,7 +58328,7 @@ async function handleTasks(client, subcommand, rest, flags) {
58328
58328
  return;
58329
58329
  }
58330
58330
  const masterKey = client.getMasterKeyBytes();
58331
- const scope = taskScopeFromFlags(flags);
58331
+ const scope = taskScopeFromFlags(flags, masterKey);
58332
58332
  if (subcommand === "list" || subcommand === "status") {
58333
58333
  if (subcommand === "status" && rest[0]) {
58334
58334
  const task = await resolveTask(client, masterKey, rest[0], scope);
@@ -58358,12 +58358,14 @@ async function handleTasks(client, subcommand, rest, flags) {
58358
58358
  const input = await buildCreateUserTaskInput(masterKey, {
58359
58359
  title,
58360
58360
  description: typeof flags.description === "string" ? flags.description : "",
58361
+ labels: labelFlags(flags),
58361
58362
  status: normalizeTaskStatus(typeof flags.status === "string" ? flags.status : void 0),
58362
58363
  assign: taskAssignFlag(flags),
58363
58364
  chatId: typeof flags.chat === "string" ? flags.chat : null,
58364
58365
  projectIds: splitCsvFlag(flags.project ?? flags.projects),
58365
58366
  planId: typeof flags.plan === "string" ? flags.plan : null,
58366
- dueAt: parseDueAt(flags.due)
58367
+ dueAt: parseDueAt(flags.due),
58368
+ priority: typeof flags.priority === "string" ? normalizeTaskPriority(flags.priority) : void 0
58367
58369
  });
58368
58370
  const created = await client.createUserTask(input);
58369
58371
  printTaskOutput(await decryptUserTask(created, masterKey), flags);
@@ -58376,11 +58378,15 @@ async function handleTasks(client, subcommand, rest, flags) {
58376
58378
  const patch = await buildUpdateUserTaskInput(task, masterKey, {
58377
58379
  title: typeof flags.title === "string" ? flags.title : void 0,
58378
58380
  description: typeof flags.description === "string" ? flags.description : void 0,
58381
+ labels: flags.label || flags.labels || flags.tag || flags.tags ? labelFlags(flags) : void 0,
58382
+ addLabels: labelFlags(flags, "add-label", "add-labels", "add-tag", "add-tags"),
58383
+ removeLabels: labelFlags(flags, "remove-label", "remove-labels", "remove-tag", "remove-tags"),
58379
58384
  status: normalizeTaskStatus(typeof flags.status === "string" ? flags.status : void 0),
58380
58385
  assign: taskAssignFlag(flags),
58381
58386
  chatId: flags.chat === true ? null : typeof flags.chat === "string" ? flags.chat : void 0,
58382
58387
  projectIds: flags.project || flags.projects ? splitCsvFlag(flags.project ?? flags.projects) : void 0,
58383
- planId: flags.plan === true ? null : typeof flags.plan === "string" ? flags.plan : void 0
58388
+ planId: flags.plan === true ? null : typeof flags.plan === "string" ? flags.plan : void 0,
58389
+ priority: typeof flags.priority === "string" ? normalizeTaskPriority(flags.priority) : void 0
58384
58390
  });
58385
58391
  const updated = await client.updateUserTask(task.taskId, patch);
58386
58392
  printTaskOutput(await decryptUserTask(updated, masterKey), flags);
@@ -58433,16 +58439,18 @@ async function handleTasks(client, subcommand, rest, flags) {
58433
58439
  }
58434
58440
  throw new Error(`Unknown tasks command '${subcommand}'. Run 'openmates tasks --help'.`);
58435
58441
  }
58436
- function taskScopeFromFlags(flags) {
58442
+ function taskScopeFromFlags(flags, masterKey) {
58437
58443
  return {
58438
58444
  status: normalizeTaskStatus(typeof flags.status === "string" ? flags.status : void 0),
58439
58445
  chatId: typeof flags.chat === "string" ? flags.chat : void 0,
58440
58446
  projectId: typeof flags.project === "string" ? flags.project : void 0,
58441
- planId: typeof flags.plan === "string" ? flags.plan : void 0
58447
+ planId: typeof flags.plan === "string" ? flags.plan : void 0,
58448
+ labelHashes: labelHashes(masterKey, labelFlags(flags)),
58449
+ priority: typeof flags.priority === "string" ? normalizeTaskPriority(flags.priority) : void 0
58442
58450
  };
58443
58451
  }
58444
58452
  async function loadTasks(client, masterKey, scope) {
58445
- const records = await client.listUserTasks({ status: scope.status, chatId: scope.chatId, projectId: scope.projectId });
58453
+ const records = await client.listUserTasks({ status: scope.status, chatId: scope.chatId, projectId: scope.projectId, labelHashes: scope.labelHashes, priority: scope.priority });
58446
58454
  const tasks = await decryptUserTasks(records, masterKey);
58447
58455
  return scope.planId ? tasks.filter((task) => task.planId === scope.planId) : tasks;
58448
58456
  }
@@ -58463,6 +58471,7 @@ function taskToJson(task) {
58463
58471
  short_id: task.shortId,
58464
58472
  title: task.title,
58465
58473
  description: task.description,
58474
+ labels: task.labels,
58466
58475
  tags: task.tags,
58467
58476
  latest_instruction: task.latestInstruction,
58468
58477
  status: task.status,
@@ -58473,6 +58482,7 @@ function taskToJson(task) {
58473
58482
  plan_id: task.planId,
58474
58483
  due_at: task.dueAt,
58475
58484
  priority: task.priority,
58485
+ priority_level: task.priorityLevel,
58476
58486
  position: task.position,
58477
58487
  queue_state: task.queueState,
58478
58488
  blocked_reason_code: task.blockedReasonCode,
@@ -58488,6 +58498,10 @@ function taskTitleFromFlagsOrRest(flags, rest) {
58488
58498
  function taskAssignFlag(flags) {
58489
58499
  return typeof flags.assign === "string" ? flags.assign : typeof flags.assignee === "string" ? flags.assignee : void 0;
58490
58500
  }
58501
+ function labelFlags(flags, ...names) {
58502
+ const keys = names.length > 0 ? names : ["label", "labels", "tag", "tags"];
58503
+ return normalizeLabels(keys.flatMap((key) => splitCsvFlag(flags[key])));
58504
+ }
58491
58505
  async function handleRemoteAccess(client, subcommand, rest, flags) {
58492
58506
  if (!subcommand || subcommand === "help" || flags.help === true) {
58493
58507
  printRemoteAccessHelp();
@@ -62592,7 +62606,7 @@ async function sendMessageStreaming(client, params, redactor) {
62592
62606
  uploadResult,
62593
62607
  fe.displayName,
62594
62608
  session,
62595
- { chatId: params.chatId, requestId: uploadResult.embed_id }
62609
+ { chatId: params.chatId, requestId: fe.embed.embedId }
62596
62610
  ) : null;
62597
62611
  const embedRef = fe.embed.embedRef ?? createEmbedRef(embedType, uploadResult.embed_id);
62598
62612
  fe.embed.embedRef = embedRef;
@@ -62645,7 +62659,6 @@ async function sendMessageStreaming(client, params, redactor) {
62645
62659
  fe.embed.content = toonEncodeContent(uploadedContent);
62646
62660
  fe.embed.status = embedType === "pdf" ? "processing" : "finished";
62647
62661
  fe.embed.contentHash = uploadResult.content_hash;
62648
- fe.embed.embedId = uploadResult.embed_id;
62649
62662
  fe.referenceBlock = createEmbedReferenceBlock(embedRef);
62650
62663
  if (!params.json) {
62651
62664
  process.stderr.write(
@@ -64518,11 +64531,11 @@ Examples:
64518
64531
  }
64519
64532
  function printTasksHelp() {
64520
64533
  console.log(`Tasks commands:
64521
- openmates tasks list [--status <status>] [--chat <id>] [--project <id>] [--json]
64522
- openmates tasks board [--chat <id>] [--project <id>] [--json]
64534
+ openmates tasks list [--status <status>] [--chat <id>] [--project <id>] [--label <label>] [--priority <level>] [--json]
64535
+ openmates tasks board [--chat <id>] [--project <id>] [--label <label>] [--priority <level>] [--json]
64523
64536
  openmates tasks show <task-id|short-id> [--json]
64524
- openmates tasks create --title <title> [--description <text>] [--assign user|ai] [--chat <id>] [--project <id>] [--status <status>] [--due <date>] [--json]
64525
- openmates tasks edit <task-id|short-id> [--title <title>] [--description <text>] [--assign user|ai] [--status <status>] [--json]
64537
+ openmates tasks create --title <title> [--description <text>] [--assign user|ai] [--chat <id>] [--project <id>] [--label <label>] [--priority <level>] [--status <status>] [--due <date>] [--json]
64538
+ openmates tasks edit <task-id|short-id> [--title <title>] [--description <text>] [--label <label>] [--add-label <label>] [--remove-label <label>] [--priority <level>] [--assign user|ai] [--status <status>] [--json]
64526
64539
  openmates tasks delete <task-id|short-id> --confirm [--json]
64527
64540
  openmates tasks start <task-id|short-id> [--json]
64528
64541
  openmates tasks status [<task-id|short-id>] [--json]
@@ -64540,9 +64553,13 @@ Chat-scoped aliases:
64540
64553
  Statuses:
64541
64554
  backlog, todo, in_progress, blocked, done
64542
64555
 
64556
+ Priority levels:
64557
+ none, low, medium, high, urgent
64558
+
64543
64559
  Notes:
64544
64560
  Task IDs accept full task_id or human short IDs such as OM-6.
64545
- Normal output decrypts task title and description locally; use --json for machine-readable plaintext fields.`);
64561
+ Labels organize tasks privately. --tag, --tags, --add-tag, and --remove-tag are accepted aliases.
64562
+ Normal output decrypts task title, description, and labels locally; use --json for machine-readable plaintext fields.`);
64546
64563
  }
64547
64564
  function printDraftsHelp() {
64548
64565
  console.log(`Draft commands:
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getExtForLang,
4
4
  serializeToYaml
5
- } from "./chunk-F4JZMA6W.js";
5
+ } from "./chunk-SK2NK7LX.js";
6
6
  import "./chunk-AXNRPVLE.js";
7
7
  export {
8
8
  getExtForLang,
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  reconcileAuthoritativeChats,
19
19
  renderSupportInfo,
20
20
  serializeToYaml
21
- } from "./chunk-F4JZMA6W.js";
21
+ } from "./chunk-SK2NK7LX.js";
22
22
  import "./chunk-AXNRPVLE.js";
23
23
  export {
24
24
  APP_SKILL_METADATA,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.15.0-alpha.24",
3
+ "version": "0.15.0-alpha.26",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",