openmates 0.18.0-alpha.22 → 0.18.0-alpha.24
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.
|
@@ -1799,9 +1799,6 @@ function writeSession(session) {
|
|
|
1799
1799
|
} finally {
|
|
1800
1800
|
rmSync(temporary, { force: true });
|
|
1801
1801
|
}
|
|
1802
|
-
if (result.type !== "plaintext") {
|
|
1803
|
-
process.stderr.write("Decrypting data...\n");
|
|
1804
|
-
}
|
|
1805
1802
|
}
|
|
1806
1803
|
function loadSession() {
|
|
1807
1804
|
const filePath = join(ensureStateDir(), "session.json");
|
|
@@ -75666,7 +75663,7 @@ async function main() {
|
|
|
75666
75663
|
if (parsed.flags.json === true) {
|
|
75667
75664
|
printJson2(user);
|
|
75668
75665
|
} else {
|
|
75669
|
-
printWhoAmI(user);
|
|
75666
|
+
await printWhoAmI(user, client);
|
|
75670
75667
|
}
|
|
75671
75668
|
return;
|
|
75672
75669
|
}
|
|
@@ -83404,7 +83401,7 @@ async function handleSettings(client, subcommand, rest, flags) {
|
|
|
83404
83401
|
if (flags.json === true) {
|
|
83405
83402
|
printJson2(user);
|
|
83406
83403
|
} else {
|
|
83407
|
-
printWhoAmI(user);
|
|
83404
|
+
await printWhoAmI(user, client);
|
|
83408
83405
|
}
|
|
83409
83406
|
return;
|
|
83410
83407
|
}
|
|
@@ -85698,31 +85695,45 @@ function formatEventPrice(item) {
|
|
|
85698
85695
|
if (item.is_paid === false) return "free";
|
|
85699
85696
|
return null;
|
|
85700
85697
|
}
|
|
85701
|
-
function printWhoAmI(user) {
|
|
85702
|
-
|
|
85703
|
-
const
|
|
85704
|
-
|
|
85705
|
-
|
|
85706
|
-
|
|
85707
|
-
|
|
85708
|
-
|
|
85709
|
-
|
|
85710
|
-
|
|
85711
|
-
|
|
85712
|
-
|
|
85713
|
-
|
|
85714
|
-
|
|
85715
|
-
|
|
85716
|
-
|
|
85717
|
-
|
|
85718
|
-
|
|
85719
|
-
|
|
85720
|
-
|
|
85721
|
-
|
|
85722
|
-
|
|
85723
|
-
|
|
85698
|
+
async function printWhoAmI(user, client) {
|
|
85699
|
+
const profile = process.env.OPENMATES_PROFILE?.trim();
|
|
85700
|
+
const command = profile ? `openmates --profile ${profile}` : "openmates";
|
|
85701
|
+
header("Account");
|
|
85702
|
+
kv("Username", String(user.username ?? "Unknown"));
|
|
85703
|
+
if (typeof user.credits === "number") kv("Credits", user.credits.toLocaleString("en-US"));
|
|
85704
|
+
if (user.subscription_status) kv("Subscription", String(user.subscription_status));
|
|
85705
|
+
if (typeof user.tfa_enabled === "boolean") kv("Two-factor auth", user.tfa_enabled ? "Enabled" : "Disabled");
|
|
85706
|
+
if (user.language) kv("Language", String(user.language));
|
|
85707
|
+
if (user.is_admin === true) kv("Role", "Administrator");
|
|
85708
|
+
header("\nConnection");
|
|
85709
|
+
kv("Profile", profile || "default");
|
|
85710
|
+
kv("Server", client.apiUrl);
|
|
85711
|
+
kv("Context", client.getActiveTeamId() ? "Team" : "Personal");
|
|
85712
|
+
header("\nLast chat");
|
|
85713
|
+
const lastOpened = typeof user.last_opened === "string" ? user.last_opened : "";
|
|
85714
|
+
const chatId = /^(?:(?:\/chat\/)|(?:#chat-id=))?([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/i.exec(lastOpened)?.[1];
|
|
85715
|
+
if (chatId) {
|
|
85716
|
+
try {
|
|
85717
|
+
const chats = await client.searchChats(chatId);
|
|
85718
|
+
const chat = chats.find((item) => item.id === chatId);
|
|
85719
|
+
if (chat) {
|
|
85720
|
+
kv("Title", chat.title?.trim() || "Untitled chat");
|
|
85721
|
+
kv("Read", `${command} chats show ${chatId}`);
|
|
85722
|
+
kv("Resume", `${command} chats send --chat ${chatId} "Your message"`);
|
|
85723
|
+
} else {
|
|
85724
|
+
console.log(" Last chat is unavailable in the current context.");
|
|
85725
|
+
kv("Browse", `${command} chats list`);
|
|
85726
|
+
}
|
|
85727
|
+
} catch (error) {
|
|
85728
|
+
console.error(`Could not load last chat: ${error instanceof Error ? error.message : String(error)}`);
|
|
85729
|
+
kv("Retry", `${command} whoami`);
|
|
85724
85730
|
}
|
|
85731
|
+
} else {
|
|
85732
|
+
console.log(" No saved chat to resume.");
|
|
85733
|
+
kv("Browse", `${command} chats list`);
|
|
85725
85734
|
}
|
|
85735
|
+
console.log(`
|
|
85736
|
+
Full account details: ${command} whoami --json`);
|
|
85726
85737
|
}
|
|
85727
85738
|
function printGenericObject(value, indent = 0) {
|
|
85728
85739
|
const pad3 = " ".repeat(indent);
|
|
@@ -87288,6 +87299,7 @@ export {
|
|
|
87288
87299
|
formatImagesAiDetectionLabel,
|
|
87289
87300
|
buildImagesAiDetectionSummary,
|
|
87290
87301
|
buildTravelConnectionsRequest,
|
|
87302
|
+
printWhoAmI,
|
|
87291
87303
|
serializeToYaml,
|
|
87292
87304
|
getExtForLang
|
|
87293
87305
|
};
|
|
@@ -2879,6 +2879,8 @@ declare function classifyImagesAiDetection(score: number | null | undefined): Im
|
|
|
2879
2879
|
declare function formatImagesAiDetectionLabel(classification: ImagesAiDetectionClassification): string;
|
|
2880
2880
|
declare function buildImagesAiDetectionSummary(uploadResult: UploadFileResponse, filePath: string): ImagesAiDetectionSummary;
|
|
2881
2881
|
declare function buildTravelConnectionsRequest(positionals: string[], flags: Record<string, string | boolean>): Record<string, unknown>;
|
|
2882
|
+
/** Keep account output curated; complete API fields remain available with --json. */
|
|
2883
|
+
declare function printWhoAmI(user: Record<string, unknown>, client: Pick<OpenMatesClient, "apiUrl" | "getActiveTeamId" | "searchChats">): Promise<void>;
|
|
2882
2884
|
/** Format a share duration for display */
|
|
2883
2885
|
/**
|
|
2884
2886
|
* Simple YAML serializer for chat export (no external dependency).
|
|
@@ -2889,4 +2891,4 @@ declare function serializeToYaml(data: Record<string, unknown>, indent?: number)
|
|
|
2889
2891
|
/** Map language identifier to file extension for code embed downloads. */
|
|
2890
2892
|
declare function getExtForLang(language: string): string;
|
|
2891
2893
|
|
|
2892
|
-
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,
|
|
2894
|
+
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 };
|
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
|
|
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-Cw-DzG_w.js';
|
package/dist/cli.js
CHANGED
|
@@ -7,11 +7,12 @@ import {
|
|
|
7
7
|
classifyImagesAiDetection,
|
|
8
8
|
formatImagesAiDetectionLabel,
|
|
9
9
|
getExtForLang,
|
|
10
|
+
printWhoAmI,
|
|
10
11
|
requireExactConfirmation,
|
|
11
12
|
resolveProjectContext,
|
|
12
13
|
serializeToYaml,
|
|
13
14
|
shouldRequireTrustedAccountGuard
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2PUPYVHK.js";
|
|
15
16
|
import "./chunk-IWKP55ZB.js";
|
|
16
17
|
import "./chunk-BBKJZ23O.js";
|
|
17
18
|
export {
|
|
@@ -22,6 +23,7 @@ export {
|
|
|
22
23
|
classifyImagesAiDetection,
|
|
23
24
|
formatImagesAiDetectionLabel,
|
|
24
25
|
getExtForLang,
|
|
26
|
+
printWhoAmI,
|
|
25
27
|
requireExactConfirmation,
|
|
26
28
|
resolveProjectContext,
|
|
27
29
|
serializeToYaml,
|
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-
|
|
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-
|
|
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-Cw-DzG_w.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-Cw-DzG_w.js';
|
|
3
3
|
|
|
4
4
|
interface ProjectedAssistantSpeechSegment {
|
|
5
5
|
sequence: number;
|
package/dist/index.js
CHANGED