openmates 0.18.0-alpha.32 → 0.18.0-alpha.33

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.
@@ -765,7 +765,7 @@ async function buildCreateUserTaskInput(masterKey, input) {
765
765
  plaintext_description: assignee.assigneeType === "openmates" ? input.description : void 0
766
766
  };
767
767
  }
768
- async function buildUpdateUserTaskInput(task, masterKey, input) {
768
+ async function buildUpdateUserTaskInput(task, masterKey, input, projectContext) {
769
769
  if (input.chatId && input.externalChat) throw new Error("A task cannot use both native chat and external chat context.");
770
770
  const taskKey = await taskKeyFromRecord(task.encrypted, masterKey);
771
771
  const patch = { version: task.version, updated_at: nowSeconds() };
@@ -802,8 +802,43 @@ async function buildUpdateUserTaskInput(task, masterKey, input) {
802
802
  patch.encrypted_external_chat_title = await encryptWithAesGcmCombined(input.externalChat.title ?? "", taskKey);
803
803
  }
804
804
  if (input.projectIds !== void 0) {
805
- patch.linked_project_ids = input.projectIds;
806
- patch.encrypted_linked_project_ids = await encryptWithAesGcmCombined(JSON.stringify(input.projectIds), taskKey);
805
+ if (!projectContext) throw new Error("Project relinking requires task wrappers and authorized project keys.");
806
+ const projectIds = [...new Set(input.projectIds)];
807
+ const hashId = (id) => createHash2("sha256").update(id).digest("hex");
808
+ const chatId = input.externalChat ? null : input.chatId !== void 0 ? input.chatId : task.primaryChatId;
809
+ const planId = input.planId !== void 0 ? input.planId : task.planId;
810
+ const wrappers = [{
811
+ key_type: "master",
812
+ encrypted_task_key: task.encrypted.encrypted_task_key,
813
+ created_at: nowSeconds()
814
+ }];
815
+ for (const wrapper of projectContext.keyWrappers) {
816
+ if (wrapper.key_type === "master" || wrapper.key_type === "project") continue;
817
+ if (wrapper.key_type === "chat" && (!chatId || wrapper.hashed_chat_id !== hashId(chatId))) continue;
818
+ if (wrapper.key_type === "plan" && (!planId || wrapper.hashed_plan_id !== hashId(planId))) continue;
819
+ if (!["chat", "plan", "team"].includes(String(wrapper.key_type))) throw new Error("Unsupported task key wrapper type.");
820
+ if (typeof wrapper.encrypted_task_key !== "string" || !wrapper.encrypted_task_key) throw new Error("Missing encrypted task wrapper key.");
821
+ const retained = {};
822
+ for (const field of ["key_type", "encrypted_task_key", "hashed_chat_id", "hashed_plan_id", "hashed_team_id", "team_key_epoch", "created_at", "expires_at"]) {
823
+ if (wrapper[field] !== void 0) retained[field] = wrapper[field];
824
+ }
825
+ wrappers.push(retained);
826
+ }
827
+ if (chatId && !wrappers.some((wrapper) => wrapper.key_type === "chat")) throw new Error("Missing required primary chat key wrapper.");
828
+ if (planId && !wrappers.some((wrapper) => wrapper.key_type === "plan")) throw new Error("Missing required plan key wrapper.");
829
+ for (const projectId of projectIds) {
830
+ const projectKey = projectContext.projectKeys.get(projectId);
831
+ if (!projectKey) throw new Error(`Missing authorized project key for ${projectId}.`);
832
+ wrappers.push({
833
+ key_type: "project",
834
+ hashed_project_id: hashId(projectId),
835
+ encrypted_task_key: await encryptBytesWithAesGcm(taskKey, projectKey),
836
+ created_at: nowSeconds()
837
+ });
838
+ }
839
+ patch.key_wrappers = wrappers;
840
+ patch.linked_project_ids = projectIds;
841
+ patch.encrypted_linked_project_ids = await encryptWithAesGcmCombined(JSON.stringify(projectIds), taskKey);
807
842
  }
808
843
  if (input.planId !== void 0) patch.plan_id = input.planId;
809
844
  const priority = normalizeTaskPriority(input.priority);
@@ -13552,6 +13587,25 @@ var OpenMatesClient = class _OpenMatesClient {
13552
13587
  }
13553
13588
  return response.data.proposed_tasks;
13554
13589
  }
13590
+ /** Resolve membership-authorized Project keys before replacing task wrappers. */
13591
+ async prepareUserTaskUpdate(task, input, context = {}) {
13592
+ const masterKey = this.getMasterKeyBytes();
13593
+ if (input.projectIds === void 0) return buildUpdateUserTaskInput(task, masterKey, input);
13594
+ this.requireSession();
13595
+ if (this.resolveTeamContext(context)) throw new Error("Team Task project relinking is not supported by the task key-wrapper endpoint.");
13596
+ await taskKeyFromRecord(task.encrypted, masterKey);
13597
+ const response = await this.http.get(
13598
+ `/v1/user-tasks/${encodeURIComponent(task.taskId)}/key-wrappers`,
13599
+ this.getCliRequestHeaders()
13600
+ );
13601
+ if (!response.ok || !Array.isArray(response.data.key_wrappers)) throw new Error("Unable to load required task key wrappers.");
13602
+ const projectKeys = /* @__PURE__ */ new Map();
13603
+ for (const projectId of new Set(input.projectIds)) {
13604
+ const detail = await this.getProject(projectId, context);
13605
+ projectKeys.set(projectId, await this.decryptProjectKey(detail.project, context));
13606
+ }
13607
+ return buildUpdateUserTaskInput(task, masterKey, input, { keyWrappers: response.data.key_wrappers, projectKeys });
13608
+ }
13555
13609
  async updateUserTask(taskId, input, context = {}) {
13556
13610
  this.requireSession();
13557
13611
  const teamId = this.resolveTeamContext(context);
@@ -75924,7 +75978,7 @@ async function handleTasks(client, subcommand, rest, flags, redactor) {
75924
75978
  const project = await requiredResolvedProject(client, masterKey, requiredStringFlag(rest[1], "<project-id>"), flags);
75925
75979
  const task = await requiredResolvedTask(client, masterKey, subcommand, scope, "add-to-project");
75926
75980
  const linkedProjectIds = appendUniqueId(task.linkedProjectIds, project.projectId);
75927
- const patch = await buildUpdateUserTaskInput(task, masterKey, { projectIds: linkedProjectIds });
75981
+ const patch = await client.prepareUserTaskUpdate(task, { projectIds: linkedProjectIds }, scope);
75928
75982
  const updated = flags["delivery-id"] ? await queuedTaskMutation(client, flags, { kind: "update", taskId: task.taskId, input: patch, ownerHash: task.encrypted.external_chat_lookup_hash ?? void 0 }, scope.teamId) : await client.updateUserTask(task.taskId, patch, { teamId: scope.teamId, personal: scope.personal });
75929
75983
  if (!updated) return;
75930
75984
  printTaskOutput(await decryptUserTask(updated, masterKey), flags);
@@ -75934,7 +75988,7 @@ async function handleTasks(client, subcommand, rest, flags, redactor) {
75934
75988
  rejectRemoteCopyFlags(flags);
75935
75989
  const project = await requiredResolvedProject(client, masterKey, requiredStringFlag(rest[1], "<project-id>"), flags);
75936
75990
  const task = await requiredResolvedTask(client, masterKey, subcommand, scope, "remove-from-project");
75937
- const patch = await buildUpdateUserTaskInput(task, masterKey, { projectIds: removeId(task.linkedProjectIds, project.projectId) });
75991
+ const patch = await client.prepareUserTaskUpdate(task, { projectIds: removeId(task.linkedProjectIds, project.projectId) }, scope);
75938
75992
  const updated = await client.updateUserTask(task.taskId, patch, { teamId: scope.teamId, personal: scope.personal });
75939
75993
  printTaskOutput(await decryptUserTask(updated, masterKey), flags);
75940
75994
  return;
@@ -76067,7 +76121,7 @@ async function handleTasks(client, subcommand, rest, flags, redactor) {
76067
76121
  const id = rest[0];
76068
76122
  if (!id) throw new Error("Missing task ID. Usage: openmates tasks edit <task-id> [--title ...]");
76069
76123
  const task = await resolveTask(client, masterKey, id, taskEditLookupScope(scope));
76070
- const patch = await buildUpdateUserTaskInput(task, masterKey, await resolveTaskUpdateOptions(client, masterKey, flags, {
76124
+ const patch = await client.prepareUserTaskUpdate(task, await resolveTaskUpdateOptions(client, masterKey, flags, {
76071
76125
  title: typeof flags.title === "string" ? flags.title : void 0,
76072
76126
  description: typeof flags.description === "string" ? flags.description : void 0,
76073
76127
  labels: flags.label || flags.labels || flags.tag || flags.tags ? labelFlags(flags) : void 0,
@@ -76081,7 +76135,7 @@ async function handleTasks(client, subcommand, rest, flags, redactor) {
76081
76135
  planId: flags.plan === true ? null : typeof flags.plan === "string" ? flags.plan : void 0,
76082
76136
  priority: typeof flags.priority === "string" ? normalizeTaskPriority(flags.priority) : void 0,
76083
76137
  slug: typeof flags.slug === "string" ? flags.slug : void 0
76084
- }));
76138
+ }), scope);
76085
76139
  const updated = flags["delivery-id"] ? await queuedTaskMutation(client, flags, { kind: "update", taskId: task.taskId, input: patch, ownerHash: task.encrypted.external_chat_lookup_hash ?? void 0 }, scope.teamId) : await client.updateUserTask(task.taskId, patch, { teamId: scope.teamId, personal: scope.personal });
76086
76140
  if (updated) printTaskOutput(await decryptUserTask(updated, masterKey), flags);
76087
76141
  return;
@@ -456,6 +456,116 @@ interface ProtonLocalConnectorRegistration {
456
456
  };
457
457
  }
458
458
 
459
+ declare const PRIORITY_LEVELS: readonly ["none", "low", "medium", "high", "urgent"];
460
+ type TaskPriorityLevel = typeof PRIORITY_LEVELS[number];
461
+ interface DecryptedUserTask {
462
+ taskId: string;
463
+ source?: string;
464
+ projectionKind?: string | null;
465
+ workflowId?: string | null;
466
+ workflowRunId?: string | null;
467
+ triggerId?: string | null;
468
+ canCancel?: boolean;
469
+ canDelete?: boolean;
470
+ shortId: string;
471
+ slug: string;
472
+ title: string;
473
+ description: string;
474
+ labels: string[];
475
+ tags: string[];
476
+ latestInstruction: string;
477
+ status: UserTaskStatus;
478
+ assigneeType: UserTaskAssigneeType;
479
+ assigneeIdentity: UserTaskAssigneeIdentity | null;
480
+ assigneeHash: string | null;
481
+ primaryChatId: string | null;
482
+ externalChat: ExternalChatContext | null;
483
+ linkedProjectIds: string[];
484
+ planId: string | null;
485
+ dueAt: number | null;
486
+ priority: number;
487
+ priorityLevel: TaskPriorityLevel;
488
+ position: number;
489
+ queueState: string;
490
+ blockedReasonCode: string | null;
491
+ blockedReason: string;
492
+ aiExecutionState: string | null;
493
+ readOnly?: boolean;
494
+ version: number;
495
+ encrypted: UserTaskRecord;
496
+ }
497
+ interface TaskActivityCreateOptions {
498
+ entryId?: string;
499
+ message: string;
500
+ embedRefs?: string[];
501
+ embedKeyMaterial?: string;
502
+ createdAt?: number;
503
+ }
504
+ interface DecryptedTaskActivityEntry {
505
+ entryId: string;
506
+ taskId: string;
507
+ kind: UserTaskActivityRecord["kind"];
508
+ actorType: string;
509
+ actorHash: string;
510
+ actorIdentity: UserTaskAssigneeIdentity | null;
511
+ actorDisplayName: string | null;
512
+ actorProfileImageUrl: string | null;
513
+ authorHash: string | null;
514
+ eventType: string;
515
+ sourceSurface: string;
516
+ previousStatus: UserTaskStatus | null;
517
+ nextStatus: UserTaskStatus | null;
518
+ createdAt: number;
519
+ deletedAt: number | null;
520
+ deletedByHash: string | null;
521
+ deletedByDisplayName: string | null;
522
+ message?: string;
523
+ embedKeyMaterial?: string;
524
+ embedRefs: string[];
525
+ }
526
+ interface TaskCreateOptions {
527
+ /** Stable ID is used only by validated local recovery restoration. */
528
+ taskId?: string;
529
+ title: string;
530
+ description?: string;
531
+ labels?: string[];
532
+ tags?: string[];
533
+ status?: UserTaskStatus;
534
+ assign?: string;
535
+ chatId?: string | null;
536
+ externalChat?: ExternalChatContext;
537
+ projectIds?: string[];
538
+ planId?: string | null;
539
+ dueAt?: number | null;
540
+ priority?: TaskPriorityLevel | number | null;
541
+ slug?: string;
542
+ }
543
+ interface TaskUpdateOptions {
544
+ title?: string;
545
+ description?: string;
546
+ labels?: string[];
547
+ tags?: string[];
548
+ addLabels?: string[];
549
+ addTags?: string[];
550
+ removeLabels?: string[];
551
+ removeTags?: string[];
552
+ status?: UserTaskStatus;
553
+ assign?: string;
554
+ chatId?: string | null;
555
+ externalChat?: ExternalChatContext;
556
+ projectIds?: string[];
557
+ planId?: string | null;
558
+ priority?: TaskPriorityLevel | number | null;
559
+ slug?: string;
560
+ }
561
+ interface ExternalChatRef {
562
+ provider: "codex" | "opencode";
563
+ id: string;
564
+ }
565
+ interface ExternalChatContext extends ExternalChatRef {
566
+ title?: string;
567
+ }
568
+
459
569
  interface CliSubChatRequest {
460
570
  id?: string;
461
571
  chat_id?: string;
@@ -900,6 +1010,7 @@ interface UserTaskRecord {
900
1010
  external_chat_lookup_hash?: string | null;
901
1011
  encrypted_external_chat_id?: string | null;
902
1012
  encrypted_external_chat_title?: string | null;
1013
+ key_wrappers?: Array<Record<string, unknown>>;
903
1014
  linked_project_ids?: string[] | null;
904
1015
  linked_project_hashes?: string[] | null;
905
1016
  parent_task_id?: string | null;
@@ -2467,6 +2578,8 @@ declare class OpenMatesClient {
2467
2578
  contextChatId?: string | null;
2468
2579
  projectIds?: string[];
2469
2580
  }): Promise<UserTaskProposalRecord[]>;
2581
+ /** Resolve membership-authorized Project keys before replacing task wrappers. */
2582
+ prepareUserTaskUpdate(task: DecryptedUserTask, input: TaskUpdateOptions, context?: TeamContextOptions): Promise<UserTaskUpdateInput>;
2470
2583
  updateUserTask(taskId: string, input: UserTaskUpdateInput, context?: TeamContextOptions): Promise<UserTaskRecord>;
2471
2584
  startUserTaskWithAI(taskId: string, input: UserTaskStartAIInput): Promise<UserTaskRecord>;
2472
2585
  deleteUserTask(taskId: string, version: number): Promise<{
@@ -2903,4 +3016,4 @@ declare function serializeToYaml(data: Record<string, unknown>, indent?: number)
2903
3016
  /** Map language identifier to file extension for code embed downloads. */
2904
3017
  declare function getExtForLang(language: string): string;
2905
3018
 
2906
- export { type DecryptedEmbed as $, type WorkflowRunContentRetention as A, type WorkflowRunDetail as B, type WorkflowRunCancellationResult as C, type WorkflowTemplateProjectionUpsertParams as D, type WorkflowTemplateProjectionResult as E, type PublicWorkflowTemplateProjection as F, type WorkflowTemplateProjectionRevocationResult as G, type WorkflowTemplateBindingCompletionParams as H, type WorkflowTemplateBindingCompletionResult as I, type WorkflowTemplateShortUrlParams as J, type WorkflowTemplateShortUrlResult as K, type WorkflowTemplateImportPayload as L, type ImportedWorkflowTemplate as M, type AuthMethodsStatus as N, type AuthoritativeChatReconciliation as O, type ProjectItemRecord as P, type BackupCodesResult as Q, type BankTransferOrderDetails as R, type ShortUrlRevokeResult as S, type BankTransferStatus as T, type UserTaskStatus as U, type CachedChat as V, type WorkflowSummary as W, type CachedNewChatSuggestion as X, type ChatListPage as Y, type CliSignupResult as Z, type DecryptedDraft as _, type UserTaskAssigneeType as a, type DecryptedMemoryEntry as a0, type DecryptedMessage as a1, type DecryptedNewChatSuggestion as a2, type DocsFile as a3, type DocsFolder as a4, type DocsSearchResult as a5, type DocsTree as a6, type EncryptedDraft as a7, type GiftCardBankTransferStatus as a8, INTEREST_TAG_IDS as a9, assertTrustedAccountCommandAllowed as aA, assertTrustedAccountGuardEnvironment as aB, buildTravelConnectionsRequest as aC, printWhoAmI as aD, requireExactConfirmation as aE, resolveProjectContext as aF, shouldRequireTrustedAccountGuard as aG, type ImagesAiDetectionClassification as aa, type ImagesAiDetectionSummary as ab, type InterestTagId as ac, MATE_NAMES as ad, MEMORY_TYPE_REGISTRY as ae, type MemoryFieldDef as af, type MemoryTypeDef as ag, OpenMatesClient as ah, type OpenMatesClientOptions as ai, type OpenMatesSession as aj, type SyncCache as ak, type TopicPreferencesPayload as al, type TotpSetupStartResult as am, type WorkflowEdge as an, type WorkflowNode as ao, type WorkflowNodeRun as ap, type WorkflowNodeType as aq, type WorkflowRunContentStorage as ar, buildImagesAiDetectionSummary as as, classifyImagesAiDetection as at, deriveAppUrl as au, formatImagesAiDetectionLabel as av, getExtForLang as aw, normalizeInterestTagIds as ax, reconcileAuthoritativeChats as ay, serializeToYaml as az, type UserTaskAssigneeIdentity as b, type UserTaskRecord as c, type UserTaskActivityRecord as d, type UserPlanStatus as e, type UserPlanRecord as f, type UserPlanVerificationStatus as g, type UserPlanLearningType as h, type UserPlanLearningTargetKind as i, type UserPlanLearningStatus as j, type UserPlanLearningLevel as k, type UserPlanLearningRecord as l, type UserPlanCriterionRecord as m, type UserPlanVerificationRecord as n, type UserPlanCreateInput as o, type UserPlanUpdateInput as p, type UserPlanLearningCreateTasksInput as q, type UserPlanLearningCreateTasksResult as r, type UserTaskReorderInput as s, type WorkflowCapability as t, type WorkflowDetail as u, type WorkflowInputStartParams as v, type WorkflowInputSessionResult as w, type WorkflowInputSessionDetail as x, type WorkflowInputEvent as y, type WorkflowGraph as z };
3019
+ export { type ChatListPage as $, type WorkflowRunContentRetention as A, type WorkflowRunDetail as B, type WorkflowRunCancellationResult as C, type DecryptedUserTask as D, type ExternalChatContext as E, type WorkflowTemplateProjectionUpsertParams as F, type WorkflowTemplateProjectionResult as G, type PublicWorkflowTemplateProjection as H, type WorkflowTemplateProjectionRevocationResult as I, type WorkflowTemplateBindingCompletionParams as J, type WorkflowTemplateBindingCompletionResult as K, type WorkflowTemplateShortUrlParams as L, type WorkflowTemplateShortUrlResult as M, type WorkflowTemplateImportPayload as N, type ImportedWorkflowTemplate as O, type ProjectItemRecord as P, type AuthMethodsStatus as Q, type AuthoritativeChatReconciliation as R, type ShortUrlRevokeResult as S, type TaskCreateOptions as T, type UserPlanStatus as U, type BackupCodesResult as V, type WorkflowSummary as W, type BankTransferOrderDetails as X, type BankTransferStatus as Y, type CachedChat as Z, type CachedNewChatSuggestion as _, type UserPlanRecord as a, type CliSignupResult as a0, type DecryptedDraft as a1, type DecryptedEmbed as a2, type DecryptedMemoryEntry as a3, type DecryptedMessage as a4, type DecryptedNewChatSuggestion as a5, type DocsFile as a6, type DocsFolder as a7, type DocsSearchResult as a8, type DocsTree as a9, normalizeInterestTagIds as aA, reconcileAuthoritativeChats as aB, serializeToYaml as aC, assertTrustedAccountCommandAllowed as aD, assertTrustedAccountGuardEnvironment as aE, buildTravelConnectionsRequest as aF, printWhoAmI as aG, requireExactConfirmation as aH, resolveProjectContext as aI, shouldRequireTrustedAccountGuard as aJ, type EncryptedDraft as aa, type GiftCardBankTransferStatus as ab, INTEREST_TAG_IDS as ac, type ImagesAiDetectionClassification as ad, type ImagesAiDetectionSummary as ae, type InterestTagId as af, MATE_NAMES as ag, MEMORY_TYPE_REGISTRY as ah, type MemoryFieldDef as ai, type MemoryTypeDef as aj, OpenMatesClient as ak, type OpenMatesClientOptions as al, type OpenMatesSession as am, type SyncCache as an, type TopicPreferencesPayload as ao, type TotpSetupStartResult as ap, type WorkflowEdge as aq, type WorkflowNode as ar, type WorkflowNodeRun as as, type WorkflowNodeType as at, type WorkflowRunContentStorage as au, buildImagesAiDetectionSummary as av, classifyImagesAiDetection as aw, deriveAppUrl as ax, formatImagesAiDetectionLabel as ay, getExtForLang as az, type UserPlanVerificationStatus as b, type UserPlanLearningType as c, type UserPlanLearningTargetKind as d, type UserPlanLearningStatus as e, type UserPlanLearningLevel as f, type UserPlanLearningRecord as g, type UserPlanCriterionRecord as h, type UserPlanVerificationRecord as i, type UserPlanCreateInput as j, type UserPlanUpdateInput as k, type TaskUpdateOptions as l, type UserPlanLearningCreateTasksInput as m, type UserPlanLearningCreateTasksResult as n, type UserTaskStatus as o, type TaskPriorityLevel as p, type DecryptedTaskActivityEntry as q, type TaskActivityCreateOptions as r, type UserTaskReorderInput as s, type WorkflowCapability as t, type WorkflowDetail as u, type WorkflowInputStartParams as v, type WorkflowInputSessionResult as w, type WorkflowInputSessionDetail as x, type WorkflowInputEvent as y, type WorkflowGraph as z };
package/dist/cli.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export { aa as ImagesAiDetectionClassification, ab as ImagesAiDetectionSummary, aA as assertTrustedAccountCommandAllowed, aB as assertTrustedAccountGuardEnvironment, as as buildImagesAiDetectionSummary, aC as buildTravelConnectionsRequest, at as classifyImagesAiDetection, av as formatImagesAiDetectionLabel, aw as getExtForLang, aD as printWhoAmI, aE as requireExactConfirmation, aF as resolveProjectContext, az as serializeToYaml, aG as shouldRequireTrustedAccountGuard } from './cli-Cq6p2ssC.js';
2
+ export { ad as ImagesAiDetectionClassification, ae as ImagesAiDetectionSummary, aD as assertTrustedAccountCommandAllowed, aE as assertTrustedAccountGuardEnvironment, av as buildImagesAiDetectionSummary, aF as buildTravelConnectionsRequest, aw as classifyImagesAiDetection, ay as formatImagesAiDetectionLabel, az as getExtForLang, aG as printWhoAmI, aH as requireExactConfirmation, aI as resolveProjectContext, aC as serializeToYaml, aJ as shouldRequireTrustedAccountGuard } from './cli-v2gypIXn.js';
package/dist/cli.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  resolveProjectContext,
13
13
  serializeToYaml,
14
14
  shouldRequireTrustedAccountGuard
15
- } from "./chunk-6NR3TIBG.js";
15
+ } from "./chunk-TCY3QK2U.js";
16
16
  import "./chunk-IWKP55ZB.js";
17
17
  import "./chunk-BBKJZ23O.js";
18
18
  export {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { U as UserTaskStatus, a as UserTaskAssigneeType, b as UserTaskAssigneeIdentity, c as UserTaskRecord, d as UserTaskActivityRecord, e as UserPlanStatus, f as UserPlanRecord, g as UserPlanVerificationStatus, h as UserPlanLearningType, i as UserPlanLearningTargetKind, j as UserPlanLearningStatus, k as UserPlanLearningLevel, l as UserPlanLearningRecord, m as UserPlanCriterionRecord, n as UserPlanVerificationRecord, o as UserPlanCreateInput, p as UserPlanUpdateInput, P as ProjectItemRecord, q as UserPlanLearningCreateTasksInput, r as UserPlanLearningCreateTasksResult, s as UserTaskReorderInput, W as WorkflowSummary, t as WorkflowCapability, u as WorkflowDetail, v as WorkflowInputStartParams, w as WorkflowInputSessionResult, x as WorkflowInputSessionDetail, y as WorkflowInputEvent, z as WorkflowGraph, A as WorkflowRunContentRetention, B as WorkflowRunDetail, C as WorkflowRunCancellationResult, D as WorkflowTemplateProjectionUpsertParams, E as WorkflowTemplateProjectionResult, F as PublicWorkflowTemplateProjection, G as WorkflowTemplateProjectionRevocationResult, H as WorkflowTemplateBindingCompletionParams, I as WorkflowTemplateBindingCompletionResult, J as WorkflowTemplateShortUrlParams, K as WorkflowTemplateShortUrlResult, S as ShortUrlRevokeResult, L as WorkflowTemplateImportPayload, M as ImportedWorkflowTemplate } from './cli-Cq6p2ssC.js';
2
- export { N as AuthMethodsStatus, O as AuthoritativeChatReconciliation, Q as BackupCodesResult, R as BankTransferOrderDetails, T as BankTransferStatus, V as CachedChat, X as CachedNewChatSuggestion, Y as ChatListPage, Z as CliSignupResult, _ as DecryptedDraft, $ as DecryptedEmbed, a0 as DecryptedMemoryEntry, a1 as DecryptedMessage, a2 as DecryptedNewChatSuggestion, a3 as DocsFile, a4 as DocsFolder, a5 as DocsSearchResult, a6 as DocsTree, a7 as EncryptedDraft, a8 as GiftCardBankTransferStatus, a9 as INTEREST_TAG_IDS, aa as ImagesAiDetectionClassification, ab as ImagesAiDetectionSummary, ac as InterestTagId, ad as MATE_NAMES, ae as MEMORY_TYPE_REGISTRY, af as MemoryFieldDef, ag as MemoryTypeDef, ah as OpenMatesClient, ai as OpenMatesClientOptions, aj as OpenMatesSession, ak as SyncCache, al as TopicPreferencesPayload, am as TotpSetupStartResult, an as WorkflowEdge, ao as WorkflowNode, ap as WorkflowNodeRun, aq as WorkflowNodeType, ar as WorkflowRunContentStorage, as as buildImagesAiDetectionSummary, at as classifyImagesAiDetection, au as deriveAppUrl, av as formatImagesAiDetectionLabel, aw as getExtForLang, ax as normalizeInterestTagIds, ay as reconcileAuthoritativeChats, az as serializeToYaml } from './cli-Cq6p2ssC.js';
1
+ import { U as UserPlanStatus, a as UserPlanRecord, b as UserPlanVerificationStatus, c as UserPlanLearningType, d as UserPlanLearningTargetKind, e as UserPlanLearningStatus, f as UserPlanLearningLevel, g as UserPlanLearningRecord, h as UserPlanCriterionRecord, i as UserPlanVerificationRecord, j as UserPlanCreateInput, k as UserPlanUpdateInput, P as ProjectItemRecord, T as TaskCreateOptions, l as TaskUpdateOptions, m as UserPlanLearningCreateTasksInput, n as UserPlanLearningCreateTasksResult, o as UserTaskStatus, E as ExternalChatContext, p as TaskPriorityLevel, D as DecryptedUserTask, q as DecryptedTaskActivityEntry, r as TaskActivityCreateOptions, s as UserTaskReorderInput, W as WorkflowSummary, t as WorkflowCapability, u as WorkflowDetail, v as WorkflowInputStartParams, w as WorkflowInputSessionResult, x as WorkflowInputSessionDetail, y as WorkflowInputEvent, z as WorkflowGraph, A as WorkflowRunContentRetention, B as WorkflowRunDetail, C as WorkflowRunCancellationResult, F as WorkflowTemplateProjectionUpsertParams, G as WorkflowTemplateProjectionResult, H as PublicWorkflowTemplateProjection, I as WorkflowTemplateProjectionRevocationResult, J as WorkflowTemplateBindingCompletionParams, K as WorkflowTemplateBindingCompletionResult, L as WorkflowTemplateShortUrlParams, M as WorkflowTemplateShortUrlResult, S as ShortUrlRevokeResult, N as WorkflowTemplateImportPayload, O as ImportedWorkflowTemplate } from './cli-v2gypIXn.js';
2
+ export { Q as AuthMethodsStatus, R as AuthoritativeChatReconciliation, V as BackupCodesResult, X as BankTransferOrderDetails, Y as BankTransferStatus, Z as CachedChat, _ as CachedNewChatSuggestion, $ as ChatListPage, a0 as CliSignupResult, a1 as DecryptedDraft, a2 as DecryptedEmbed, a3 as DecryptedMemoryEntry, a4 as DecryptedMessage, a5 as DecryptedNewChatSuggestion, a6 as DocsFile, a7 as DocsFolder, a8 as DocsSearchResult, a9 as DocsTree, aa as EncryptedDraft, ab as GiftCardBankTransferStatus, ac as INTEREST_TAG_IDS, ad as ImagesAiDetectionClassification, ae as ImagesAiDetectionSummary, af as InterestTagId, ag as MATE_NAMES, ah as MEMORY_TYPE_REGISTRY, ai as MemoryFieldDef, aj as MemoryTypeDef, ak as OpenMatesClient, al as OpenMatesClientOptions, am as OpenMatesSession, an as SyncCache, ao as TopicPreferencesPayload, ap as TotpSetupStartResult, aq as WorkflowEdge, ar as WorkflowNode, as as WorkflowNodeRun, at as WorkflowNodeType, au as WorkflowRunContentStorage, av as buildImagesAiDetectionSummary, aw as classifyImagesAiDetection, ax as deriveAppUrl, ay as formatImagesAiDetectionLabel, az as getExtForLang, aA as normalizeInterestTagIds, aB as reconcileAuthoritativeChats, aC as serializeToYaml } from './cli-v2gypIXn.js';
3
3
 
4
4
  interface ProjectedAssistantSpeechSegment {
5
5
  sequence: number;
@@ -3903,116 +3903,6 @@ interface ParsedAccountImport {
3903
3903
  skippedDomains: string[];
3904
3904
  }
3905
3905
 
3906
- declare const PRIORITY_LEVELS: readonly ["none", "low", "medium", "high", "urgent"];
3907
- type TaskPriorityLevel = typeof PRIORITY_LEVELS[number];
3908
- interface DecryptedUserTask {
3909
- taskId: string;
3910
- source?: string;
3911
- projectionKind?: string | null;
3912
- workflowId?: string | null;
3913
- workflowRunId?: string | null;
3914
- triggerId?: string | null;
3915
- canCancel?: boolean;
3916
- canDelete?: boolean;
3917
- shortId: string;
3918
- slug: string;
3919
- title: string;
3920
- description: string;
3921
- labels: string[];
3922
- tags: string[];
3923
- latestInstruction: string;
3924
- status: UserTaskStatus;
3925
- assigneeType: UserTaskAssigneeType;
3926
- assigneeIdentity: UserTaskAssigneeIdentity | null;
3927
- assigneeHash: string | null;
3928
- primaryChatId: string | null;
3929
- externalChat: ExternalChatContext | null;
3930
- linkedProjectIds: string[];
3931
- planId: string | null;
3932
- dueAt: number | null;
3933
- priority: number;
3934
- priorityLevel: TaskPriorityLevel;
3935
- position: number;
3936
- queueState: string;
3937
- blockedReasonCode: string | null;
3938
- blockedReason: string;
3939
- aiExecutionState: string | null;
3940
- readOnly?: boolean;
3941
- version: number;
3942
- encrypted: UserTaskRecord;
3943
- }
3944
- interface TaskActivityCreateOptions {
3945
- entryId?: string;
3946
- message: string;
3947
- embedRefs?: string[];
3948
- embedKeyMaterial?: string;
3949
- createdAt?: number;
3950
- }
3951
- interface DecryptedTaskActivityEntry {
3952
- entryId: string;
3953
- taskId: string;
3954
- kind: UserTaskActivityRecord["kind"];
3955
- actorType: string;
3956
- actorHash: string;
3957
- actorIdentity: UserTaskAssigneeIdentity | null;
3958
- actorDisplayName: string | null;
3959
- actorProfileImageUrl: string | null;
3960
- authorHash: string | null;
3961
- eventType: string;
3962
- sourceSurface: string;
3963
- previousStatus: UserTaskStatus | null;
3964
- nextStatus: UserTaskStatus | null;
3965
- createdAt: number;
3966
- deletedAt: number | null;
3967
- deletedByHash: string | null;
3968
- deletedByDisplayName: string | null;
3969
- message?: string;
3970
- embedKeyMaterial?: string;
3971
- embedRefs: string[];
3972
- }
3973
- interface TaskCreateOptions {
3974
- /** Stable ID is used only by validated local recovery restoration. */
3975
- taskId?: string;
3976
- title: string;
3977
- description?: string;
3978
- labels?: string[];
3979
- tags?: string[];
3980
- status?: UserTaskStatus;
3981
- assign?: string;
3982
- chatId?: string | null;
3983
- externalChat?: ExternalChatContext;
3984
- projectIds?: string[];
3985
- planId?: string | null;
3986
- dueAt?: number | null;
3987
- priority?: TaskPriorityLevel | number | null;
3988
- slug?: string;
3989
- }
3990
- interface TaskUpdateOptions {
3991
- title?: string;
3992
- description?: string;
3993
- labels?: string[];
3994
- tags?: string[];
3995
- addLabels?: string[];
3996
- addTags?: string[];
3997
- removeLabels?: string[];
3998
- removeTags?: string[];
3999
- status?: UserTaskStatus;
4000
- assign?: string;
4001
- chatId?: string | null;
4002
- externalChat?: ExternalChatContext;
4003
- projectIds?: string[];
4004
- planId?: string | null;
4005
- priority?: TaskPriorityLevel | number | null;
4006
- slug?: string;
4007
- }
4008
- interface ExternalChatRef {
4009
- provider: "codex" | "opencode";
4010
- id: string;
4011
- }
4012
- interface ExternalChatContext extends ExternalChatRef {
4013
- title?: string;
4014
- }
4015
-
4016
3906
  type UserPlanEvidenceReference = {
4017
3907
  kind: "embed";
4018
3908
  embed_id: string;
@@ -5530,4 +5420,4 @@ type AssistantFeedbackDecision = {
5530
5420
  };
5531
5421
  declare function buildAssistantFeedbackDecision(rating: number): AssistantFeedbackDecision;
5532
5422
 
5533
- export { APP_SKILL_METADATA, ASSISTANT_FEEDBACK_REPORT_TITLE, ASSISTANT_FEEDBACK_THANKS, type ApiKeyCreateOptions, type ApiKeyCreateResult, type ApiKeyRecord, type AssistantFeedbackDecision, type ChatCreateOptions, type ChatListOptions, type ChatResponse, type DecryptedUserTask, type DesignIconExportFormat, type DesignIconExportOptions, type DesignIconExportResult, type DraftRecord, type EncryptedChatMetadata, type EncryptedDraftRecord, type FocusModeSelection, type IdeaBucketAddInput, type IdeaBucketProcessOptions, type IdeaBucketResult, type IdeaBucketSettings, type IdeaBucketSettingsInput, OpenMates, OpenMatesApiError, OpenMatesConfigError, type OpenMatesOptions, type PlanPlainCreateOptions, type PlanPlainUpdateOptions, type PlanRecord, type ProjectPlainCreateOptions, type ProjectPlainUpdateOptions, type ProjectRecordPlain, SUPPORT_URL, type TaskListFilters, type TaskPlainCreateOptions, type TaskPlainUpdateOptions, type TaskRecord, WorkflowCapability, WorkflowDetail, WorkflowGraph, WorkflowRunContentRetention, WorkflowRunDetail, WorkflowSummary, buildAssistantFeedbackDecision, buildCreatePlanCriterionInput, buildCreatePlanLearningInput, buildCreatePlanVerificationInput, buildCreateUserPlanInput, buildPlanVerificationEvidenceInput, buildUpdatePlanLearningInput, buildUpdatePlanVerificationInput, buildUpdateUserPlanInput, decryptPlanLearning, decryptPlanLearnings, decryptUserPlan, decryptUserPlans, defaultCloneBranchForVersion, findPlan, findPlanLearning, projectAssistantSpeech, renderPlanDetail, renderPlanLearningDetail, renderPlanLearningList, renderPlanList, renderSupportInfo, selectAssistantMessagesForSpeech, summarizeAssistantSpeech };
5423
+ export { APP_SKILL_METADATA, ASSISTANT_FEEDBACK_REPORT_TITLE, ASSISTANT_FEEDBACK_THANKS, type ApiKeyCreateOptions, type ApiKeyCreateResult, type ApiKeyRecord, type AssistantFeedbackDecision, type ChatCreateOptions, type ChatListOptions, type ChatResponse, DecryptedUserTask, type DesignIconExportFormat, type DesignIconExportOptions, type DesignIconExportResult, type DraftRecord, type EncryptedChatMetadata, type EncryptedDraftRecord, type FocusModeSelection, type IdeaBucketAddInput, type IdeaBucketProcessOptions, type IdeaBucketResult, type IdeaBucketSettings, type IdeaBucketSettingsInput, OpenMates, OpenMatesApiError, OpenMatesConfigError, type OpenMatesOptions, type PlanPlainCreateOptions, type PlanPlainUpdateOptions, type PlanRecord, type ProjectPlainCreateOptions, type ProjectPlainUpdateOptions, type ProjectRecordPlain, SUPPORT_URL, type TaskListFilters, type TaskPlainCreateOptions, type TaskPlainUpdateOptions, type TaskRecord, WorkflowCapability, WorkflowDetail, WorkflowGraph, WorkflowRunContentRetention, WorkflowRunDetail, WorkflowSummary, buildAssistantFeedbackDecision, buildCreatePlanCriterionInput, buildCreatePlanLearningInput, buildCreatePlanVerificationInput, buildCreateUserPlanInput, buildPlanVerificationEvidenceInput, buildUpdatePlanLearningInput, buildUpdatePlanVerificationInput, buildUpdateUserPlanInput, decryptPlanLearning, decryptPlanLearnings, decryptUserPlan, decryptUserPlans, defaultCloneBranchForVersion, findPlan, findPlanLearning, projectAssistantSpeech, renderPlanDetail, renderPlanLearningDetail, renderPlanLearningList, renderPlanList, renderSupportInfo, selectAssistantMessagesForSpeech, summarizeAssistantSpeech };
package/dist/index.js CHANGED
@@ -42,7 +42,7 @@ import {
42
42
  selectAssistantMessagesForSpeech,
43
43
  serializeToYaml,
44
44
  summarizeAssistantSpeech
45
- } from "./chunk-6NR3TIBG.js";
45
+ } from "./chunk-TCY3QK2U.js";
46
46
  import "./chunk-IWKP55ZB.js";
47
47
  import "./chunk-BBKJZ23O.js";
48
48
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.18.0-alpha.32",
3
+ "version": "0.18.0-alpha.33",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",