openmates 0.15.0-alpha.35 → 0.15.0-alpha.37
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-CQDCPDZQ.js → chunk-AAMJQMNZ.js} +183 -11
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +48 -0
- package/dist/index.js +1 -1
- package/package.json +4 -2
- package/templates/core/docker-compose.selfhost.yml +13 -11
|
@@ -1739,13 +1739,6 @@ var OpenMatesWsClient = class {
|
|
|
1739
1739
|
});
|
|
1740
1740
|
return;
|
|
1741
1741
|
}
|
|
1742
|
-
if (options?.recoveryTurnId && recoveryJobId && aiResponseDone && !postProcessingDone) {
|
|
1743
|
-
if (postProcessingTimer) {
|
|
1744
|
-
clearTimeout(postProcessingTimer);
|
|
1745
|
-
postProcessingTimer = null;
|
|
1746
|
-
}
|
|
1747
|
-
postProcessingDone = true;
|
|
1748
|
-
}
|
|
1749
1742
|
if (!aiResponseDone || !postProcessingDone) return;
|
|
1750
1743
|
if (options?.recoveryTurnId && !recoveryJobId) return;
|
|
1751
1744
|
if (pendingSubChatHandlers.size > 0) return;
|
|
@@ -5355,6 +5348,59 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
5355
5348
|
if (options.teamId !== void 0) return options.teamId;
|
|
5356
5349
|
return this.getActiveTeamId();
|
|
5357
5350
|
}
|
|
5351
|
+
async startAccountExport(options = {}) {
|
|
5352
|
+
this.requireSession();
|
|
5353
|
+
const response = await this.http.post("/v1/account-exports", {
|
|
5354
|
+
domains: options.domains,
|
|
5355
|
+
filters: options.filters ?? {},
|
|
5356
|
+
format: options.format ?? "zip",
|
|
5357
|
+
include_advanced_metadata: options.includeAdvancedMetadata === true
|
|
5358
|
+
}, this.getCliRequestHeaders());
|
|
5359
|
+
if (!response.ok) throw new Error(`Account export start failed with HTTP ${response.status}`);
|
|
5360
|
+
return response.data;
|
|
5361
|
+
}
|
|
5362
|
+
async getAccountExport(exportId) {
|
|
5363
|
+
this.requireSession();
|
|
5364
|
+
const response = await this.http.get(`/v1/account-exports/${encodeURIComponent(exportId)}`, this.getCliRequestHeaders());
|
|
5365
|
+
if (!response.ok) throw new Error(`Account export status failed with HTTP ${response.status}`);
|
|
5366
|
+
return response.data;
|
|
5367
|
+
}
|
|
5368
|
+
async getAccountExportManifest(exportId) {
|
|
5369
|
+
this.requireSession();
|
|
5370
|
+
const response = await this.http.get(`/v1/account-exports/${encodeURIComponent(exportId)}/manifest`, this.getCliRequestHeaders());
|
|
5371
|
+
if (!response.ok) throw new Error(`Account export manifest failed with HTTP ${response.status}`);
|
|
5372
|
+
return response.data;
|
|
5373
|
+
}
|
|
5374
|
+
async listAccountExportChunks(exportId) {
|
|
5375
|
+
this.requireSession();
|
|
5376
|
+
const response = await this.http.get(`/v1/account-exports/${encodeURIComponent(exportId)}/chunks`, this.getCliRequestHeaders());
|
|
5377
|
+
if (!response.ok) throw new Error(`Account export chunk list failed with HTTP ${response.status}`);
|
|
5378
|
+
return response.data;
|
|
5379
|
+
}
|
|
5380
|
+
async getAccountExportChunk(exportId, chunkId) {
|
|
5381
|
+
this.requireSession();
|
|
5382
|
+
const response = await this.http.get(`/v1/account-exports/${encodeURIComponent(exportId)}/chunks/${encodeURIComponent(chunkId)}`, this.getCliRequestHeaders());
|
|
5383
|
+
if (!response.ok || !response.data.chunk) throw new Error(`Account export chunk download failed with HTTP ${response.status}`);
|
|
5384
|
+
return response.data.chunk;
|
|
5385
|
+
}
|
|
5386
|
+
async completeAccountExport(exportId) {
|
|
5387
|
+
this.requireSession();
|
|
5388
|
+
const response = await this.http.post(`/v1/account-exports/${encodeURIComponent(exportId)}/complete`, {}, this.getCliRequestHeaders());
|
|
5389
|
+
if (!response.ok) throw new Error(`Account export complete failed with HTTP ${response.status}`);
|
|
5390
|
+
return response.data;
|
|
5391
|
+
}
|
|
5392
|
+
async acceptPartialAccountExport(exportId) {
|
|
5393
|
+
this.requireSession();
|
|
5394
|
+
const response = await this.http.post(`/v1/account-exports/${encodeURIComponent(exportId)}/accept-partial`, {}, this.getCliRequestHeaders());
|
|
5395
|
+
if (!response.ok) throw new Error(`Account export accept partial failed with HTTP ${response.status}`);
|
|
5396
|
+
return response.data;
|
|
5397
|
+
}
|
|
5398
|
+
async cancelAccountExport(exportId) {
|
|
5399
|
+
this.requireSession();
|
|
5400
|
+
const response = await this.http.post(`/v1/account-exports/${encodeURIComponent(exportId)}/cancel`, {}, this.getCliRequestHeaders());
|
|
5401
|
+
if (!response.ok) throw new Error(`Account export cancel failed with HTTP ${response.status}`);
|
|
5402
|
+
return response.data;
|
|
5403
|
+
}
|
|
5358
5404
|
appendTeamQuery(path, options = {}) {
|
|
5359
5405
|
const teamId = this.resolveTeamContext(options);
|
|
5360
5406
|
if (!teamId) return path;
|
|
@@ -15869,6 +15915,53 @@ var OpenMatesAccount = class {
|
|
|
15869
15915
|
async clearInterests() {
|
|
15870
15916
|
return this.setInterests([]);
|
|
15871
15917
|
}
|
|
15918
|
+
async startExport(options = {}) {
|
|
15919
|
+
return this.client.request("/v1/account-exports", {
|
|
15920
|
+
domains: options.domains,
|
|
15921
|
+
filters: options.filters ?? {},
|
|
15922
|
+
format: options.format ?? "zip",
|
|
15923
|
+
include_advanced_metadata: options.includeAdvancedMetadata === true
|
|
15924
|
+
});
|
|
15925
|
+
}
|
|
15926
|
+
async getExport(exportId) {
|
|
15927
|
+
return this.client.get(`/v1/account-exports/${encodeURIComponent(exportId)}`);
|
|
15928
|
+
}
|
|
15929
|
+
async exportJobManifest(exportId) {
|
|
15930
|
+
return this.client.get(`/v1/account-exports/${encodeURIComponent(exportId)}/manifest`);
|
|
15931
|
+
}
|
|
15932
|
+
async exportChunks(exportId) {
|
|
15933
|
+
return this.client.get(`/v1/account-exports/${encodeURIComponent(exportId)}/chunks`);
|
|
15934
|
+
}
|
|
15935
|
+
async exportChunk(exportId, chunkId) {
|
|
15936
|
+
const result = await this.client.get(`/v1/account-exports/${encodeURIComponent(exportId)}/chunks/${encodeURIComponent(chunkId)}`);
|
|
15937
|
+
return result.chunk ?? {};
|
|
15938
|
+
}
|
|
15939
|
+
async *iterExportChunks(exportId) {
|
|
15940
|
+
const listed = await this.exportChunks(exportId);
|
|
15941
|
+
for (const chunk of listed.chunks) {
|
|
15942
|
+
const chunkId = String(chunk.chunk_id ?? "");
|
|
15943
|
+
yield chunkId ? await this.exportChunk(exportId, chunkId) : chunk;
|
|
15944
|
+
}
|
|
15945
|
+
}
|
|
15946
|
+
async completeExport(exportId) {
|
|
15947
|
+
return this.client.request(`/v1/account-exports/${encodeURIComponent(exportId)}/complete`, {});
|
|
15948
|
+
}
|
|
15949
|
+
async acceptPartialExport(exportId) {
|
|
15950
|
+
return this.client.request(`/v1/account-exports/${encodeURIComponent(exportId)}/accept-partial`, {});
|
|
15951
|
+
}
|
|
15952
|
+
async cancelExport(exportId) {
|
|
15953
|
+
return this.client.request(`/v1/account-exports/${encodeURIComponent(exportId)}/cancel`, {});
|
|
15954
|
+
}
|
|
15955
|
+
async downloadExport(options = {}) {
|
|
15956
|
+
const started = await this.startExport(options);
|
|
15957
|
+
const exportId = String(started.export.export_id ?? "");
|
|
15958
|
+
const [manifest, chunks] = await Promise.all([
|
|
15959
|
+
this.exportJobManifest(exportId),
|
|
15960
|
+
this.exportChunks(exportId)
|
|
15961
|
+
]);
|
|
15962
|
+
const completed = await this.completeExport(exportId);
|
|
15963
|
+
return { export: completed.export, manifest: manifest.manifest, chunks: chunks.chunks };
|
|
15964
|
+
}
|
|
15872
15965
|
async exportManifest() {
|
|
15873
15966
|
return this.client.get("/v1/sdk/account/export/manifest");
|
|
15874
15967
|
}
|
|
@@ -59592,6 +59685,10 @@ async function main() {
|
|
|
59592
59685
|
printSettingsHelp(client);
|
|
59593
59686
|
return;
|
|
59594
59687
|
}
|
|
59688
|
+
if (command === "account") {
|
|
59689
|
+
printSettingsHelp(client, ["account"]);
|
|
59690
|
+
return;
|
|
59691
|
+
}
|
|
59595
59692
|
if (command === "workflows") {
|
|
59596
59693
|
printWorkflowsHelp();
|
|
59597
59694
|
return;
|
|
@@ -59754,6 +59851,10 @@ async function main() {
|
|
|
59754
59851
|
await handleSettings(client, subcommand, rest, parsed.flags);
|
|
59755
59852
|
return;
|
|
59756
59853
|
}
|
|
59854
|
+
if (command === "account") {
|
|
59855
|
+
await handleSettings(client, "account", [subcommand, ...rest].filter((part) => typeof part === "string"), parsed.flags);
|
|
59856
|
+
return;
|
|
59857
|
+
}
|
|
59757
59858
|
if (command === "workflows") {
|
|
59758
59859
|
await handleWorkflows(client, subcommand, rest, parsed.flags);
|
|
59759
59860
|
return;
|
|
@@ -62746,8 +62847,12 @@ var SETTINGS_EXECUTABLE_COMMANDS = [
|
|
|
62746
62847
|
{ path: ["account", "interests", "list"], description: "Show encrypted account topic interests", examples: ["openmates settings account interests list --json"] },
|
|
62747
62848
|
{ path: ["account", "interests", "set"], description: "Set encrypted account topic interests", examples: ["openmates settings account interests set software_development run_code privacy"] },
|
|
62748
62849
|
{ path: ["account", "interests", "clear"], description: "Clear encrypted account topic interests", examples: ["openmates settings account interests clear --yes"] },
|
|
62749
|
-
{ path: ["account", "export"
|
|
62750
|
-
{ path: ["account", "export", "
|
|
62850
|
+
{ path: ["account", "export"], description: "Start a complete Account Export V1 job", examples: ["openmates account export --output ./openmates-export.json", "openmates settings account export --domains chats,usage --json"] },
|
|
62851
|
+
{ path: ["account", "export", "start"], description: "Start a complete Account Export V1 job", examples: ["openmates settings account export start --output ./openmates-export.json"] },
|
|
62852
|
+
{ path: ["account", "export", "status"], description: "Show account export job status", examples: ["openmates settings account export status <export-id> --json"] },
|
|
62853
|
+
{ path: ["account", "export", "manifest"], description: "Show account export manifest", examples: ["openmates settings account export manifest <export-id> --json"] },
|
|
62854
|
+
{ path: ["account", "export", "chunks"], description: "List account export chunks", examples: ["openmates settings account export chunks <export-id> --json"] },
|
|
62855
|
+
{ path: ["account", "export", "data"], description: "Fetch account export chunks", examples: ["openmates settings account export data <export-id> --json"] },
|
|
62751
62856
|
{ path: ["account", "import-chat"], description: "Import a CLI chat export file", examples: ["openmates settings account import-chat ./chat.yml", "openmates settings account import-chat ./payload.json"] },
|
|
62752
62857
|
{ path: ["account", "username", "set"], description: "Change account username", examples: ["openmates settings account username set alice_123"] },
|
|
62753
62858
|
{ path: ["account", "profile-picture", "set"], description: "Upload a profile picture", examples: ["openmates settings account profile-picture set ./avatar.jpg"] },
|
|
@@ -62838,6 +62943,47 @@ async function printSettingsResult(resultPromise, flags) {
|
|
|
62838
62943
|
printGenericObject(result);
|
|
62839
62944
|
}
|
|
62840
62945
|
}
|
|
62946
|
+
function parseCsvFlag(value) {
|
|
62947
|
+
if (typeof value !== "string") return void 0;
|
|
62948
|
+
const items = value.split(",").map((item) => item.trim()).filter(Boolean);
|
|
62949
|
+
return items.length > 0 ? items : void 0;
|
|
62950
|
+
}
|
|
62951
|
+
async function runAccountExport(client, flags) {
|
|
62952
|
+
const filters = typeof flags.filters === "string" ? parseJsonFlag(flags.filters, "--filters") : {};
|
|
62953
|
+
const started = await client.startAccountExport({
|
|
62954
|
+
domains: parseCsvFlag(flags.domains),
|
|
62955
|
+
filters,
|
|
62956
|
+
format: flags.format === "directory" ? "directory" : "zip",
|
|
62957
|
+
includeAdvancedMetadata: flags["include-advanced-metadata"] === true
|
|
62958
|
+
});
|
|
62959
|
+
const exportRecord = started.export;
|
|
62960
|
+
const exportId = String(exportRecord.export_id ?? "");
|
|
62961
|
+
const [manifest, chunks] = await Promise.all([
|
|
62962
|
+
client.getAccountExportManifest(exportId),
|
|
62963
|
+
client.listAccountExportChunks(exportId)
|
|
62964
|
+
]);
|
|
62965
|
+
const completed = await client.completeAccountExport(exportId);
|
|
62966
|
+
return {
|
|
62967
|
+
export: completed.export,
|
|
62968
|
+
manifest: manifest.manifest,
|
|
62969
|
+
chunks: chunks.chunks
|
|
62970
|
+
};
|
|
62971
|
+
}
|
|
62972
|
+
function printAccountExportBundle(bundle, flags) {
|
|
62973
|
+
if (typeof flags.output === "string") {
|
|
62974
|
+
writeFileSync7(flags.output, `${JSON.stringify(bundle, null, 2)}
|
|
62975
|
+
`, "utf-8");
|
|
62976
|
+
}
|
|
62977
|
+
if (flags.json === true) {
|
|
62978
|
+
printJson2(typeof flags.output === "string" ? { ...bundle, output: flags.output } : bundle);
|
|
62979
|
+
return;
|
|
62980
|
+
}
|
|
62981
|
+
const exportRecord = bundle.export && typeof bundle.export === "object" ? bundle.export : {};
|
|
62982
|
+
process.stdout.write(`Account export ${String(exportRecord.export_id ?? "")} ${String(exportRecord.status ?? "unknown")}
|
|
62983
|
+
`);
|
|
62984
|
+
if (typeof flags.output === "string") process.stdout.write(`Wrote ${flags.output}
|
|
62985
|
+
`);
|
|
62986
|
+
}
|
|
62841
62987
|
function printApiKeyList(result, flags) {
|
|
62842
62988
|
if (flags.json === true) {
|
|
62843
62989
|
printJson2(result);
|
|
@@ -63548,12 +63694,38 @@ async function handleSettings(client, subcommand, rest, flags) {
|
|
|
63548
63694
|
printTopicPreferences(preferences, flags, "Interests cleared");
|
|
63549
63695
|
return;
|
|
63550
63696
|
}
|
|
63697
|
+
if (matches(tokens, ["account", "export"]) || matches(tokens, ["account", "export", "start"])) {
|
|
63698
|
+
printAccountExportBundle(await runAccountExport(client, flags), flags);
|
|
63699
|
+
return;
|
|
63700
|
+
}
|
|
63701
|
+
if (matches(tokens, ["account", "export", "status"])) {
|
|
63702
|
+
const exportId = rest[2];
|
|
63703
|
+
if (!exportId) throw new Error("Missing export ID. Example: openmates settings account export status <export-id>");
|
|
63704
|
+
await printSettingsResult(client.getAccountExport(exportId), flags);
|
|
63705
|
+
return;
|
|
63706
|
+
}
|
|
63551
63707
|
if (matches(tokens, ["account", "export", "manifest"])) {
|
|
63552
|
-
|
|
63708
|
+
const exportId = rest[2];
|
|
63709
|
+
if (!exportId) {
|
|
63710
|
+
await printSettingsResult(client.settingsGet("export-account-manifest"), flags);
|
|
63711
|
+
return;
|
|
63712
|
+
}
|
|
63713
|
+
await printSettingsResult(client.getAccountExportManifest(exportId), flags);
|
|
63714
|
+
return;
|
|
63715
|
+
}
|
|
63716
|
+
if (matches(tokens, ["account", "export", "chunks"])) {
|
|
63717
|
+
const exportId = rest[2];
|
|
63718
|
+
if (!exportId) throw new Error("Missing export ID. Example: openmates settings account export chunks <export-id>");
|
|
63719
|
+
await printSettingsResult(client.listAccountExportChunks(exportId), flags);
|
|
63553
63720
|
return;
|
|
63554
63721
|
}
|
|
63555
63722
|
if (matches(tokens, ["account", "export", "data"])) {
|
|
63556
|
-
|
|
63723
|
+
const exportId = rest[2];
|
|
63724
|
+
if (!exportId) {
|
|
63725
|
+
await printSettingsResult(client.settingsGet("export-account-data"), flags);
|
|
63726
|
+
return;
|
|
63727
|
+
}
|
|
63728
|
+
await printSettingsResult(client.listAccountExportChunks(exportId), flags);
|
|
63557
63729
|
return;
|
|
63558
63730
|
}
|
|
63559
63731
|
if (matches(tokens, ["account", "import-chat"])) {
|
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -478,6 +478,21 @@ interface TeamContextOptions {
|
|
|
478
478
|
teamId?: string | null;
|
|
479
479
|
personal?: boolean;
|
|
480
480
|
}
|
|
481
|
+
interface AccountExportStartOptions$1 {
|
|
482
|
+
domains?: string[];
|
|
483
|
+
filters?: Record<string, unknown>;
|
|
484
|
+
format?: "zip" | "directory";
|
|
485
|
+
includeAdvancedMetadata?: boolean;
|
|
486
|
+
}
|
|
487
|
+
interface AccountExportResponse$1 {
|
|
488
|
+
export: Record<string, unknown>;
|
|
489
|
+
}
|
|
490
|
+
interface AccountExportManifestResponse$1 {
|
|
491
|
+
manifest: Record<string, unknown>;
|
|
492
|
+
}
|
|
493
|
+
interface AccountExportChunksResponse$1 {
|
|
494
|
+
chunks: Array<Record<string, unknown>>;
|
|
495
|
+
}
|
|
481
496
|
interface TeamCreateInput {
|
|
482
497
|
name?: string;
|
|
483
498
|
description?: string | null;
|
|
@@ -1249,6 +1264,14 @@ declare class OpenMatesClient {
|
|
|
1249
1264
|
getActiveTeamId(): string | null;
|
|
1250
1265
|
setActiveTeamId(teamId: string | null): void;
|
|
1251
1266
|
resolveTeamContext(options?: TeamContextOptions): string | null;
|
|
1267
|
+
startAccountExport(options?: AccountExportStartOptions$1): Promise<AccountExportResponse$1>;
|
|
1268
|
+
getAccountExport(exportId: string): Promise<AccountExportResponse$1>;
|
|
1269
|
+
getAccountExportManifest(exportId: string): Promise<AccountExportManifestResponse$1>;
|
|
1270
|
+
listAccountExportChunks(exportId: string): Promise<AccountExportChunksResponse$1>;
|
|
1271
|
+
getAccountExportChunk(exportId: string, chunkId: string): Promise<Record<string, unknown>>;
|
|
1272
|
+
completeAccountExport(exportId: string): Promise<AccountExportResponse$1>;
|
|
1273
|
+
acceptPartialAccountExport(exportId: string): Promise<AccountExportResponse$1>;
|
|
1274
|
+
cancelAccountExport(exportId: string): Promise<AccountExportResponse$1>;
|
|
1252
1275
|
private appendTeamQuery;
|
|
1253
1276
|
listTeams(): Promise<TeamRecord[]>;
|
|
1254
1277
|
createTeam(input: TeamCreateInput): Promise<TeamRecord>;
|
|
@@ -5136,6 +5159,21 @@ interface ConfirmedMutationOptions {
|
|
|
5136
5159
|
interface RequestOptions {
|
|
5137
5160
|
query?: Record<string, string | number | boolean | undefined | null>;
|
|
5138
5161
|
}
|
|
5162
|
+
interface AccountExportStartOptions {
|
|
5163
|
+
domains?: string[];
|
|
5164
|
+
filters?: Record<string, unknown>;
|
|
5165
|
+
format?: "zip" | "directory";
|
|
5166
|
+
includeAdvancedMetadata?: boolean;
|
|
5167
|
+
}
|
|
5168
|
+
interface AccountExportResponse {
|
|
5169
|
+
export: Record<string, unknown>;
|
|
5170
|
+
}
|
|
5171
|
+
interface AccountExportManifestResponse {
|
|
5172
|
+
manifest: Record<string, unknown>;
|
|
5173
|
+
}
|
|
5174
|
+
interface AccountExportChunksResponse {
|
|
5175
|
+
chunks: Array<Record<string, unknown>>;
|
|
5176
|
+
}
|
|
5139
5177
|
interface ApiKeyCreateOptions {
|
|
5140
5178
|
name: string;
|
|
5141
5179
|
fullAccess?: boolean;
|
|
@@ -5387,6 +5425,16 @@ declare class OpenMatesAccount {
|
|
|
5387
5425
|
listInterests(): Promise<Record<string, unknown>>;
|
|
5388
5426
|
setInterests(selectedTagIds: string[]): Promise<Record<string, unknown>>;
|
|
5389
5427
|
clearInterests(): Promise<Record<string, unknown>>;
|
|
5428
|
+
startExport(options?: AccountExportStartOptions): Promise<AccountExportResponse>;
|
|
5429
|
+
getExport(exportId: string): Promise<AccountExportResponse>;
|
|
5430
|
+
exportJobManifest(exportId: string): Promise<AccountExportManifestResponse>;
|
|
5431
|
+
exportChunks(exportId: string): Promise<AccountExportChunksResponse>;
|
|
5432
|
+
exportChunk(exportId: string, chunkId: string): Promise<Record<string, unknown>>;
|
|
5433
|
+
iterExportChunks(exportId: string): AsyncGenerator<Record<string, unknown>>;
|
|
5434
|
+
completeExport(exportId: string): Promise<AccountExportResponse>;
|
|
5435
|
+
acceptPartialExport(exportId: string): Promise<AccountExportResponse>;
|
|
5436
|
+
cancelExport(exportId: string): Promise<AccountExportResponse>;
|
|
5437
|
+
downloadExport(options?: AccountExportStartOptions): Promise<Record<string, unknown>>;
|
|
5390
5438
|
exportManifest(): Promise<Record<string, unknown>>;
|
|
5391
5439
|
exportData(): Promise<Record<string, unknown>>;
|
|
5392
5440
|
setUsername(username: string): Promise<Record<string, unknown>>;
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openmates",
|
|
3
|
-
"version": "0.15.0-alpha.
|
|
3
|
+
"version": "0.15.0-alpha.37",
|
|
4
4
|
"description": "OpenMates CLI and SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,11 +30,13 @@
|
|
|
30
30
|
"test:unit:workflows": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/workflows.test.ts",
|
|
31
31
|
"test:unit:sdk-workflows": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/sdk-workflows.test.ts",
|
|
32
32
|
"test:unit:remote-access": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/remoteSources.test.ts tests/remoteAccess.test.ts",
|
|
33
|
+
"test:unit:teams": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/teams-permissions.test.ts",
|
|
33
34
|
"test:unit:proton-bridge-connector": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/protonBridgeConnector.test.ts",
|
|
34
35
|
"test:unit:proton-bridge-connector-integration": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/protonBridgeConnector.integration.test.ts",
|
|
35
36
|
"test:unit:sdk-projects": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/sdk-projects.test.ts",
|
|
36
37
|
"test:unit:billing": "node --test tests/billing.test.ts",
|
|
37
38
|
"test:unit:account-delete": "node --test tests/account-delete.test.ts",
|
|
39
|
+
"test:unit:ideabucket": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/ideabucket.test.ts",
|
|
38
40
|
"test:unit:cli": "node --test tests/cli.test.ts",
|
|
39
41
|
"test:t-cli-recovery": "node --test --experimental-strip-types --loader ./tests/loader.mjs --test-name-pattern recovery tests/client.test.ts",
|
|
40
42
|
"test:t-cli-update-required": "npm run build && node --test --test-name-pattern update-required tests/cli.test.ts",
|
|
@@ -43,7 +45,7 @@
|
|
|
43
45
|
"test:unit:tui": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/tui.test.ts tests/tuiExampleContinuation.test.ts tests/tuiWorkflowInteraction.test.ts",
|
|
44
46
|
"test:unit:connected-account-import": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/connectedAccountImport.test.ts",
|
|
45
47
|
"test:unit:benchmark": "node --test --experimental-strip-types --loader ./tests/loader.mjs src/__tests__/benchmark.test.ts",
|
|
46
|
-
"test": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/crypto.test.ts tests/storage.test.ts tests/keychain.test.ts tests/mentions.test.ts tests/outputRedactor.test.ts tests/fileEmbed.test.ts tests/embedCreator.test.ts tests/shareEncryption.test.ts tests/server.test.ts tests/ws.test.ts tests/urlEmbed.test.ts tests/tui.test.ts tests/tuiExampleContinuation.test.ts tests/tuiWorkflowInteraction.test.ts tests/workflows.test.ts tests/sdk-workflows.test.ts tests/draft-sync.test.ts tests/sdk-draft-sync.test.ts src/__tests__/benchmark.test.ts && node --test --experimental-strip-types --loader ./tests/loader.mjs tests/embedRenderers.test.ts tests/connectedAccountImport.test.ts && node --test tests/cli.test.ts tests/billing.test.ts tests/account-delete.test.ts tests/signup.test.ts tests/security-setup.test.ts tests/e2e-provisioning.test.ts"
|
|
48
|
+
"test": "node --test --experimental-strip-types --loader ./tests/loader.mjs tests/crypto.test.ts tests/storage.test.ts tests/keychain.test.ts tests/mentions.test.ts tests/outputRedactor.test.ts tests/fileEmbed.test.ts tests/embedCreator.test.ts tests/shareEncryption.test.ts tests/server.test.ts tests/ws.test.ts tests/urlEmbed.test.ts tests/tui.test.ts tests/tuiExampleContinuation.test.ts tests/tuiWorkflowInteraction.test.ts tests/workflows.test.ts tests/sdk-workflows.test.ts tests/draft-sync.test.ts tests/sdk-draft-sync.test.ts tests/ideabucket.test.ts tests/teams-permissions.test.ts src/__tests__/benchmark.test.ts && node --test --experimental-strip-types --loader ./tests/loader.mjs tests/embedRenderers.test.ts tests/connectedAccountImport.test.ts && node --test tests/cli.test.ts tests/billing.test.ts tests/account-delete.test.ts tests/signup.test.ts tests/security-setup.test.ts tests/e2e-provisioning.test.ts"
|
|
47
49
|
},
|
|
48
50
|
"keywords": [
|
|
49
51
|
"openmates",
|
|
@@ -185,25 +185,27 @@ services:
|
|
|
185
185
|
restart: on-failure
|
|
186
186
|
|
|
187
187
|
task-worker:
|
|
188
|
-
|
|
188
|
+
<<: *openmates-worker-base
|
|
189
189
|
container_name: task-worker
|
|
190
|
-
restart: unless-stopped
|
|
191
190
|
mem_limit: ${TASK_WORKER_MEMORY_LIMIT:-3g}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
191
|
+
environment:
|
|
192
|
+
<<: *openmates-worker-env
|
|
193
|
+
CELERY_QUEUES: email,user_init,persistence,health_check,server_stats,demo,reminder,push
|
|
194
|
+
CELERY_AUTOSCALE_MAX: ${TASK_WORKER_CONCURRENCY:-${CELERY_AUTOSCALE_MAX:-3}}
|
|
195
|
+
CELERY_AUTOSCALE_MIN: ${CELERY_AUTOSCALE_MIN:-1}
|
|
196
|
+
CELERY_METRICS_PORT: "9101"
|
|
197
|
+
command: >
|
|
198
|
+
sh -c "chown -R celeryuser:celeryuser /vault-data && gosu celeryuser python -m celery -A backend.core.api.app.tasks.celery_config worker --loglevel=info --queues=email,user_init,persistence,health_check,server_stats,demo,reminder,push --concurrency=$${CELERY_AUTOSCALE_MAX} --max-tasks-per-child=50 --max-memory-per-child=600000 --prefetch-multiplier=1"
|
|
196
199
|
|
|
197
200
|
task-scheduler:
|
|
198
|
-
|
|
201
|
+
<<: *openmates-worker-base
|
|
199
202
|
container_name: task-scheduler
|
|
200
|
-
restart: unless-stopped
|
|
201
|
-
env_file: ../../.env
|
|
202
203
|
command: python -m celery -A backend.core.api.app.tasks.celery_config beat --loglevel=info --schedule=/celerybeat-data/celerybeat-schedule
|
|
203
204
|
volumes:
|
|
205
|
+
- ../../config:/app_config
|
|
206
|
+
- vault-setup-data:/vault-data
|
|
207
|
+
- api-logs:/app/logs
|
|
204
208
|
- celerybeat-schedule-data:/celerybeat-data
|
|
205
|
-
networks: [openmates]
|
|
206
|
-
depends_on: [api]
|
|
207
209
|
|
|
208
210
|
app-ai-worker:
|
|
209
211
|
<<: *openmates-worker-base
|