openmates 0.27.0-alpha.60 → 0.27.0-alpha.62
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/dist/{chunk-HA4UBUFE.js → chunk-CFP7IA76.js} +316 -7
- package/dist/{cli-BAQLcaZb.d.ts → cli-CPgxlEQg.d.ts} +17 -2
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/fixtures/privacy-runtime/linux-arm64/libggml-base.so +0 -0
- package/fixtures/privacy-runtime/linux-arm64/libggml-base.so.0 +0 -0
- package/fixtures/privacy-runtime/linux-arm64/libggml-base.so.0.15.1 +0 -0
- package/fixtures/privacy-runtime/linux-arm64/libggml-cpu.so +0 -0
- package/fixtures/privacy-runtime/linux-arm64/libggml-cpu.so.0 +0 -0
- package/fixtures/privacy-runtime/linux-arm64/libggml-cpu.so.0.15.1 +0 -0
- package/fixtures/privacy-runtime/linux-arm64/libggml.so +0 -0
- package/fixtures/privacy-runtime/linux-arm64/libggml.so.0 +0 -0
- package/fixtures/privacy-runtime/linux-arm64/libggml.so.0.15.1 +0 -0
- package/fixtures/privacy-runtime/linux-arm64/manifest.json +9 -9
- package/package.json +1 -1
|
@@ -3923,6 +3923,14 @@ async function encryptEmbed(embed, masterKey, chatKey, chatId, messageId, userId
|
|
|
3923
3923
|
hashed_user_id: hashedUserId,
|
|
3924
3924
|
file_path: embed.filePath,
|
|
3925
3925
|
content_hash: embed.contentHash,
|
|
3926
|
+
...embed.appId && embed.skillId ? {
|
|
3927
|
+
app_id: embed.appId,
|
|
3928
|
+
skill_id: embed.skillId,
|
|
3929
|
+
root_embed_id: embed.embedId,
|
|
3930
|
+
workspace_origin: "chat"
|
|
3931
|
+
} : {},
|
|
3932
|
+
...embed.versionNumber ? { version_number: embed.versionNumber } : {},
|
|
3933
|
+
encryption_mode: "client",
|
|
3926
3934
|
text_length_chars: embed.textLengthChars,
|
|
3927
3935
|
created_at: nowSeconds3,
|
|
3928
3936
|
updated_at: nowSeconds3,
|
|
@@ -7311,6 +7319,35 @@ import { basename as basename2, extname as extname2, resolve as resolve3 } from
|
|
|
7311
7319
|
import { homedir as homedir2 } from "os";
|
|
7312
7320
|
import { createHash as createHash10 } from "crypto";
|
|
7313
7321
|
import JSZip2 from "jszip";
|
|
7322
|
+
|
|
7323
|
+
// src/diagramHtml.ts
|
|
7324
|
+
function inspectDiagramHtml(source) {
|
|
7325
|
+
if (!source || Buffer.byteLength(source, "utf8") > 1024 * 1024) return null;
|
|
7326
|
+
if (!/^\s*<!doctype html\s*>/i.test(source) || !/<html\b[^>]*>[\s\S]*<head\b[^>]*>[\s\S]*<\/head\s*>[\s\S]*<body\b[^>]*>[\s\S]*<svg\b/i.test(source) || !/<\/svg\s*>[\s\S]*<\/body\s*>[\s\S]*<\/html\s*>\s*$/i.test(source) || !/<g\b[^>]*\bdata-om-component\s*=\s*["'][a-z][a-z0-9_-]{0,63}["']/i.test(source)) return null;
|
|
7327
|
+
let checked = source.replace(/\sxmlns(?::[\w-]+)?\s*=\s*["']http:\/\/www\.w3\.org\/[A-Za-z0-9/.-]+["']/gi, "");
|
|
7328
|
+
checked = checked.replace(/<!--[\s\S]*?-->/g, "").replace(/&/gi, "&");
|
|
7329
|
+
checked = checked.replace(/data:font\/woff2;base64,([A-Za-z0-9+/]+={0,2})/gi, (whole, encoded) => {
|
|
7330
|
+
const bytes2 = Buffer.from(encoded, "base64");
|
|
7331
|
+
return bytes2.length > 0 && bytes2.length <= 256 * 1024 && bytes2.subarray(0, 4).toString() === "wOF2" && /@font-face\s*\{[^}]*$/i.test(checked.slice(0, checked.indexOf(whole))) ? "#embedded-font" : "unsafe-font-data";
|
|
7332
|
+
});
|
|
7333
|
+
if (/<!--|-->|<![^d]|<\?|&#|&[a-z][a-z0-9]+;/i.test(checked) || /<\s*\/?\s*(?:script|iframe|frame|object|embed|applet|link|base|img|image|video|audio|source|track|form|input|textarea|select|button|template|portal|foreignobject|animate|set|discard|feimage|math|noscript)\b/i.test(source) || /\s(?:on[a-z]+|srcdoc|src|srcset|poster|data|action|formaction|background|http-equiv)\s*=/i.test(source) || /(?:https?:|file:|javascript:|data:|\/\/|unsafe-font-data)/i.test(checked) || /@\s*(?:import|namespace|document)|expression\s*\(|image-set\s*\(|behavior\s*:|-moz-binding\s*:|\\/i.test(checked)) return null;
|
|
7334
|
+
for (const match of checked.matchAll(/url\(\s*(['"]?)([^)"']+)\1\s*\)/gi)) {
|
|
7335
|
+
if (!/^#[a-z_][\w.:-]{0,119}$/i.test(match[2].trim())) return null;
|
|
7336
|
+
}
|
|
7337
|
+
if (/url\s*\(/i.test(checked.replace(/url\(\s*(['"]?)([^)"']+)\1\s*\)/gi, ""))) return null;
|
|
7338
|
+
const title = /<title\b[^>]*>([^<>]{1,160})<\/title\s*>/i.exec(source)?.[1]?.trim();
|
|
7339
|
+
const viewBox = /<svg\b[^>]*\bviewBox\s*=\s*["']([^"']+)["']/i.exec(source)?.[1];
|
|
7340
|
+
if (!title || !viewBox) return null;
|
|
7341
|
+
const parts = viewBox.trim().split(/[\s,]+/).map(Number);
|
|
7342
|
+
if (parts.length !== 4 || parts.some((n) => !Number.isFinite(n)) || parts[2] < 1 || parts[2] > 8192 || parts[3] < 1 || parts[3] > 8192) return null;
|
|
7343
|
+
const kind = /<svg\b[^>]*\bdata-diagram-kind\s*=\s*["']([a-z][a-z0-9_-]{0,63})["']/i.exec(source)?.[1] ?? /<svg\b[^>]*\bdata-om-diagram\s*=\s*["']([a-z][a-z0-9_-]{0,63})["']/i.exec(source)?.[1] ?? /<meta\b[^>]*\bname\s*=\s*["']diagram-kind["'][^>]*\bcontent\s*=\s*["']([a-z][a-z0-9_-]{0,63})["']/i.exec(source)?.[1] ?? "diagram";
|
|
7344
|
+
const renderWidth = Number(/<html\b[^>]*\bdata-om-render-width\s*=\s*["']([0-9]{1,4})["']/i.exec(source)?.[1] ?? parts[2]);
|
|
7345
|
+
const renderHeight = Number(/<html\b[^>]*\bdata-om-render-height\s*=\s*["']([0-9]{1,4})["']/i.exec(source)?.[1] ?? parts[3]);
|
|
7346
|
+
if (!(renderWidth >= 1 && renderWidth <= 8192 && renderHeight >= 1 && renderHeight <= 8192)) return null;
|
|
7347
|
+
return { title, diagramKind: kind, renderWidth: Math.round(renderWidth), renderHeight: Math.round(renderHeight) };
|
|
7348
|
+
}
|
|
7349
|
+
|
|
7350
|
+
// src/fileEmbed.ts
|
|
7314
7351
|
var MAX_PER_FILE_SIZE = 100 * 1024 * 1024;
|
|
7315
7352
|
var BLOCKED_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
7316
7353
|
".pem",
|
|
@@ -7833,6 +7870,47 @@ function processCodeFile(filePath, filename, redactor) {
|
|
|
7833
7870
|
}
|
|
7834
7871
|
}
|
|
7835
7872
|
const language = detectLanguage(filename);
|
|
7873
|
+
if (language === "html") {
|
|
7874
|
+
const diagram = inspectDiagramHtml(content);
|
|
7875
|
+
if (diagram) {
|
|
7876
|
+
const embedId2 = generateEmbedId();
|
|
7877
|
+
const embedRef2 = createEmbedRef("diagram_html", `${filename}:${embedId2}`);
|
|
7878
|
+
return {
|
|
7879
|
+
embed: {
|
|
7880
|
+
embedId: embedId2,
|
|
7881
|
+
embedRef: embedRef2,
|
|
7882
|
+
type: "diagram_html",
|
|
7883
|
+
content: toonEncodeContent({
|
|
7884
|
+
type: "diagram_html",
|
|
7885
|
+
app_id: "diagrams",
|
|
7886
|
+
skill_id: "html",
|
|
7887
|
+
html_source: content,
|
|
7888
|
+
title: diagram.title,
|
|
7889
|
+
diagram_kind: diagram.diagramKind,
|
|
7890
|
+
render_width: diagram.renderWidth,
|
|
7891
|
+
render_height: diagram.renderHeight,
|
|
7892
|
+
schema_version: 1,
|
|
7893
|
+
version_number: 1,
|
|
7894
|
+
embed_ref: embedRef2,
|
|
7895
|
+
status: "finished"
|
|
7896
|
+
}),
|
|
7897
|
+
textPreview: `${diagram.title} (${diagram.diagramKind})`,
|
|
7898
|
+
status: "finished",
|
|
7899
|
+
filePath: filename,
|
|
7900
|
+
contentHash: createHash10("sha256").update(content).digest("hex"),
|
|
7901
|
+
textLengthChars: content.length,
|
|
7902
|
+
appId: "diagrams",
|
|
7903
|
+
skillId: "html",
|
|
7904
|
+
versionNumber: 1
|
|
7905
|
+
},
|
|
7906
|
+
referenceBlock: createEmbedReferenceBlock(embedRef2),
|
|
7907
|
+
displayName: filename,
|
|
7908
|
+
secretsRedacted,
|
|
7909
|
+
zeroKnowledge,
|
|
7910
|
+
requiresUpload: false
|
|
7911
|
+
};
|
|
7912
|
+
}
|
|
7913
|
+
}
|
|
7836
7914
|
const lineCount = content.split("\n").length;
|
|
7837
7915
|
const embedId = generateEmbedId();
|
|
7838
7916
|
const embedRef = createEmbedRef("code", `${filename}:${embedId}`);
|
|
@@ -11157,6 +11235,7 @@ function extractVersionedEmbedContent(content) {
|
|
|
11157
11235
|
].join("\n").trim();
|
|
11158
11236
|
}
|
|
11159
11237
|
if (typeof content.remotion_source === "string") return content.remotion_source;
|
|
11238
|
+
if (typeof content.html_source === "string") return content.html_source;
|
|
11160
11239
|
if (typeof content.code === "string") return content.code;
|
|
11161
11240
|
if (typeof content.html === "string") return content.html;
|
|
11162
11241
|
if (typeof content.table === "string") return content.table;
|
|
@@ -11172,6 +11251,7 @@ function buildRestoredEmbedContentObject(current2, restoredContent, newVersion)
|
|
|
11172
11251
|
if (typeof current2.remotion_source === "string") {
|
|
11173
11252
|
return { ...restored, remotion_source: restoredContent, current_source_version: newVersion };
|
|
11174
11253
|
}
|
|
11254
|
+
if (typeof current2.html_source === "string") return { ...restored, html_source: restoredContent };
|
|
11175
11255
|
if (typeof current2.code === "string") return { ...restored, code: restoredContent };
|
|
11176
11256
|
if (typeof current2.html === "string") return { ...restored, html: restoredContent };
|
|
11177
11257
|
if (typeof current2.table === "string") return { ...restored, table: restoredContent };
|
|
@@ -11274,9 +11354,14 @@ async function persistCompressionCheckpoints(ws, chatKeyBytes, checkpoints) {
|
|
|
11274
11354
|
}
|
|
11275
11355
|
}
|
|
11276
11356
|
}
|
|
11357
|
+
function authCookieFingerprint(cookies) {
|
|
11358
|
+
return createHash13("sha256").update(JSON.stringify(Object.entries(cookies).sort(([a], [b]) => a.localeCompare(b)))).digest("hex");
|
|
11359
|
+
}
|
|
11277
11360
|
var OpenMatesClient = class _OpenMatesClient {
|
|
11278
11361
|
workflowDeliveriesBySocket = /* @__PURE__ */ new WeakMap();
|
|
11279
11362
|
ownTeamDisplayNames = /* @__PURE__ */ new Map();
|
|
11363
|
+
pendingWhoAmIAuthHandoff = null;
|
|
11364
|
+
personalMemoryAuthHandoff = null;
|
|
11280
11365
|
apiUrl;
|
|
11281
11366
|
session;
|
|
11282
11367
|
http;
|
|
@@ -12738,6 +12823,7 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
12738
12823
|
}
|
|
12739
12824
|
async whoAmI() {
|
|
12740
12825
|
return this.withFreshStoredSession(async () => {
|
|
12826
|
+
this.pendingWhoAmIAuthHandoff = null;
|
|
12741
12827
|
const session = this.requireSession();
|
|
12742
12828
|
const previousRefreshToken = session.cookies.auth_refresh_token;
|
|
12743
12829
|
const response = await this.http.post(
|
|
@@ -12760,6 +12846,22 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
12760
12846
|
}
|
|
12761
12847
|
session.cookies = this.http.getCookieMap();
|
|
12762
12848
|
saveSession(session, { expectedRefreshToken: previousRefreshToken });
|
|
12849
|
+
const ownerId2 = typeof response.data.user?.id === "string" ? response.data.user.id : "";
|
|
12850
|
+
const wsToken = typeof response.data.ws_token === "string" ? response.data.ws_token : "";
|
|
12851
|
+
if (ownerId2 && wsToken && session.wsToken === wsToken && authCookieFingerprint(session.cookies) === authCookieFingerprint(this.http.getCookieMap())) {
|
|
12852
|
+
this.pendingWhoAmIAuthHandoff = {
|
|
12853
|
+
ownerId: ownerId2,
|
|
12854
|
+
wsToken,
|
|
12855
|
+
validatedAt: performance.now(),
|
|
12856
|
+
apiUrl: session.apiUrl,
|
|
12857
|
+
hashedEmail: session.hashedEmail,
|
|
12858
|
+
sessionId: session.sessionId,
|
|
12859
|
+
createdAt: session.createdAt,
|
|
12860
|
+
masterKeyExportedB64: session.masterKeyExportedB64,
|
|
12861
|
+
activeTeamId: session.activeTeamId,
|
|
12862
|
+
cookieFingerprint: authCookieFingerprint(session.cookies)
|
|
12863
|
+
};
|
|
12864
|
+
}
|
|
12763
12865
|
return response.data.user ?? {};
|
|
12764
12866
|
});
|
|
12765
12867
|
}
|
|
@@ -15210,7 +15312,8 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
15210
15312
|
code: "code",
|
|
15211
15313
|
pcb_schematic: "code",
|
|
15212
15314
|
sheet: "table",
|
|
15213
|
-
mermaid: "diagram_code"
|
|
15315
|
+
mermaid: "diagram_code",
|
|
15316
|
+
diagram_html: "html_source"
|
|
15214
15317
|
};
|
|
15215
15318
|
const field3 = historicalFieldByType[content.type];
|
|
15216
15319
|
if (!field3 || typeof sealedEmbed[field3] !== "string") {
|
|
@@ -15462,6 +15565,7 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
15462
15565
|
}
|
|
15463
15566
|
}
|
|
15464
15567
|
async sendMessage(params) {
|
|
15568
|
+
const preWsStartedAt = performance.now();
|
|
15465
15569
|
const teamId = this.resolveTeamContext({ teamId: params.teamId, personal: params.personal });
|
|
15466
15570
|
const teamSenderName = teamId ? await this.ownTeamSenderName(teamId) : "User";
|
|
15467
15571
|
if (params.chatId && params.newChatId) {
|
|
@@ -15500,6 +15604,7 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
15500
15604
|
finalMessage = rewriteRememberMessageReferences(finalMessage, messages);
|
|
15501
15605
|
}
|
|
15502
15606
|
const shouldWaitForAi = shouldWaitForTeamAi(finalMessage, teamId);
|
|
15607
|
+
const memoryStartedAt = performance.now();
|
|
15503
15608
|
let availableMemories = params.memorySnapshot ?? [];
|
|
15504
15609
|
let memoryCountsLoaded = false;
|
|
15505
15610
|
let memoryMetadataKeys = [];
|
|
@@ -15519,6 +15624,12 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
15519
15624
|
}
|
|
15520
15625
|
}
|
|
15521
15626
|
}
|
|
15627
|
+
const snapshotAuthHandoff = this.personalMemoryAuthHandoff?.snapshot.deref() === availableMemories ? this.personalMemoryAuthHandoff.auth : null;
|
|
15628
|
+
this.personalMemoryAuthHandoff = null;
|
|
15629
|
+
this.pendingWhoAmIAuthHandoff = null;
|
|
15630
|
+
const personalSendAuthHandoff = !teamId && !params.incognito ? snapshotAuthHandoff : null;
|
|
15631
|
+
const memoryPrepMs = Math.round(performance.now() - memoryStartedAt);
|
|
15632
|
+
const privacyStartedAt = performance.now();
|
|
15522
15633
|
const savedPrivacyHistory = !params.incognito && params.chatId ? await this.getChatMessages(chatId, teamId ? { teamId } : { personal: true }) : null;
|
|
15523
15634
|
let piiMappings = [...savedPrivacyHistory?.messages.flatMap((message) => (message.piiMappings ?? []).map((mapping) => ({ ...mapping, type: mapping.type ?? "OTHER" }))) ?? [], ...params.piiMappings ?? []];
|
|
15524
15635
|
if (params.piiDetection !== false) {
|
|
@@ -15542,10 +15653,13 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
15542
15653
|
}
|
|
15543
15654
|
}
|
|
15544
15655
|
params.onPrivacyPrepared?.(finalMessage);
|
|
15656
|
+
const privacyPrepMs = Math.round(performance.now() - privacyStartedAt);
|
|
15545
15657
|
const explicitTasksAppSkill = messageExplicitlyRequestsTasksAppSkill(finalMessage);
|
|
15546
15658
|
const taskUpdateJobsEnabled = params.taskUpdateJobs !== false && !explicitTasksAppSkill;
|
|
15659
|
+
const preWsMs = Math.round(performance.now() - preWsStartedAt);
|
|
15547
15660
|
const authSocketStartedAt = Date.now();
|
|
15548
15661
|
const { ws, ownerId: ownerId2 } = await this.openWsClient({
|
|
15662
|
+
personalSendAuthHandoff,
|
|
15549
15663
|
taskUpdateJobs: taskUpdateJobsEnabled,
|
|
15550
15664
|
projectFileJobs: !params.incognito,
|
|
15551
15665
|
remoteCommandJobs: !params.incognito,
|
|
@@ -15808,7 +15922,7 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
15808
15922
|
if (!prepared.ok) throw prepared.error;
|
|
15809
15923
|
if (!contextOwnerIsCurrent()) throw new Error("Chat workspace changed while preparing context.");
|
|
15810
15924
|
if (process.env.OPENMATES_DEBUG === "1") {
|
|
15811
|
-
console.error(`[chat preparation] auth_ws_ms=${authSocketMs} recovery_ms=${recoveryMs} context_ms=${prepared.elapsedMs}`);
|
|
15925
|
+
console.error(`[chat preparation] pre_ws_ms=${preWsMs} memory_ms=${memoryPrepMs} privacy_ms=${privacyPrepMs} auth_ws_ms=${authSocketMs} recovery_ms=${recoveryMs} context_ms=${prepared.elapsedMs}`);
|
|
15812
15926
|
}
|
|
15813
15927
|
Object.assign(messagePayload, prepared.value);
|
|
15814
15928
|
}
|
|
@@ -16565,7 +16679,8 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
16565
16679
|
chatId,
|
|
16566
16680
|
chatKeyBytes,
|
|
16567
16681
|
fallbackMessageId: assistantId,
|
|
16568
|
-
ownerId: ownerId2
|
|
16682
|
+
ownerId: ownerId2,
|
|
16683
|
+
teamId
|
|
16569
16684
|
});
|
|
16570
16685
|
clearSyncCache(teamId);
|
|
16571
16686
|
await persistCompressionCheckpoints(ws, chatKeyBytes, resp.compressionCheckpoints);
|
|
@@ -16716,7 +16831,8 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
16716
16831
|
chatId,
|
|
16717
16832
|
chatKeyBytes,
|
|
16718
16833
|
fallbackMessageId: assistantId,
|
|
16719
|
-
ownerId: ownerId2
|
|
16834
|
+
ownerId: ownerId2,
|
|
16835
|
+
teamId
|
|
16720
16836
|
});
|
|
16721
16837
|
if (isNewChat && (resp.generatedTitle || resp.generatedIcon)) {
|
|
16722
16838
|
const metadataStored = ws.waitForMessage(
|
|
@@ -17163,6 +17279,12 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
17163
17279
|
version_number: embed.version_number,
|
|
17164
17280
|
file_path: embed.file_path,
|
|
17165
17281
|
content_hash: embed.content_hash,
|
|
17282
|
+
...embed.type === "diagram_html" ? {
|
|
17283
|
+
app_id: "diagrams",
|
|
17284
|
+
skill_id: "html",
|
|
17285
|
+
chat_id: params.chatId,
|
|
17286
|
+
...params.teamId ? { team_id: params.teamId } : {}
|
|
17287
|
+
} : {},
|
|
17166
17288
|
text_length_chars: embed.text_length_chars,
|
|
17167
17289
|
is_private: embed.is_private ?? false,
|
|
17168
17290
|
is_shared: embed.is_shared ?? false,
|
|
@@ -20430,10 +20552,15 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
20430
20552
|
}
|
|
20431
20553
|
if (!teamId) {
|
|
20432
20554
|
let accountDocuments = [];
|
|
20555
|
+
this.pendingWhoAmIAuthHandoff = null;
|
|
20556
|
+
let accountDocumentsLoaded = false;
|
|
20433
20557
|
try {
|
|
20434
20558
|
accountDocuments = await this.getCustomRuleDocuments();
|
|
20559
|
+
accountDocumentsLoaded = true;
|
|
20435
20560
|
} catch {
|
|
20436
20561
|
}
|
|
20562
|
+
const handoff = this.pendingWhoAmIAuthHandoff;
|
|
20563
|
+
this.pendingWhoAmIAuthHandoff = null;
|
|
20437
20564
|
for (const memory of accountDocuments) {
|
|
20438
20565
|
const title = /^title:\s*(.+)$/m.exec(memory.document)?.[1]?.replace(/^['"]|['"]$/g, "") ?? "Memory";
|
|
20439
20566
|
results.push({
|
|
@@ -20447,6 +20574,7 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
20447
20574
|
item_version: 1
|
|
20448
20575
|
});
|
|
20449
20576
|
}
|
|
20577
|
+
if (accountDocumentsLoaded && handoff) this.personalMemoryAuthHandoff = { snapshot: new WeakRef(results), auth: handoff };
|
|
20450
20578
|
}
|
|
20451
20579
|
return results;
|
|
20452
20580
|
}
|
|
@@ -20965,6 +21093,66 @@ Required: ${schema.required.join(", ")}`
|
|
|
20965
21093
|
const now = Math.floor(Date.now() / 1e3);
|
|
20966
21094
|
const { ws } = await this.openWsClient();
|
|
20967
21095
|
try {
|
|
21096
|
+
if (currentObject.type === "diagram_html") {
|
|
21097
|
+
const chat = cache.chats.find((entry) => computeSHA256(String(entry.details.id ?? "")) === embed.hashed_chat_id);
|
|
21098
|
+
const chatId = String(chat?.details.id ?? "");
|
|
21099
|
+
if (!chatId || typeof embed.content_hash !== "string" || embed.content_hash !== computeSHA256(currentContent)) {
|
|
21100
|
+
throw new Error("Diagram restore requires a current chat and matching source hash.");
|
|
21101
|
+
}
|
|
21102
|
+
const teamId = this.resolveTeamContext();
|
|
21103
|
+
const versions = await this.listEmbedVersions(embedId, { chatId, teamId: teamId ?? void 0 });
|
|
21104
|
+
if (versions.readonly) throw new Error("Diagram version history is read-only.");
|
|
21105
|
+
const historyRows = [];
|
|
21106
|
+
if (currentVersion === 1 && !versions.versions.some((row3) => row3.version_number === 1)) {
|
|
21107
|
+
historyRows.push({
|
|
21108
|
+
version_number: 1,
|
|
21109
|
+
encrypted_snapshot: await encryptWithAesGcmCombined(currentContent, embedKey),
|
|
21110
|
+
created_at: normalizeUnixSeconds(embed.created_at, now)
|
|
21111
|
+
});
|
|
21112
|
+
}
|
|
21113
|
+
historyRows.push({
|
|
21114
|
+
version_number: newVersion,
|
|
21115
|
+
encrypted_patch: encryptedPatch,
|
|
21116
|
+
encrypted_snapshot: encryptedSnapshot,
|
|
21117
|
+
created_at: now
|
|
21118
|
+
});
|
|
21119
|
+
const requestId = randomUUID9();
|
|
21120
|
+
const operationId = randomUUID9();
|
|
21121
|
+
const receipt = ws.waitForMessage(
|
|
21122
|
+
"commit_chat_diagram_revision_result",
|
|
21123
|
+
(payload) => payload.request_id === requestId,
|
|
21124
|
+
3e4
|
|
21125
|
+
);
|
|
21126
|
+
await ws.sendAsync("commit_chat_diagram_revision", {
|
|
21127
|
+
request_id: requestId,
|
|
21128
|
+
operation_id: operationId,
|
|
21129
|
+
embed_id: embedId,
|
|
21130
|
+
chat_id: chatId,
|
|
21131
|
+
...teamId ? { team_id: teamId } : {},
|
|
21132
|
+
expected_revision: currentVersion,
|
|
21133
|
+
expected_content_hash: embed.content_hash,
|
|
21134
|
+
head: {
|
|
21135
|
+
encrypted_content: encryptedRestoredContent,
|
|
21136
|
+
encrypted_text_preview: embed.encrypted_text_preview ?? null,
|
|
21137
|
+
content_hash: contentHash,
|
|
21138
|
+
status: "finished",
|
|
21139
|
+
updated_at: now
|
|
21140
|
+
},
|
|
21141
|
+
history_rows: historyRows
|
|
21142
|
+
});
|
|
21143
|
+
const result = (await receipt).payload;
|
|
21144
|
+
if (result.status !== "committed" || result.current_revision !== newVersion || result.current_content_hash !== contentHash) {
|
|
21145
|
+
throw new Error(result.status === "conflict" ? "Diagram advanced on another device; reload and retry restore." : `Diagram restore was rejected: ${String(result.code ?? "unknown")}`);
|
|
21146
|
+
}
|
|
21147
|
+
clearSyncCache(teamId);
|
|
21148
|
+
return {
|
|
21149
|
+
embed_id: embedId,
|
|
21150
|
+
restored_from_version: version,
|
|
21151
|
+
version_number: newVersion,
|
|
21152
|
+
content: target.content,
|
|
21153
|
+
content_hash: contentHash
|
|
21154
|
+
};
|
|
21155
|
+
}
|
|
20968
21156
|
const storeRequestId = randomUUID9();
|
|
20969
21157
|
const storeConfirmed = ws.waitForMessage(
|
|
20970
21158
|
"store_embed_confirmed",
|
|
@@ -21279,16 +21467,26 @@ Required: ${schema.required.join(", ")}`
|
|
|
21279
21467
|
}
|
|
21280
21468
|
/**
|
|
21281
21469
|
* Refresh ws_token, then create and open a WebSocket client.
|
|
21282
|
-
*
|
|
21283
|
-
*
|
|
21470
|
+
* Opens an authenticated socket. Only a Personal send may supply a
|
|
21471
|
+
* one-use, same-send validated auth receipt; every other use refreshes.
|
|
21284
21472
|
*/
|
|
21285
21473
|
async openWsClient(options = {}) {
|
|
21286
|
-
const
|
|
21474
|
+
const reusedOwner = options.personalSendAuthHandoff ? await this.reusePersonalSendAuthHandoff(options.personalSendAuthHandoff) : null;
|
|
21475
|
+
const ownerId2 = reusedOwner ?? await this.refreshWsToken();
|
|
21287
21476
|
const session = this.requireSession();
|
|
21288
21477
|
const ws = this.makeWsClient(session, options);
|
|
21289
21478
|
await ws.open();
|
|
21290
21479
|
return { ws, session, ownerId: ownerId2 };
|
|
21291
21480
|
}
|
|
21481
|
+
personalSendAuthHandoffCurrent(handoff) {
|
|
21482
|
+
const age = performance.now() - handoff.validatedAt;
|
|
21483
|
+
const session = this.requireSession();
|
|
21484
|
+
return age >= 0 && age <= 5e3 && handoff.ownerId.length > 0 && handoff.wsToken.length > 0 && session.apiUrl === handoff.apiUrl && session.apiUrl.replace(/\/$/, "") === this.apiUrl && session.hashedEmail === handoff.hashedEmail && session.sessionId === handoff.sessionId && session.createdAt === handoff.createdAt && session.masterKeyExportedB64 === handoff.masterKeyExportedB64 && session.activeTeamId === handoff.activeTeamId && session.wsToken === handoff.wsToken && authCookieFingerprint(session.cookies) === handoff.cookieFingerprint && authCookieFingerprint(this.http.getCookieMap()) === handoff.cookieFingerprint;
|
|
21485
|
+
}
|
|
21486
|
+
async reusePersonalSendAuthHandoff(handoff) {
|
|
21487
|
+
if (!this.personalSendAuthHandoffCurrent(handoff)) return null;
|
|
21488
|
+
return this.withFreshStoredSession(async () => this.personalSendAuthHandoffCurrent(handoff) ? handoff.ownerId : null);
|
|
21489
|
+
}
|
|
21292
21490
|
interactiveViewerChatId = null;
|
|
21293
21491
|
interactiveViewerSocket = null;
|
|
21294
21492
|
interactiveViewerAllowed = false;
|
|
@@ -34318,6 +34516,8 @@ var DIRECT_TYPES = /* @__PURE__ */ new Set([
|
|
|
34318
34516
|
"recording",
|
|
34319
34517
|
"mail-email",
|
|
34320
34518
|
"math-plot",
|
|
34519
|
+
"diagram_html",
|
|
34520
|
+
"diagrams-html",
|
|
34321
34521
|
"mindmap",
|
|
34322
34522
|
"mindmaps-mindmap",
|
|
34323
34523
|
"events-event",
|
|
@@ -34349,6 +34549,8 @@ var DIRECT_TYPE_LABELS = {
|
|
|
34349
34549
|
"recording": "recording",
|
|
34350
34550
|
"mail-email": "email",
|
|
34351
34551
|
"math-plot": "plot",
|
|
34552
|
+
"diagram_html": "diagram",
|
|
34553
|
+
"diagrams-html": "diagram",
|
|
34352
34554
|
"mindmap": "Mind Map",
|
|
34353
34555
|
"mindmaps-mindmap": "Mind Map",
|
|
34354
34556
|
"events-event": "event",
|
|
@@ -35420,6 +35622,15 @@ function renderByDirectType(embed, c, ln) {
|
|
|
35420
35622
|
ln("\x1B[2m[mathematical plot]\x1B[0m");
|
|
35421
35623
|
break;
|
|
35422
35624
|
}
|
|
35625
|
+
case "diagram_html":
|
|
35626
|
+
case "diagrams-html": {
|
|
35627
|
+
ln(str(c.title) ?? "Diagram");
|
|
35628
|
+
const kind = str(c.diagram_kind) ?? "diagram";
|
|
35629
|
+
const width = typeof c.render_width === "number" ? c.render_width : 0;
|
|
35630
|
+
const height = typeof c.render_height === "number" ? c.render_height : 0;
|
|
35631
|
+
ln(`\x1B[2m${kind}${width && height ? ` \xB7 ${width} \xD7 ${height}` : ""}\x1B[0m`);
|
|
35632
|
+
break;
|
|
35633
|
+
}
|
|
35423
35634
|
case "mindmap":
|
|
35424
35635
|
case "mindmaps-mindmap": {
|
|
35425
35636
|
const document = mindMapDocumentFromContent(c);
|
|
@@ -35611,6 +35822,18 @@ function renderDirectTypeFullscreen(embed, c, write) {
|
|
|
35611
35822
|
}
|
|
35612
35823
|
break;
|
|
35613
35824
|
}
|
|
35825
|
+
case "diagram_html":
|
|
35826
|
+
case "diagrams-html": {
|
|
35827
|
+
writeEmbedLine(write, `Title: ${str(c.title) ?? "Diagram"}`);
|
|
35828
|
+
writeEmbedLine(write, `Kind: ${str(c.diagram_kind) ?? "diagram"}`);
|
|
35829
|
+
if (typeof c.render_width === "number" && typeof c.render_height === "number") {
|
|
35830
|
+
writeEmbedLine(write, `Size: ${c.render_width} \xD7 ${c.render_height}`);
|
|
35831
|
+
}
|
|
35832
|
+
writeEmbedLine(write, `Version: ${typeof c.version_number === "number" ? c.version_number : 1}`);
|
|
35833
|
+
writeEmbedLine(write, `Source: ${typeof c.html_source === "string" ? c.html_source.length : 0} characters`);
|
|
35834
|
+
writeEmbedLine(write, "Export with: openmates chats download <chat> --output <directory>");
|
|
35835
|
+
break;
|
|
35836
|
+
}
|
|
35614
35837
|
case "mindmap":
|
|
35615
35838
|
case "mindmaps-mindmap": {
|
|
35616
35839
|
const document = mindMapDocumentFromContent(c);
|
|
@@ -67694,6 +67917,62 @@ Only output the final Markdown table. Do NOT include explanations, notes, or any
|
|
|
67694
67917
|
}
|
|
67695
67918
|
}
|
|
67696
67919
|
},
|
|
67920
|
+
diagrams: {
|
|
67921
|
+
html: {
|
|
67922
|
+
text: "Editable Diagram"
|
|
67923
|
+
},
|
|
67924
|
+
edit: {
|
|
67925
|
+
text: "Edit diagram"
|
|
67926
|
+
},
|
|
67927
|
+
loading: {
|
|
67928
|
+
text: "Preparing diagram\u2026"
|
|
67929
|
+
},
|
|
67930
|
+
invalid_source: {
|
|
67931
|
+
text: "This diagram contains unsupported content."
|
|
67932
|
+
},
|
|
67933
|
+
conflict: {
|
|
67934
|
+
text: "The diagram changed on another device. Reload before editing."
|
|
67935
|
+
},
|
|
67936
|
+
saved: {
|
|
67937
|
+
text: "Diagram saved"
|
|
67938
|
+
},
|
|
67939
|
+
saved_refresh: {
|
|
67940
|
+
text: "Diagram saved. Refresh this page to sync this device before editing again."
|
|
67941
|
+
},
|
|
67942
|
+
history_unavailable: {
|
|
67943
|
+
text: "This diagram version could not be loaded. Choose another version to retry."
|
|
67944
|
+
},
|
|
67945
|
+
history_version: {
|
|
67946
|
+
text: "Viewing version"
|
|
67947
|
+
},
|
|
67948
|
+
save_failed: {
|
|
67949
|
+
text: "Could not save diagram"
|
|
67950
|
+
},
|
|
67951
|
+
zoom_out: {
|
|
67952
|
+
text: "Zoom out"
|
|
67953
|
+
},
|
|
67954
|
+
zoom_in: {
|
|
67955
|
+
text: "Zoom in"
|
|
67956
|
+
},
|
|
67957
|
+
fit: {
|
|
67958
|
+
text: "Fit diagram"
|
|
67959
|
+
},
|
|
67960
|
+
export: {
|
|
67961
|
+
text: "Export HTML"
|
|
67962
|
+
},
|
|
67963
|
+
undo: {
|
|
67964
|
+
text: "Undo"
|
|
67965
|
+
},
|
|
67966
|
+
cancel: {
|
|
67967
|
+
text: "Cancel"
|
|
67968
|
+
},
|
|
67969
|
+
save: {
|
|
67970
|
+
text: "Save changes"
|
|
67971
|
+
},
|
|
67972
|
+
saving: {
|
|
67973
|
+
text: "Saving\u2026"
|
|
67974
|
+
}
|
|
67975
|
+
},
|
|
67697
67976
|
digital_team_mates: {
|
|
67698
67977
|
digital_team_mates: {
|
|
67699
67978
|
text: "Digital Team Mates"
|
|
@@ -70425,6 +70704,9 @@ Only output the final Markdown table. Do NOT include explanations, notes, or any
|
|
|
70425
70704
|
diagrams: {
|
|
70426
70705
|
mermaid: {
|
|
70427
70706
|
text: "Mermaid Diagram"
|
|
70707
|
+
},
|
|
70708
|
+
html: {
|
|
70709
|
+
text: "Editable Diagram"
|
|
70428
70710
|
}
|
|
70429
70711
|
},
|
|
70430
70712
|
mail: {
|
|
@@ -116840,6 +117122,7 @@ ${deleted}/${resolved.length} chat(s) deleted.`);
|
|
|
116840
117122
|
}
|
|
116841
117123
|
const codeEmbeds = [];
|
|
116842
117124
|
const transcriptEmbeds = [];
|
|
117125
|
+
const diagramEmbeds = [];
|
|
116843
117126
|
const processedEmbedIds = /* @__PURE__ */ new Set();
|
|
116844
117127
|
const allEmbedIds = [];
|
|
116845
117128
|
for (const msg of messages) {
|
|
@@ -116856,6 +117139,9 @@ ${deleted}/${resolved.length} chat(s) deleted.`);
|
|
|
116856
117139
|
const eid = embedQueue.shift();
|
|
116857
117140
|
try {
|
|
116858
117141
|
const embed = await client2.getEmbed(eid);
|
|
117142
|
+
if ((embed.type === "diagram_html" || embed.type === "diagrams-html") && typeof embed.content?.html_source === "string" && embed.content.html_source) {
|
|
117143
|
+
diagramEmbeds.push({ embedId: embed.embedId, content: embed.content.html_source });
|
|
117144
|
+
}
|
|
116859
117145
|
if (embed.type === "code" && embed.content) {
|
|
116860
117146
|
const code = typeof embed.content.code === "string" ? embed.content.code : typeof embed.content.content === "string" ? embed.content.content : null;
|
|
116861
117147
|
if (code) {
|
|
@@ -116933,6 +117219,13 @@ ${deleted}/${resolved.length} chat(s) deleted.`);
|
|
|
116933
117219
|
await writeFile3(join31(tDir, te.filename), te.content);
|
|
116934
117220
|
}
|
|
116935
117221
|
}
|
|
117222
|
+
if (diagramEmbeds.length > 0) {
|
|
117223
|
+
const dDir = join31(tmpDir, "diagrams");
|
|
117224
|
+
await mkdir4(dDir, { recursive: true });
|
|
117225
|
+
for (const diagram of diagramEmbeds) {
|
|
117226
|
+
await writeFile3(join31(dDir, `${diagram.embedId}.html`), diagram.content);
|
|
117227
|
+
}
|
|
117228
|
+
}
|
|
116936
117229
|
const zipPath = join31(outputDir, `${filenameBase}.zip`);
|
|
116937
117230
|
const { execSync: execSync2 } = await import("child_process");
|
|
116938
117231
|
try {
|
|
@@ -116974,6 +117267,15 @@ ${deleted}/${resolved.length} chat(s) deleted.`);
|
|
|
116974
117267
|
written.push(`transcripts/${te.filename}`);
|
|
116975
117268
|
}
|
|
116976
117269
|
}
|
|
117270
|
+
if (diagramEmbeds.length > 0) {
|
|
117271
|
+
const dDir = join31(chatDir, "diagrams");
|
|
117272
|
+
await mkdir4(dDir, { recursive: true });
|
|
117273
|
+
for (const diagram of diagramEmbeds) {
|
|
117274
|
+
const filename = `${diagram.embedId}.html`;
|
|
117275
|
+
await writeFile3(join31(dDir, filename), diagram.content);
|
|
117276
|
+
written.push(`diagrams/${filename}`);
|
|
117277
|
+
}
|
|
117278
|
+
}
|
|
116977
117279
|
const label4 = chat.title ? `"${chat.title}"` : chatHandle(chat);
|
|
116978
117280
|
process.stdout.write(
|
|
116979
117281
|
`\x1B[1mDownloaded chat ${label4}\x1B[0m \u2192 ${chatDir}
|
|
@@ -121758,6 +122060,7 @@ ${String(response.assistant ?? "")}
|
|
|
121758
122060
|
}
|
|
121759
122061
|
}
|
|
121760
122062
|
async function sendMessageStreaming(client2, params, redactor) {
|
|
122063
|
+
const preparationStartedAt = performance.now();
|
|
121761
122064
|
let memorySnapshot = [];
|
|
121762
122065
|
const needsMemorySnapshot = client2.hasSession() && (params.incognito !== true || params.piiDetection !== false || params.message.includes("@"));
|
|
121763
122066
|
if (needsMemorySnapshot) {
|
|
@@ -121774,9 +122077,12 @@ async function sendMessageStreaming(client2, params, redactor) {
|
|
|
121774
122077
|
memorySnapshot = [];
|
|
121775
122078
|
}
|
|
121776
122079
|
}
|
|
122080
|
+
const memorySnapshotMs = Math.round(performance.now() - preparationStartedAt);
|
|
122081
|
+
const redactorSeedStartedAt = performance.now();
|
|
121777
122082
|
if (params.piiDetection !== false && redactor) {
|
|
121778
122083
|
redactor.initializeFromMemories(memorySnapshot);
|
|
121779
122084
|
}
|
|
122085
|
+
const redactorSeedMs = Math.round(performance.now() - redactorSeedStartedAt);
|
|
121780
122086
|
let headerPrinted = false;
|
|
121781
122087
|
let typingShown = false;
|
|
121782
122088
|
const renderedEmbedIds = /* @__PURE__ */ new Set();
|
|
@@ -122186,6 +122492,9 @@ ${renderRemoteCommandReview(review)}
|
|
|
122186
122492
|
const urlResult = prepareUrlEmbeds(finalMessage);
|
|
122187
122493
|
finalMessage = urlResult.message;
|
|
122188
122494
|
preparedEmbeds.push(...urlResult.embeds);
|
|
122495
|
+
if (process.env.OPENMATES_DEBUG === "1") {
|
|
122496
|
+
console.error(`[cli preparation] pre_sdk_ms=${Math.round(performance.now() - preparationStartedAt)} memory_snapshot_ms=${memorySnapshotMs} redactor_seed_ms=${redactorSeedMs}`);
|
|
122497
|
+
}
|
|
122189
122498
|
const result = await client2.sendMessage({
|
|
122190
122499
|
message: finalMessage,
|
|
122191
122500
|
chatId: params.chatId,
|
|
@@ -183,6 +183,8 @@ interface SendEmbedDataFrame {
|
|
|
183
183
|
version_number?: number;
|
|
184
184
|
file_path?: string;
|
|
185
185
|
content_hash?: string;
|
|
186
|
+
app_id?: string;
|
|
187
|
+
skill_id?: string;
|
|
186
188
|
text_length_chars?: number;
|
|
187
189
|
is_private?: boolean;
|
|
188
190
|
is_shared?: boolean;
|
|
@@ -731,6 +733,9 @@ interface PreparedEmbed {
|
|
|
731
733
|
filePath?: string;
|
|
732
734
|
contentHash?: string;
|
|
733
735
|
textLengthChars?: number;
|
|
736
|
+
appId?: string;
|
|
737
|
+
skillId?: string;
|
|
738
|
+
versionNumber?: number;
|
|
734
739
|
}
|
|
735
740
|
/** A fully encrypted embed ready for the WebSocket payload */
|
|
736
741
|
interface EncryptedEmbed {
|
|
@@ -745,6 +750,12 @@ interface EncryptedEmbed {
|
|
|
745
750
|
embed_ids?: string[];
|
|
746
751
|
file_path?: string;
|
|
747
752
|
content_hash?: string;
|
|
753
|
+
app_id?: string;
|
|
754
|
+
skill_id?: string;
|
|
755
|
+
root_embed_id?: string;
|
|
756
|
+
workspace_origin?: "chat";
|
|
757
|
+
version_number?: number;
|
|
758
|
+
encryption_mode?: "client";
|
|
748
759
|
text_length_chars?: number;
|
|
749
760
|
created_at: number;
|
|
750
761
|
updated_at: number;
|
|
@@ -2421,6 +2432,8 @@ declare function deriveAppUrl(apiUrl: string): string;
|
|
|
2421
2432
|
declare class OpenMatesClient {
|
|
2422
2433
|
private readonly workflowDeliveriesBySocket;
|
|
2423
2434
|
private readonly ownTeamDisplayNames;
|
|
2435
|
+
private pendingWhoAmIAuthHandoff;
|
|
2436
|
+
private personalMemoryAuthHandoff;
|
|
2424
2437
|
readonly apiUrl: string;
|
|
2425
2438
|
private session;
|
|
2426
2439
|
private readonly http;
|
|
@@ -3776,10 +3789,12 @@ declare class OpenMatesClient {
|
|
|
3776
3789
|
private makeWsClient;
|
|
3777
3790
|
/**
|
|
3778
3791
|
* Refresh ws_token, then create and open a WebSocket client.
|
|
3779
|
-
*
|
|
3780
|
-
*
|
|
3792
|
+
* Opens an authenticated socket. Only a Personal send may supply a
|
|
3793
|
+
* one-use, same-send validated auth receipt; every other use refreshes.
|
|
3781
3794
|
*/
|
|
3782
3795
|
private openWsClient;
|
|
3796
|
+
private personalSendAuthHandoffCurrent;
|
|
3797
|
+
private reusePersonalSendAuthHandoff;
|
|
3783
3798
|
private interactiveViewerChatId;
|
|
3784
3799
|
private interactiveViewerSocket;
|
|
3785
3800
|
private interactiveViewerAllowed;
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export { ak as ImagesAiDetectionClassification, al as ImagesAiDetectionSummary, aK as assertTrustedAccountCommandAllowed, aL as assertTrustedAccountGuardEnvironment, aC as buildImagesAiDetectionSummary, aM as buildProjectDefaultFocus, aN as buildTravelConnectionsRequest, aD as classifyImagesAiDetection, aO as extractExplicitProjectMentions, aF as formatImagesAiDetectionLabel, aG as getExtForLang, aP as handleWiki, aQ as printWhoAmI, aR as readRootProjectInstructions, aS as renderProjectReadApprovalRequest, aT as renderProjectWriteApprovalRequest, aU as renderRemoteCommandEvent, aV as requireExactConfirmation, aW as resolveProjectContext, aJ as serializeToYaml, aX as shouldRequireTrustedAccountGuard, aY as waitForSafeE2ETotpWindow, aZ as waitForWorkflowRun } from './cli-
|
|
2
|
+
export { ak as ImagesAiDetectionClassification, al as ImagesAiDetectionSummary, aK as assertTrustedAccountCommandAllowed, aL as assertTrustedAccountGuardEnvironment, aC as buildImagesAiDetectionSummary, aM as buildProjectDefaultFocus, aN as buildTravelConnectionsRequest, aD as classifyImagesAiDetection, aO as extractExplicitProjectMentions, aF as formatImagesAiDetectionLabel, aG as getExtForLang, aP as handleWiki, aQ as printWhoAmI, aR as readRootProjectInstructions, aS as renderProjectReadApprovalRequest, aT as renderProjectWriteApprovalRequest, aU as renderRemoteCommandEvent, aV as requireExactConfirmation, aW as resolveProjectContext, aJ as serializeToYaml, aX as shouldRequireTrustedAccountGuard, aY as waitForSafeE2ETotpWindow, aZ as waitForWorkflowRun } from './cli-CPgxlEQg.js';
|
package/dist/cli.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
shouldRequireTrustedAccountGuard,
|
|
22
22
|
waitForSafeE2ETotpWindow,
|
|
23
23
|
waitForWorkflowRun
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-CFP7IA76.js";
|
|
25
25
|
import "./chunk-5SFXCJJ4.js";
|
|
26
26
|
import "./chunk-IWKP55ZB.js";
|
|
27
27
|
import "./chunk-F2U6KIMR.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as OpenMatesSession, 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, B as BuyerAddress, 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 WorkflowAuthoringWarning, w as WorkflowInputStartParams, x as WorkflowInputSessionResult, y as WorkflowInputSessionDetail, z as WorkflowInputEvent, A as WorkflowGraph, C as WorkflowRunContentRetention, F as WorkflowRunOnceOptions, G as WorkflowRunDetail, H as WorkflowRunOptions, I as WorkflowNode, J as WorkflowRunCancellationResult, K as WorkflowTemplateProjectionUpsertParams, L as WorkflowTemplateProjectionResult, M as PublicWorkflowTemplateProjection, N as WorkflowTemplateProjectionRevocationResult, Q as WorkflowTemplateBindingCompletionParams, R as WorkflowTemplateBindingCompletionResult, S as WorkflowTemplateShortUrlParams, V as WorkflowTemplateShortUrlResult, X as ShortUrlRevokeResult, Y as WorkflowTemplateImportPayload, Z as ImportedWorkflowTemplate, _ as WikipediaLearningBundle } from './cli-
|
|
2
|
-
export { $ as AuthMethodsStatus, a0 as AuthoritativeChatReconciliation, a1 as BackupCodesResult, a2 as BankTransferOrderDetails, a3 as BankTransferStatus, a4 as CachedChat, a5 as CachedNewChatSuggestion, a6 as ChatListPage, a7 as CliSignupResult, a8 as DecryptedDraft, a9 as DecryptedEmbed, aa as DecryptedMemoryEntry, ab as DecryptedMessage, ac as DecryptedNewChatSuggestion, ad as DocsFile, ae as DocsFolder, af as DocsSearchResult, ag as DocsTree, ah as EncryptedDraft, ai as GiftCardBankTransferStatus, aj as INTEREST_TAG_IDS, ak as ImagesAiDetectionClassification, al as ImagesAiDetectionSummary, am as InterestTagId, an as MATE_NAMES, ao as MEMORY_TYPE_REGISTRY, ap as MemoryFieldDef, aq as MemoryTypeDef, ar as OpenMatesClient, as as OpenMatesClientOptions, at as SyncCache, au as TopicPreferencesPayload, av as TotpSetupStartResult, aw as WorkflowEdge, ax as WorkflowNodeRun, ay as WorkflowNodeType, az as WorkflowReturnedOutputReference, aA as WorkflowRunContentStorage, aB as WorkflowRunRouting, aC as buildImagesAiDetectionSummary, aD as classifyImagesAiDetection, aE as deriveAppUrl, aF as formatImagesAiDetectionLabel, aG as getExtForLang, aH as normalizeInterestTagIds, aI as reconcileAuthoritativeChats, aJ as serializeToYaml } from './cli-
|
|
1
|
+
import { O as OpenMatesSession, 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, B as BuyerAddress, 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 WorkflowAuthoringWarning, w as WorkflowInputStartParams, x as WorkflowInputSessionResult, y as WorkflowInputSessionDetail, z as WorkflowInputEvent, A as WorkflowGraph, C as WorkflowRunContentRetention, F as WorkflowRunOnceOptions, G as WorkflowRunDetail, H as WorkflowRunOptions, I as WorkflowNode, J as WorkflowRunCancellationResult, K as WorkflowTemplateProjectionUpsertParams, L as WorkflowTemplateProjectionResult, M as PublicWorkflowTemplateProjection, N as WorkflowTemplateProjectionRevocationResult, Q as WorkflowTemplateBindingCompletionParams, R as WorkflowTemplateBindingCompletionResult, S as WorkflowTemplateShortUrlParams, V as WorkflowTemplateShortUrlResult, X as ShortUrlRevokeResult, Y as WorkflowTemplateImportPayload, Z as ImportedWorkflowTemplate, _ as WikipediaLearningBundle } from './cli-CPgxlEQg.js';
|
|
2
|
+
export { $ as AuthMethodsStatus, a0 as AuthoritativeChatReconciliation, a1 as BackupCodesResult, a2 as BankTransferOrderDetails, a3 as BankTransferStatus, a4 as CachedChat, a5 as CachedNewChatSuggestion, a6 as ChatListPage, a7 as CliSignupResult, a8 as DecryptedDraft, a9 as DecryptedEmbed, aa as DecryptedMemoryEntry, ab as DecryptedMessage, ac as DecryptedNewChatSuggestion, ad as DocsFile, ae as DocsFolder, af as DocsSearchResult, ag as DocsTree, ah as EncryptedDraft, ai as GiftCardBankTransferStatus, aj as INTEREST_TAG_IDS, ak as ImagesAiDetectionClassification, al as ImagesAiDetectionSummary, am as InterestTagId, an as MATE_NAMES, ao as MEMORY_TYPE_REGISTRY, ap as MemoryFieldDef, aq as MemoryTypeDef, ar as OpenMatesClient, as as OpenMatesClientOptions, at as SyncCache, au as TopicPreferencesPayload, av as TotpSetupStartResult, aw as WorkflowEdge, ax as WorkflowNodeRun, ay as WorkflowNodeType, az as WorkflowReturnedOutputReference, aA as WorkflowRunContentStorage, aB as WorkflowRunRouting, aC as buildImagesAiDetectionSummary, aD as classifyImagesAiDetection, aE as deriveAppUrl, aF as formatImagesAiDetectionLabel, aG as getExtForLang, aH as normalizeInterestTagIds, aI as reconcileAuthoritativeChats, aJ as serializeToYaml } from './cli-CPgxlEQg.js';
|
|
3
3
|
|
|
4
4
|
type ChatModelSelection = "auto" | (string & {});
|
|
5
5
|
interface ChatModelCatalogEntry {
|
package/dist/index.js
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -17,47 +17,47 @@
|
|
|
17
17
|
{
|
|
18
18
|
"name": "libggml-base.so",
|
|
19
19
|
"bytes": 1110088,
|
|
20
|
-
"sha256": "
|
|
20
|
+
"sha256": "b856a8904ac1caa9103ca4958a4d9749b967be77cf30f1ad352d14c6605bf2c2"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"name": "libggml-base.so.0",
|
|
24
24
|
"bytes": 1110088,
|
|
25
|
-
"sha256": "
|
|
25
|
+
"sha256": "b856a8904ac1caa9103ca4958a4d9749b967be77cf30f1ad352d14c6605bf2c2"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"name": "libggml-base.so.0.15.1",
|
|
29
29
|
"bytes": 1110088,
|
|
30
|
-
"sha256": "
|
|
30
|
+
"sha256": "b856a8904ac1caa9103ca4958a4d9749b967be77cf30f1ad352d14c6605bf2c2"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"name": "libggml-cpu.so",
|
|
34
34
|
"bytes": 869800,
|
|
35
|
-
"sha256": "
|
|
35
|
+
"sha256": "02d1f3ecfdc0e0416c481564e679fb0903c73199d5eec6d97aea1011643b7f53"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"name": "libggml-cpu.so.0",
|
|
39
39
|
"bytes": 869800,
|
|
40
|
-
"sha256": "
|
|
40
|
+
"sha256": "02d1f3ecfdc0e0416c481564e679fb0903c73199d5eec6d97aea1011643b7f53"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"name": "libggml-cpu.so.0.15.1",
|
|
44
44
|
"bytes": 869800,
|
|
45
|
-
"sha256": "
|
|
45
|
+
"sha256": "02d1f3ecfdc0e0416c481564e679fb0903c73199d5eec6d97aea1011643b7f53"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"name": "libggml.so",
|
|
49
49
|
"bytes": 1899104,
|
|
50
|
-
"sha256": "
|
|
50
|
+
"sha256": "0bad7ec53db97eb39bcb4b351af20b5942255d0d1f6c0de3e9fbbfa0d312d702"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"name": "libggml.so.0",
|
|
54
54
|
"bytes": 1899104,
|
|
55
|
-
"sha256": "
|
|
55
|
+
"sha256": "0bad7ec53db97eb39bcb4b351af20b5942255d0d1f6c0de3e9fbbfa0d312d702"
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"name": "libggml.so.0.15.1",
|
|
59
59
|
"bytes": 1899104,
|
|
60
|
-
"sha256": "
|
|
60
|
+
"sha256": "0bad7ec53db97eb39bcb4b351af20b5942255d0d1f6c0de3e9fbbfa0d312d702"
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
"name": "openmates-pii-worker",
|