openmates 0.15.0-alpha.31 → 0.15.0-alpha.32
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-SWTPHQZU.js → chunk-4UXNJ2I6.js} +325 -4
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +84 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -3908,6 +3908,22 @@ function normalizeUnixSeconds(value, fallback) {
|
|
|
3908
3908
|
}
|
|
3909
3909
|
return value > 1e10 ? Math.floor(value / 1e3) : Math.floor(value);
|
|
3910
3910
|
}
|
|
3911
|
+
function defaultIdeaBucketProcessingWindowId(date = /* @__PURE__ */ new Date()) {
|
|
3912
|
+
return date.toISOString().slice(0, 10);
|
|
3913
|
+
}
|
|
3914
|
+
function defaultIdeaBucketScheduledSendAt(nowSeconds2) {
|
|
3915
|
+
const date = new Date(nowSeconds2 * 1e3);
|
|
3916
|
+
const sendAt = Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate() + 1, 9, 0, 0) / 1e3;
|
|
3917
|
+
return Math.floor(sendAt);
|
|
3918
|
+
}
|
|
3919
|
+
function buildIdeaBucketMarkdown(prompt, ideas) {
|
|
3920
|
+
const blocks = ideas.map((idea) => [
|
|
3921
|
+
`----- Idea ${idea.index} -----`,
|
|
3922
|
+
idea.content.trim(),
|
|
3923
|
+
"-----------------"
|
|
3924
|
+
].join("\n"));
|
|
3925
|
+
return [prompt.trim(), ...blocks].join("\n\n");
|
|
3926
|
+
}
|
|
3911
3927
|
function shouldWaitForTeamAi(message, teamId) {
|
|
3912
3928
|
return !teamId || message.toLowerCase().includes("@openmates");
|
|
3913
3929
|
}
|
|
@@ -4586,6 +4602,9 @@ var MEMORY_TYPE_REGISTRY = {
|
|
|
4586
4602
|
properties: { url: { type: "string" }, notes: { type: "string" } }
|
|
4587
4603
|
}
|
|
4588
4604
|
};
|
|
4605
|
+
var IDEABUCKET_DEFAULT_PROCESSING_PROMPT = `These are my captured ideas for today. Please process them, group related thoughts, suggest next actions, and ask clarifying questions where needed:
|
|
4606
|
+
|
|
4607
|
+
If an idea requires deeper work, create or suggest sub-chats for focused research, planning, todos, docs, or implementation.`;
|
|
4589
4608
|
function reconcileAuthoritativeChats(chats, evidence) {
|
|
4590
4609
|
const deletedIds = new Set(evidence.deleted_chat_ids ?? []);
|
|
4591
4610
|
const authoritativeIds = evidence.authoritative && evidence.authoritative_chat_ids ? new Set(evidence.authoritative_chat_ids) : null;
|
|
@@ -5069,7 +5088,7 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
5069
5088
|
this.getCliRequestHeaders()
|
|
5070
5089
|
);
|
|
5071
5090
|
if (!response.ok) throw new Error(`${workspaceType} move failed with HTTP ${response.status}`);
|
|
5072
|
-
return response.data;
|
|
5091
|
+
return { success: true, ...response.data };
|
|
5073
5092
|
}
|
|
5074
5093
|
async getAnonymousFreeUsageStatus() {
|
|
5075
5094
|
const response = await this.http.get("/v1/anonymous/free-usage/status");
|
|
@@ -5765,7 +5784,8 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
5765
5784
|
await ws.sendAsync("update_draft", {
|
|
5766
5785
|
chat_id: params.chatId,
|
|
5767
5786
|
encrypted_draft_md: params.encryptedDraftMd,
|
|
5768
|
-
encrypted_draft_preview: params.encryptedDraftPreview ?? null
|
|
5787
|
+
encrypted_draft_preview: params.encryptedDraftPreview ?? null,
|
|
5788
|
+
...params.extraPayload ?? {}
|
|
5769
5789
|
});
|
|
5770
5790
|
const response = await receipt;
|
|
5771
5791
|
const draftV = Number(response.payload.draft_v ?? 0);
|
|
@@ -5785,6 +5805,78 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
5785
5805
|
ws.close();
|
|
5786
5806
|
}
|
|
5787
5807
|
}
|
|
5808
|
+
async addIdeaBucketText(params) {
|
|
5809
|
+
const ideaText = params.text.trim();
|
|
5810
|
+
if (!ideaText) throw new Error("IdeaBucket text capture requires non-empty text.");
|
|
5811
|
+
const now = Math.floor(Date.now() / 1e3);
|
|
5812
|
+
const chatId = params.chatId ?? randomUUID5();
|
|
5813
|
+
const bucketId = params.bucketId ?? defaultIdeaBucketProcessingWindowId();
|
|
5814
|
+
const processingWindowId = bucketId;
|
|
5815
|
+
const scheduledSendAt = params.scheduledSendAt ?? defaultIdeaBucketScheduledSendAt(now);
|
|
5816
|
+
const version = params.version ?? now;
|
|
5817
|
+
const prompt = params.prompt ?? IDEABUCKET_DEFAULT_PROCESSING_PROMPT;
|
|
5818
|
+
const markdown = buildIdeaBucketMarkdown(prompt, [{ index: 1, content: ideaText }]);
|
|
5819
|
+
const preview = `IdeaBucket ${processingWindowId}: ${ideaText.slice(0, 120)}`;
|
|
5820
|
+
const serverProcessablePayload = JSON.stringify({
|
|
5821
|
+
prompt,
|
|
5822
|
+
processing_window_id: processingWindowId,
|
|
5823
|
+
ideas: [{ index: 1, type: "text", text: ideaText }]
|
|
5824
|
+
});
|
|
5825
|
+
const payloadHash = createHash7("sha256").update(serverProcessablePayload).digest("hex");
|
|
5826
|
+
const masterKey = this.getMasterKeyBytes();
|
|
5827
|
+
const encryptedDraftMd = await encryptWithAesGcmCombined(markdown, masterKey);
|
|
5828
|
+
const encryptedPreview = await encryptWithAesGcmCombined(preview, masterKey);
|
|
5829
|
+
const encryptedFutureUserMessage = await encryptWithAesGcmCombined(markdown, masterKey);
|
|
5830
|
+
const encryptedSystemEvent = await encryptWithAesGcmCombined(JSON.stringify({
|
|
5831
|
+
type: "ideabucket_triggered_send",
|
|
5832
|
+
processing_window_id: processingWindowId,
|
|
5833
|
+
source: "openmates_cli"
|
|
5834
|
+
}), masterKey);
|
|
5835
|
+
const serverCacheCiphertext = await encryptWithAesGcmCombined(serverProcessablePayload, masterKey);
|
|
5836
|
+
const encrypted = await this.saveEncryptedDraft({
|
|
5837
|
+
chatId,
|
|
5838
|
+
encryptedDraftMd,
|
|
5839
|
+
encryptedDraftPreview: encryptedPreview,
|
|
5840
|
+
extraPayload: {
|
|
5841
|
+
ideabucket: true,
|
|
5842
|
+
ideabucket_processing_window_id: processingWindowId,
|
|
5843
|
+
ideabucket_processing_version: version,
|
|
5844
|
+
scheduled_send_at: scheduledSendAt,
|
|
5845
|
+
server_vault_encrypted_processing_payload: serverCacheCiphertext,
|
|
5846
|
+
client_encrypted_future_user_message: encryptedFutureUserMessage,
|
|
5847
|
+
client_encrypted_ideabucket_system_event: encryptedSystemEvent,
|
|
5848
|
+
payload_hash: payloadHash
|
|
5849
|
+
}
|
|
5850
|
+
});
|
|
5851
|
+
return {
|
|
5852
|
+
chatId,
|
|
5853
|
+
bucketId,
|
|
5854
|
+
processingWindowId,
|
|
5855
|
+
scheduledSendAt,
|
|
5856
|
+
draftV: encrypted.draftV,
|
|
5857
|
+
processingPayloadSynced: true,
|
|
5858
|
+
payloadHash,
|
|
5859
|
+
markdown,
|
|
5860
|
+
preview
|
|
5861
|
+
};
|
|
5862
|
+
}
|
|
5863
|
+
async getIdeaBucketStatus(bucketId) {
|
|
5864
|
+
this.requireSession();
|
|
5865
|
+
const path = bucketId ? `/v1/ideabucket/buckets/${encodeURIComponent(bucketId)}` : "/v1/ideabucket/buckets";
|
|
5866
|
+
const response = await this.http.get(path, this.getCliRequestHeaders());
|
|
5867
|
+
if (!response.ok) throw new Error(`IdeaBucket status failed with HTTP ${response.status}`);
|
|
5868
|
+
return response.data;
|
|
5869
|
+
}
|
|
5870
|
+
async processIdeaBucketBucket(bucketId, options = {}) {
|
|
5871
|
+
this.requireSession();
|
|
5872
|
+
const response = await this.http.post(
|
|
5873
|
+
`/v1/ideabucket/buckets/${encodeURIComponent(bucketId)}/process`,
|
|
5874
|
+
{ now: options.now === true },
|
|
5875
|
+
this.getCliRequestHeaders()
|
|
5876
|
+
);
|
|
5877
|
+
if (!response.ok) throw new Error(`IdeaBucket process failed with HTTP ${response.status}`);
|
|
5878
|
+
return response.data;
|
|
5879
|
+
}
|
|
5788
5880
|
async listDrafts(forceRefresh = false) {
|
|
5789
5881
|
if (forceRefresh) await this.reconcileDraftVersions();
|
|
5790
5882
|
const cache = await this.ensureSynced(forceRefresh);
|
|
@@ -9015,7 +9107,7 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
9015
9107
|
*/
|
|
9016
9108
|
async sdkGetMemories(teamId) {
|
|
9017
9109
|
const response = await this.http.get(
|
|
9018
|
-
`/v1/
|
|
9110
|
+
`/v1/teams/${encodeURIComponent(teamId)}/memories`,
|
|
9019
9111
|
this.getCliRequestHeaders()
|
|
9020
9112
|
);
|
|
9021
9113
|
if (!response.ok) throw new Error(`Team memory list failed with HTTP ${response.status}`);
|
|
@@ -14306,6 +14398,9 @@ async function writeExportFile(path, data) {
|
|
|
14306
14398
|
var DEFAULT_API_URL2 = "https://api.openmates.org";
|
|
14307
14399
|
var DEFAULT_RECOVERY_POLL_INTERVAL_MS = 500;
|
|
14308
14400
|
var DEFAULT_RECOVERY_TIMEOUT_MS = 6e4;
|
|
14401
|
+
var IDEABUCKET_DEFAULT_PROCESSING_PROMPT2 = `These are my captured ideas for today. Please process them, group related thoughts, suggest next actions, and ask clarifying questions where needed:
|
|
14402
|
+
|
|
14403
|
+
If an idea requires deeper work, create or suggest sub-chats for focused research, planning, todos, docs, or implementation.`;
|
|
14309
14404
|
var OpenMatesConfigError = class extends Error {
|
|
14310
14405
|
constructor(message) {
|
|
14311
14406
|
super(message);
|
|
@@ -14335,6 +14430,7 @@ var OpenMates = class {
|
|
|
14335
14430
|
embeds;
|
|
14336
14431
|
feedback;
|
|
14337
14432
|
inspirations;
|
|
14433
|
+
ideabucket;
|
|
14338
14434
|
apiKeys;
|
|
14339
14435
|
learningMode;
|
|
14340
14436
|
memories;
|
|
@@ -14345,6 +14441,7 @@ var OpenMates = class {
|
|
|
14345
14441
|
settings;
|
|
14346
14442
|
plans;
|
|
14347
14443
|
tasks;
|
|
14444
|
+
teams;
|
|
14348
14445
|
workflows;
|
|
14349
14446
|
apiKey;
|
|
14350
14447
|
apiUrl;
|
|
@@ -14367,6 +14464,7 @@ var OpenMates = class {
|
|
|
14367
14464
|
this.embeds = new OpenMatesEmbeds(this);
|
|
14368
14465
|
this.feedback = new OpenMatesFeedback(this);
|
|
14369
14466
|
this.inspirations = new OpenMatesInspirations(this);
|
|
14467
|
+
this.ideabucket = new OpenMatesIdeaBucket(this);
|
|
14370
14468
|
this.apiKeys = new OpenMatesApiKeys(this);
|
|
14371
14469
|
this.learningMode = new OpenMatesLearningMode(this);
|
|
14372
14470
|
this.memories = new OpenMatesMemories(this);
|
|
@@ -14377,6 +14475,7 @@ var OpenMates = class {
|
|
|
14377
14475
|
this.settings = new OpenMatesSettings(this);
|
|
14378
14476
|
this.plans = new OpenMatesPlans(this);
|
|
14379
14477
|
this.tasks = new OpenMatesTasks(this);
|
|
14478
|
+
this.teams = new OpenMatesTeams(this);
|
|
14380
14479
|
this.workflows = new OpenMatesWorkflows(this);
|
|
14381
14480
|
}
|
|
14382
14481
|
async runAppSkill(appId, skillId, input) {
|
|
@@ -14947,6 +15046,78 @@ var OpenMatesChats = class {
|
|
|
14947
15046
|
return this.send(message, { saveToAccount: false });
|
|
14948
15047
|
}
|
|
14949
15048
|
};
|
|
15049
|
+
var OpenMatesIdeaBucket = class {
|
|
15050
|
+
client;
|
|
15051
|
+
constructor(client) {
|
|
15052
|
+
this.client = client;
|
|
15053
|
+
}
|
|
15054
|
+
async add(input) {
|
|
15055
|
+
const payload = await this.buildEncryptedAddPayload(input);
|
|
15056
|
+
const bucketId = String(payload.ideabucket_processing_window_id);
|
|
15057
|
+
return this.client.request(
|
|
15058
|
+
`/v1/sdk/ideabucket/buckets/${encodeURIComponent(bucketId)}/add`,
|
|
15059
|
+
payload
|
|
15060
|
+
);
|
|
15061
|
+
}
|
|
15062
|
+
async status(bucketId) {
|
|
15063
|
+
const path = bucketId ? `/v1/sdk/ideabucket/buckets/${encodeURIComponent(bucketId)}` : "/v1/sdk/ideabucket/buckets";
|
|
15064
|
+
return this.client.get(path);
|
|
15065
|
+
}
|
|
15066
|
+
async process(bucketId, options = {}) {
|
|
15067
|
+
return this.client.request(
|
|
15068
|
+
`/v1/sdk/ideabucket/buckets/${encodeURIComponent(bucketId)}/process`,
|
|
15069
|
+
{ now: options.now === true }
|
|
15070
|
+
);
|
|
15071
|
+
}
|
|
15072
|
+
async buildEncryptedAddPayload(input) {
|
|
15073
|
+
const ideaText = input.text.trim();
|
|
15074
|
+
if (!ideaText) throw new OpenMatesConfigError("IdeaBucket add requires non-empty text.");
|
|
15075
|
+
const now = Math.floor(Date.now() / 1e3);
|
|
15076
|
+
const bucketId = input.bucketId ?? new Date(now * 1e3).toISOString().slice(0, 10);
|
|
15077
|
+
const scheduledSendAt = input.scheduledSendAt ?? defaultIdeaBucketScheduledSendAt2(now);
|
|
15078
|
+
const chatId = input.chatId ?? randomUUID6();
|
|
15079
|
+
const prompt = input.prompt ?? IDEABUCKET_DEFAULT_PROCESSING_PROMPT2;
|
|
15080
|
+
const markdown = buildIdeaBucketMarkdown2(prompt, ideaText);
|
|
15081
|
+
const preview = `IdeaBucket ${bucketId}: ${ideaText.slice(0, 120)}`;
|
|
15082
|
+
const serverProcessablePayload = JSON.stringify({
|
|
15083
|
+
prompt,
|
|
15084
|
+
bucket_id: bucketId,
|
|
15085
|
+
processing_window_id: bucketId,
|
|
15086
|
+
ideas: [{ index: 1, type: "text", text: ideaText }]
|
|
15087
|
+
});
|
|
15088
|
+
const payloadHash = createHash8("sha256").update(serverProcessablePayload).digest("hex");
|
|
15089
|
+
const masterKey = await this.client.masterKey();
|
|
15090
|
+
return {
|
|
15091
|
+
chat_id: chatId,
|
|
15092
|
+
encrypted_draft_md: await encryptWithAesGcmCombined(markdown, masterKey),
|
|
15093
|
+
encrypted_draft_preview: await encryptWithAesGcmCombined(preview, masterKey),
|
|
15094
|
+
ideabucket: true,
|
|
15095
|
+
ideabucket_processing_window_id: bucketId,
|
|
15096
|
+
ideabucket_processing_version: now,
|
|
15097
|
+
scheduled_send_at: scheduledSendAt,
|
|
15098
|
+
server_vault_encrypted_processing_payload: await encryptWithAesGcmCombined(serverProcessablePayload, masterKey),
|
|
15099
|
+
client_encrypted_future_user_message: await encryptWithAesGcmCombined(markdown, masterKey),
|
|
15100
|
+
client_encrypted_ideabucket_system_event: await encryptWithAesGcmCombined(JSON.stringify({
|
|
15101
|
+
type: "ideabucket_triggered_send",
|
|
15102
|
+
bucket_id: bucketId,
|
|
15103
|
+
processing_window_id: bucketId,
|
|
15104
|
+
source: "openmates_sdk"
|
|
15105
|
+
}), masterKey),
|
|
15106
|
+
payload_hash: payloadHash
|
|
15107
|
+
};
|
|
15108
|
+
}
|
|
15109
|
+
};
|
|
15110
|
+
function defaultIdeaBucketScheduledSendAt2(nowSeconds2) {
|
|
15111
|
+
const date = new Date(nowSeconds2 * 1e3);
|
|
15112
|
+
return Math.floor(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate() + 1, 9, 0, 0) / 1e3);
|
|
15113
|
+
}
|
|
15114
|
+
function buildIdeaBucketMarkdown2(prompt, ideaText) {
|
|
15115
|
+
return [prompt.trim(), [
|
|
15116
|
+
"----- Idea 1 -----",
|
|
15117
|
+
ideaText.trim(),
|
|
15118
|
+
"-----------------"
|
|
15119
|
+
].join("\n")].join("\n\n");
|
|
15120
|
+
}
|
|
14950
15121
|
var OpenMatesDrafts = class {
|
|
14951
15122
|
client;
|
|
14952
15123
|
constructor(client) {
|
|
@@ -15814,6 +15985,9 @@ var OpenMatesConnectedAccounts = class {
|
|
|
15814
15985
|
this.client = client;
|
|
15815
15986
|
}
|
|
15816
15987
|
async import(input) {
|
|
15988
|
+
if (input.teamId) {
|
|
15989
|
+
throw new OpenMatesConfigError("Team connected accounts are not supported yet.");
|
|
15990
|
+
}
|
|
15817
15991
|
const payload = await decryptConnectedAccountCliTransferPayload(input.payload, input.passcode);
|
|
15818
15992
|
const account = await this.client.get("/v1/sdk/account");
|
|
15819
15993
|
const userId = typeof account.id === "string" ? account.id : "";
|
|
@@ -15828,6 +16002,94 @@ var OpenMatesConnectedAccounts = class {
|
|
|
15828
16002
|
return this.client.request("/v1/sdk/connected-accounts/import", { row });
|
|
15829
16003
|
}
|
|
15830
16004
|
};
|
|
16005
|
+
var OpenMatesTeams = class {
|
|
16006
|
+
client;
|
|
16007
|
+
constructor(client) {
|
|
16008
|
+
this.client = client;
|
|
16009
|
+
}
|
|
16010
|
+
async list() {
|
|
16011
|
+
const result = await this.client.get("/v1/teams");
|
|
16012
|
+
return result.teams ?? [];
|
|
16013
|
+
}
|
|
16014
|
+
async get(teamId) {
|
|
16015
|
+
const result = await this.client.get(`/v1/teams/${encodeURIComponent(teamId)}`);
|
|
16016
|
+
return result.team ?? result;
|
|
16017
|
+
}
|
|
16018
|
+
async create(input) {
|
|
16019
|
+
const result = await this.client.request("/v1/teams", input);
|
|
16020
|
+
return result.team ?? result;
|
|
16021
|
+
}
|
|
16022
|
+
async update(teamId, input) {
|
|
16023
|
+
const result = await this.client.patch(`/v1/teams/${encodeURIComponent(teamId)}`, input);
|
|
16024
|
+
return result.team ?? result;
|
|
16025
|
+
}
|
|
16026
|
+
async delete(teamId) {
|
|
16027
|
+
return this.client.delete(`/v1/teams/${encodeURIComponent(teamId)}`);
|
|
16028
|
+
}
|
|
16029
|
+
async invite(teamId, input) {
|
|
16030
|
+
const result = await this.client.request(`/v1/teams/${encodeURIComponent(teamId)}/invites`, input);
|
|
16031
|
+
return result.invite ?? result;
|
|
16032
|
+
}
|
|
16033
|
+
async acceptInvite(inviteId, input = {}) {
|
|
16034
|
+
return this.client.request(`/v1/team-invites/${encodeURIComponent(inviteId)}/accept`, input);
|
|
16035
|
+
}
|
|
16036
|
+
async declineInvite(inviteId, input = {}) {
|
|
16037
|
+
return this.client.request(`/v1/team-invites/${encodeURIComponent(inviteId)}/decline`, input);
|
|
16038
|
+
}
|
|
16039
|
+
async accessRequests(teamId, status) {
|
|
16040
|
+
const query = status ? `?status=${encodeURIComponent(status)}` : "";
|
|
16041
|
+
const result = await this.client.get(`/v1/teams/${encodeURIComponent(teamId)}/access-requests${query}`);
|
|
16042
|
+
return result.access_requests ?? [];
|
|
16043
|
+
}
|
|
16044
|
+
async approveAccess(teamId, accessRequestId, input = {}) {
|
|
16045
|
+
const result = await this.client.request(`/v1/teams/${encodeURIComponent(teamId)}/access-requests/${encodeURIComponent(accessRequestId)}/approve`, input);
|
|
16046
|
+
return result.membership ?? result;
|
|
16047
|
+
}
|
|
16048
|
+
async rejectAccess(teamId, accessRequestId, input = {}) {
|
|
16049
|
+
return this.client.request(`/v1/teams/${encodeURIComponent(teamId)}/access-requests/${encodeURIComponent(accessRequestId)}/reject`, input);
|
|
16050
|
+
}
|
|
16051
|
+
async removeMember(teamId, memberUserId, input = {}) {
|
|
16052
|
+
return this.client.request(`/v1/teams/${encodeURIComponent(teamId)}/members/${encodeURIComponent(memberUserId)}/remove`, input);
|
|
16053
|
+
}
|
|
16054
|
+
async billing(teamId) {
|
|
16055
|
+
const result = await this.client.get(`/v1/teams/${encodeURIComponent(teamId)}/billing`);
|
|
16056
|
+
return result.billing ?? result;
|
|
16057
|
+
}
|
|
16058
|
+
async addCredits(teamId, input) {
|
|
16059
|
+
const result = await this.client.request(`/v1/teams/${encodeURIComponent(teamId)}/billing/credits`, input);
|
|
16060
|
+
return result.billing ?? result;
|
|
16061
|
+
}
|
|
16062
|
+
async usage(teamId, memberUserId) {
|
|
16063
|
+
const query = memberUserId ? `?member_user_id=${encodeURIComponent(memberUserId)}` : "";
|
|
16064
|
+
const result = await this.client.get(`/v1/teams/${encodeURIComponent(teamId)}/billing/usage${query}`);
|
|
16065
|
+
return result.usage ?? [];
|
|
16066
|
+
}
|
|
16067
|
+
async memories(teamId) {
|
|
16068
|
+
const result = await this.client.get(`/v1/teams/${encodeURIComponent(teamId)}/memories`);
|
|
16069
|
+
return result.memories ?? [];
|
|
16070
|
+
}
|
|
16071
|
+
async move(workspaceType, objectId, teamId) {
|
|
16072
|
+
const routes = {
|
|
16073
|
+
chat: "chats",
|
|
16074
|
+
project: "projects",
|
|
16075
|
+
task: "user-tasks",
|
|
16076
|
+
plan: "user-plans",
|
|
16077
|
+
workflow: "workflows"
|
|
16078
|
+
};
|
|
16079
|
+
const route = routes[workspaceType];
|
|
16080
|
+
if (!route) throw new OpenMatesConfigError("Unsupported team move workspace type");
|
|
16081
|
+
return this.client.request(
|
|
16082
|
+
`/v1/${route}/${encodeURIComponent(objectId)}/move`,
|
|
16083
|
+
{ team_id: teamId, confirmed: true, moved_at: Math.floor(Date.now() / 1e3) }
|
|
16084
|
+
);
|
|
16085
|
+
}
|
|
16086
|
+
async export(teamId, input = {}) {
|
|
16087
|
+
return this.client.request(`/v1/teams/${encodeURIComponent(teamId)}/export`, input);
|
|
16088
|
+
}
|
|
16089
|
+
async import(input) {
|
|
16090
|
+
return this.client.request("/v1/teams/import", input);
|
|
16091
|
+
}
|
|
16092
|
+
};
|
|
15831
16093
|
var OpenMatesLearningMode = class {
|
|
15832
16094
|
client;
|
|
15833
16095
|
constructor(client) {
|
|
@@ -44089,7 +44351,7 @@ Only output the final Markdown table. Do NOT include explanations, notes, or any
|
|
|
44089
44351
|
text: "Find open-source SVG home and settings icons from clean UI icon sets for a dashboard sidebar. Include the icon names, collections, and licenses."
|
|
44090
44352
|
},
|
|
44091
44353
|
message_2: {
|
|
44092
|
-
text: '```json\n{"type": "app_skill_use", "embed_id": "f92d6925-690b-4350-9b6a-3a7003f8b947", "app_id": "design", "skill_id": "search_icons", "query": "home"}\n```\n\n```json\n{"type": "app_skill_use", "embed_id": "68b02c14-a329-4772-97d2-d7b168bb50bc", "app_id": "design", "skill_id": "search_icons", "query": "settings"}\n```\n\
|
|
44354
|
+
text: '```json\n{"type": "app_skill_use", "embed_id": "f92d6925-690b-4350-9b6a-3a7003f8b947", "app_id": "design", "skill_id": "search_icons", "query": "home"}\n```\n\n```json\n{"type": "app_skill_use", "embed_id": "68b02c14-a329-4772-97d2-d7b168bb50bc", "app_id": "design", "skill_id": "search_icons", "query": "settings"}\n```\n\nFuer eine klare Dashboard-Seitenleiste eignen sich Icons mit einheitlicher Strichstaerke und minimalistischer Aesthetik. Hier sind mehrere Open-Source-SVG-Optionen aus angesehenen, sauberen UI-Icon-Sets:\n\n### 1. Tabler Icons\n[Tabler Icons](wiki:Tabler) ist ein stark anpassbares, strichbasiertes Set auf einem 24x24-Raster und passt dadurch sehr gut zu modernen Dashboards.\n* **Lizenz:** [MIT](wiki:MIT_License)\n* **Home:** `tabler:home` [Home](embed:home-EuX)\n* **Settings:** `tabler:settings` [Settings](embed:settings-TgF)\n\n### 2. Remix Icon\nRemix Icon bietet einen neutralen, professionellen Stil mit "Line"- und "Fill"-Varianten. Das ist ideal, um aktive und inaktive Zustaende in einer Seitenleiste zu unterscheiden.\n* **Lizenz:** [Apache 2.0](wiki:Apache_License)\n* **Home:** `ri:home-line` [Home Line](embed:home-line-vDv)\n* **Settings:** `ri:settings-line` [Settings Line](embed:settings-line-c3G)\n\n### 3. Material Symbols (Light)\n[Material Symbols](wiki:Material_Design) sind der moderne Nachfolger von Material Icons und nutzen variable Font-Technologie. Die Varianten "Light" und "Outline" wirken besonders luftig und hochwertig.\n* **Lizenz:** [Apache 2.0](wiki:Apache_License)\n* **Home:** `material-symbols-light:home-outline` [Home Outline](embed:home-outline-3t2)\n* **Settings:** `material-symbols-light:settings-outline` [Settings Outline](embed:settings-outline-jak)\n\n### 4. Boxicons\nBoxicons ist ein hochwertiges, webfreundliches Icon-Set mit einfachen und gut ausbalancierten Symbolen.\n* **Lizenz:** [MIT](wiki:MIT_License)\n* **Home:** `boxicons:home` [Home](embed:home-DSR)\n* **Settings:** `boxicons:settings` (Available in the Boxicons collection)\n\n### Zusammenfassungstabelle\n\n```json\n{"type": "sheet", "embed_id": "955e10f2-2643-4489-a9d0-6ccdad784a58"}\n```\n\n**Design-Tipp:** Wenn du diese Icons in einer Seitenleiste nutzt, halte die Strichbreite ueber alle Icons hinweg konsistent. Viele dieser Kollektionen verwenden standardmaessig `2px`, was gut sichtbar bleibt, ohne "schwer" zu wirken.\n\nMoechtest du, dass ich weitere Sidebar-Icons wie "Benutzer", "Analytics" oder "Nachrichten" suche, um das Set zu vervollstaendigen? Ich kann dir auch mit einer [Svelte](/#settings/apps/code)- oder [React](wiki:React_(software))-Seitenleistenkomponente helfen, falls du die UI gerade baust.'
|
|
44093
44355
|
}
|
|
44094
44356
|
},
|
|
44095
44357
|
email_verification_sequence_diagram: {
|
|
@@ -59088,6 +59350,10 @@ async function main() {
|
|
|
59088
59350
|
printDraftsHelp();
|
|
59089
59351
|
return;
|
|
59090
59352
|
}
|
|
59353
|
+
if (command === "ideabucket") {
|
|
59354
|
+
printIdeaBucketHelp();
|
|
59355
|
+
return;
|
|
59356
|
+
}
|
|
59091
59357
|
if (command === "apps") {
|
|
59092
59358
|
printAppsHelp();
|
|
59093
59359
|
return;
|
|
@@ -59238,6 +59504,10 @@ async function main() {
|
|
|
59238
59504
|
await handleDrafts(client, subcommand, rest, parsed.flags);
|
|
59239
59505
|
return;
|
|
59240
59506
|
}
|
|
59507
|
+
if (command === "ideabucket") {
|
|
59508
|
+
await handleIdeaBucket(client, subcommand, rest, parsed.flags);
|
|
59509
|
+
return;
|
|
59510
|
+
}
|
|
59241
59511
|
if (command === "apps") {
|
|
59242
59512
|
await handleApps(client, subcommand, rest, parsed.flags);
|
|
59243
59513
|
return;
|
|
@@ -59981,6 +60251,42 @@ async function handleDrafts(client, subcommand, rest, flags) {
|
|
|
59981
60251
|
}
|
|
59982
60252
|
throw new Error(`Unknown drafts subcommand '${subcommand}'.`);
|
|
59983
60253
|
}
|
|
60254
|
+
async function handleIdeaBucket(client, subcommand, rest, flags) {
|
|
60255
|
+
if (!subcommand || subcommand === "help" || flags.help === true) {
|
|
60256
|
+
printIdeaBucketHelp();
|
|
60257
|
+
return;
|
|
60258
|
+
}
|
|
60259
|
+
if (subcommand === "add") {
|
|
60260
|
+
const text = rest.join(" ").trim();
|
|
60261
|
+
if (!text) throw new Error("Missing IdeaBucket text for add.");
|
|
60262
|
+
const scheduledSendAt = typeof flags["scheduled-at"] === "string" ? parseUnixSecondsFlag(flags["scheduled-at"], "--scheduled-at") : void 0;
|
|
60263
|
+
printJson2(await client.addIdeaBucketText({
|
|
60264
|
+
text,
|
|
60265
|
+
chatId: typeof flags.chat === "string" ? flags.chat : void 0,
|
|
60266
|
+
bucketId: typeof flags.bucket === "string" ? flags.bucket : void 0,
|
|
60267
|
+
scheduledSendAt,
|
|
60268
|
+
prompt: typeof flags.prompt === "string" ? flags.prompt : void 0
|
|
60269
|
+
}));
|
|
60270
|
+
return;
|
|
60271
|
+
}
|
|
60272
|
+
if (subcommand === "status") {
|
|
60273
|
+
const bucketId = rest[0] ?? (typeof flags.bucket === "string" ? flags.bucket : void 0);
|
|
60274
|
+
printJson2(await client.getIdeaBucketStatus(bucketId));
|
|
60275
|
+
return;
|
|
60276
|
+
}
|
|
60277
|
+
if (subcommand === "process") {
|
|
60278
|
+
const bucketId = rest[0] ?? (typeof flags.bucket === "string" ? flags.bucket : void 0);
|
|
60279
|
+
if (!bucketId) throw new Error("Missing IdeaBucket bucket ID for process.");
|
|
60280
|
+
printJson2(await client.processIdeaBucketBucket(bucketId, { now: flags.now === true }));
|
|
60281
|
+
return;
|
|
60282
|
+
}
|
|
60283
|
+
throw new Error(`Unknown ideabucket subcommand '${subcommand}'.`);
|
|
60284
|
+
}
|
|
60285
|
+
function parseUnixSecondsFlag(value, flagName) {
|
|
60286
|
+
const parsed = Number(value);
|
|
60287
|
+
if (!Number.isFinite(parsed) || parsed <= 0) throw new Error(`Invalid ${flagName}; expected Unix seconds.`);
|
|
60288
|
+
return parsed > 1e10 ? Math.floor(parsed / 1e3) : Math.floor(parsed);
|
|
60289
|
+
}
|
|
59984
60290
|
async function handleChats(client, subcommand, rest, flags, redactor) {
|
|
59985
60291
|
if (!subcommand || subcommand === "help" || flags.help === true) {
|
|
59986
60292
|
printChatsHelp();
|
|
@@ -62615,6 +62921,9 @@ async function handleConnectedAccounts(client, subcommand, flags) {
|
|
|
62615
62921
|
printConnectedAccountsHelp();
|
|
62616
62922
|
return;
|
|
62617
62923
|
}
|
|
62924
|
+
if (typeof flags.team === "string") {
|
|
62925
|
+
throw new Error("Team connected accounts are not supported yet. Use personal connected accounts or retry after Teams connected-account support ships.");
|
|
62926
|
+
}
|
|
62618
62927
|
if (subcommand !== "import") {
|
|
62619
62928
|
throw new Error(`Unknown connected-accounts command '${subcommand}'. Run 'openmates connected-accounts --help'.`);
|
|
62620
62929
|
}
|
|
@@ -65648,6 +65957,7 @@ Commands:
|
|
|
65648
65957
|
openmates tasks [--help] Task commands (list, create, board, ...)
|
|
65649
65958
|
openmates teams [--help] Team lifecycle, membership, billing, and move commands
|
|
65650
65959
|
openmates drafts [--help] Encrypted draft lifecycle commands
|
|
65960
|
+
openmates ideabucket [--help] IdeaBucket capture, draft/status, and process commands
|
|
65651
65961
|
openmates apps [--help] App skill commands (list, run, ...)
|
|
65652
65962
|
openmates workflows [--help] Server-side workflow commands
|
|
65653
65963
|
openmates mentions [--help] List available @mentions
|
|
@@ -65725,6 +66035,8 @@ The CLI prompts for the passcode interactively, validates the provider token wit
|
|
|
65725
66035
|
a harmless read, then re-encrypts the account for the currently logged-in CLI
|
|
65726
66036
|
account before storing it.
|
|
65727
66037
|
|
|
66038
|
+
Team connected accounts are not supported in Teams V1 yet.
|
|
66039
|
+
|
|
65728
66040
|
Options:
|
|
65729
66041
|
--payload <OMCA1...> Required encrypted import payload from web settings
|
|
65730
66042
|
--json Output a redacted JSON summary
|
|
@@ -66000,6 +66312,15 @@ function printDraftsHelp() {
|
|
|
66000
66312
|
Draft plaintext is encrypted locally with the account master key. Only Format-D
|
|
66001
66313
|
ciphertext and version metadata are sent to the server or written to CLI cache.`);
|
|
66002
66314
|
}
|
|
66315
|
+
function printIdeaBucketHelp() {
|
|
66316
|
+
console.log(`IdeaBucket commands:
|
|
66317
|
+
openmates ideabucket add <text> [--chat <uuid>] [--bucket <id>] [--scheduled-at <unix>] [--prompt <text>] [--json]
|
|
66318
|
+
openmates ideabucket status [bucket-id] [--json]
|
|
66319
|
+
openmates ideabucket process <bucket-id> [--now] [--json]
|
|
66320
|
+
|
|
66321
|
+
Adding text updates the encrypted OpenMates IdeaBucket draft for the processing
|
|
66322
|
+
bucket and sends only ciphertext plus sparse non-content metadata to the server.`);
|
|
66323
|
+
}
|
|
66003
66324
|
function printAppsHelp() {
|
|
66004
66325
|
console.log(`Apps commands:
|
|
66005
66326
|
openmates apps list [--json]
|
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -924,6 +924,32 @@ interface DecryptedDraft extends EncryptedDraft {
|
|
|
924
924
|
markdown: string;
|
|
925
925
|
preview: string | null;
|
|
926
926
|
}
|
|
927
|
+
interface IdeaBucketAddResult {
|
|
928
|
+
chatId: string;
|
|
929
|
+
bucketId: string;
|
|
930
|
+
processingWindowId: string;
|
|
931
|
+
scheduledSendAt: number;
|
|
932
|
+
draftV: number;
|
|
933
|
+
processingPayloadSynced: boolean;
|
|
934
|
+
payloadHash: string;
|
|
935
|
+
markdown: string;
|
|
936
|
+
preview: string;
|
|
937
|
+
}
|
|
938
|
+
interface IdeaBucketStatusResult {
|
|
939
|
+
processingWindowId?: string;
|
|
940
|
+
status: string;
|
|
941
|
+
buckets?: Array<Record<string, unknown>>;
|
|
942
|
+
[key: string]: unknown;
|
|
943
|
+
}
|
|
944
|
+
interface IdeaBucketProcessResult {
|
|
945
|
+
processingWindowId: string;
|
|
946
|
+
status: string;
|
|
947
|
+
chatId?: string;
|
|
948
|
+
userMessageId?: string;
|
|
949
|
+
systemEventId?: string;
|
|
950
|
+
aiTaskId?: string | null;
|
|
951
|
+
errorCode?: string;
|
|
952
|
+
}
|
|
927
953
|
interface AuthoritativeChatReconciliation {
|
|
928
954
|
authoritative: boolean;
|
|
929
955
|
authoritative_chat_ids?: string[];
|
|
@@ -1385,7 +1411,20 @@ declare class OpenMatesClient {
|
|
|
1385
1411
|
chatId: string;
|
|
1386
1412
|
encryptedDraftMd: string;
|
|
1387
1413
|
encryptedDraftPreview?: string | null;
|
|
1414
|
+
extraPayload?: Record<string, unknown>;
|
|
1388
1415
|
}): Promise<EncryptedDraft>;
|
|
1416
|
+
addIdeaBucketText(params: {
|
|
1417
|
+
text: string;
|
|
1418
|
+
chatId?: string;
|
|
1419
|
+
bucketId?: string;
|
|
1420
|
+
scheduledSendAt?: number;
|
|
1421
|
+
prompt?: string;
|
|
1422
|
+
version?: number;
|
|
1423
|
+
}): Promise<IdeaBucketAddResult>;
|
|
1424
|
+
getIdeaBucketStatus(bucketId?: string): Promise<IdeaBucketStatusResult>;
|
|
1425
|
+
processIdeaBucketBucket(bucketId: string, options?: {
|
|
1426
|
+
now?: boolean;
|
|
1427
|
+
}): Promise<IdeaBucketProcessResult>;
|
|
1389
1428
|
listDrafts(forceRefresh?: boolean): Promise<DecryptedDraft[]>;
|
|
1390
1429
|
getDraft(chatId: string, forceRefresh?: boolean): Promise<DecryptedDraft | null>;
|
|
1391
1430
|
clearDraft(chatId: string): Promise<void>;
|
|
@@ -5167,6 +5206,17 @@ interface DraftRecord extends EncryptedDraftRecord {
|
|
|
5167
5206
|
markdown: string;
|
|
5168
5207
|
preview: string | null;
|
|
5169
5208
|
}
|
|
5209
|
+
interface IdeaBucketAddInput extends Record<string, unknown> {
|
|
5210
|
+
text: string;
|
|
5211
|
+
chatId?: string;
|
|
5212
|
+
bucketId?: string;
|
|
5213
|
+
scheduledSendAt?: number;
|
|
5214
|
+
prompt?: string;
|
|
5215
|
+
}
|
|
5216
|
+
interface IdeaBucketProcessOptions {
|
|
5217
|
+
now?: boolean;
|
|
5218
|
+
}
|
|
5219
|
+
type IdeaBucketResult = Record<string, unknown>;
|
|
5170
5220
|
type TaskListFilters = {
|
|
5171
5221
|
status?: UserTaskStatus;
|
|
5172
5222
|
chatId?: string;
|
|
@@ -5230,6 +5280,7 @@ declare class OpenMates {
|
|
|
5230
5280
|
readonly embeds: OpenMatesEmbeds;
|
|
5231
5281
|
readonly feedback: OpenMatesFeedback;
|
|
5232
5282
|
readonly inspirations: OpenMatesInspirations;
|
|
5283
|
+
readonly ideabucket: OpenMatesIdeaBucket;
|
|
5233
5284
|
readonly apiKeys: OpenMatesApiKeys;
|
|
5234
5285
|
readonly learningMode: OpenMatesLearningMode;
|
|
5235
5286
|
readonly memories: OpenMatesMemories;
|
|
@@ -5240,6 +5291,7 @@ declare class OpenMates {
|
|
|
5240
5291
|
readonly settings: OpenMatesSettings;
|
|
5241
5292
|
readonly plans: OpenMatesPlans;
|
|
5242
5293
|
readonly tasks: OpenMatesTasks;
|
|
5294
|
+
readonly teams: OpenMatesTeams;
|
|
5243
5295
|
readonly workflows: OpenMatesWorkflows;
|
|
5244
5296
|
private readonly apiKey?;
|
|
5245
5297
|
private readonly apiUrl;
|
|
@@ -5297,6 +5349,14 @@ declare class OpenMatesChats {
|
|
|
5297
5349
|
followUps(chatId: string): Promise<string[]>;
|
|
5298
5350
|
incognito(message: string): Promise<ChatResponse>;
|
|
5299
5351
|
}
|
|
5352
|
+
declare class OpenMatesIdeaBucket {
|
|
5353
|
+
private readonly client;
|
|
5354
|
+
constructor(client: OpenMates);
|
|
5355
|
+
add(input: IdeaBucketAddInput): Promise<IdeaBucketResult>;
|
|
5356
|
+
status(bucketId?: string): Promise<IdeaBucketResult>;
|
|
5357
|
+
process(bucketId: string, options?: IdeaBucketProcessOptions): Promise<IdeaBucketResult>;
|
|
5358
|
+
private buildEncryptedAddPayload;
|
|
5359
|
+
}
|
|
5300
5360
|
declare class OpenMatesDrafts {
|
|
5301
5361
|
private readonly client;
|
|
5302
5362
|
constructor(client: OpenMates);
|
|
@@ -5573,8 +5633,32 @@ declare class OpenMatesConnectedAccounts {
|
|
|
5573
5633
|
import(input: {
|
|
5574
5634
|
payload: string;
|
|
5575
5635
|
passcode: string;
|
|
5636
|
+
teamId?: string | null;
|
|
5576
5637
|
}): Promise<Record<string, unknown>>;
|
|
5577
5638
|
}
|
|
5639
|
+
declare class OpenMatesTeams {
|
|
5640
|
+
private readonly client;
|
|
5641
|
+
constructor(client: OpenMates);
|
|
5642
|
+
list(): Promise<Record<string, unknown>[]>;
|
|
5643
|
+
get(teamId: string): Promise<Record<string, unknown>>;
|
|
5644
|
+
create(input: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
5645
|
+
update(teamId: string, input: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
5646
|
+
delete(teamId: string): Promise<Record<string, unknown>>;
|
|
5647
|
+
invite(teamId: string, input: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
5648
|
+
acceptInvite(inviteId: string, input?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
5649
|
+
declineInvite(inviteId: string, input?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
5650
|
+
accessRequests(teamId: string, status?: string): Promise<Record<string, unknown>[]>;
|
|
5651
|
+
approveAccess(teamId: string, accessRequestId: string, input?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
5652
|
+
rejectAccess(teamId: string, accessRequestId: string, input?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
5653
|
+
removeMember(teamId: string, memberUserId: string, input?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
5654
|
+
billing(teamId: string): Promise<Record<string, unknown>>;
|
|
5655
|
+
addCredits(teamId: string, input: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
5656
|
+
usage(teamId: string, memberUserId?: string): Promise<Record<string, unknown>[]>;
|
|
5657
|
+
memories(teamId: string): Promise<Record<string, unknown>[]>;
|
|
5658
|
+
move(workspaceType: string, objectId: string, teamId: string): Promise<Record<string, unknown>>;
|
|
5659
|
+
export(teamId: string, input?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
5660
|
+
import(input: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
5661
|
+
}
|
|
5578
5662
|
declare class OpenMatesLearningMode {
|
|
5579
5663
|
private readonly client;
|
|
5580
5664
|
constructor(client: OpenMates);
|
package/dist/index.js
CHANGED