openmates 0.14.8-alpha.0 → 0.14.8-alpha.1
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-7BIVPFKJ.js → chunk-RR6H47VR.js} +136 -12
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +31 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1190,6 +1190,8 @@ var SUB_CHAT_EVENT_TYPES = /* @__PURE__ */ new Set([
|
|
|
1190
1190
|
var SUB_CHAT_PARENT_STATUS_MESSAGE = "I've started the sub-chats and will continue once they finish.";
|
|
1191
1191
|
var SUB_CHAT_COMPLETION_TIMEOUT_MS = 10 * 6e4;
|
|
1192
1192
|
var CLIENT_UPDATE_REQUIRED_GUIDANCE = "OpenMates CLI update required. Run `openmates upgrade` and retry.";
|
|
1193
|
+
var TASK_STATUSES = /* @__PURE__ */ new Set(["backlog", "todo", "in_progress", "blocked", "done"]);
|
|
1194
|
+
var TASK_ASSIGNEES = /* @__PURE__ */ new Set(["ai", "user"]);
|
|
1193
1195
|
var WebSocketProtocolError = class extends Error {
|
|
1194
1196
|
code;
|
|
1195
1197
|
constructor(code, message) {
|
|
@@ -1212,6 +1214,33 @@ function websocketProtocolError(envelope) {
|
|
|
1212
1214
|
}
|
|
1213
1215
|
return null;
|
|
1214
1216
|
}
|
|
1217
|
+
function parseTaskProposals(value) {
|
|
1218
|
+
if (!Array.isArray(value)) return [];
|
|
1219
|
+
return value.flatMap((item) => {
|
|
1220
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) return [];
|
|
1221
|
+
const raw = item;
|
|
1222
|
+
if (typeof raw.title !== "string" || raw.title.trim().length === 0) return [];
|
|
1223
|
+
const proposal = { title: raw.title };
|
|
1224
|
+
if (typeof raw.description === "string" || raw.description === null) proposal.description = raw.description;
|
|
1225
|
+
if (typeof raw.status === "string" && TASK_STATUSES.has(raw.status)) proposal.status = raw.status;
|
|
1226
|
+
if (typeof raw.assignee_type === "string" && TASK_ASSIGNEES.has(raw.assignee_type)) proposal.assignee_type = raw.assignee_type;
|
|
1227
|
+
return [proposal];
|
|
1228
|
+
});
|
|
1229
|
+
}
|
|
1230
|
+
function parseTaskUpdateProposals(value) {
|
|
1231
|
+
if (!Array.isArray(value)) return [];
|
|
1232
|
+
return value.flatMap((item) => {
|
|
1233
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) return [];
|
|
1234
|
+
const raw = item;
|
|
1235
|
+
if (typeof raw.task_id !== "string" || raw.task_id.trim().length === 0) return [];
|
|
1236
|
+
const proposal = { task_id: raw.task_id };
|
|
1237
|
+
if (typeof raw.title === "string" || raw.title === null) proposal.title = raw.title;
|
|
1238
|
+
if (typeof raw.description === "string" || raw.description === null) proposal.description = raw.description;
|
|
1239
|
+
if (typeof raw.status === "string" && TASK_STATUSES.has(raw.status) || raw.status === null) proposal.status = raw.status;
|
|
1240
|
+
if (typeof raw.assignee_type === "string" && TASK_ASSIGNEES.has(raw.assignee_type) || raw.assignee_type === null) proposal.assignee_type = raw.assignee_type;
|
|
1241
|
+
return [proposal];
|
|
1242
|
+
});
|
|
1243
|
+
}
|
|
1215
1244
|
var OpenMatesWsClient = class {
|
|
1216
1245
|
socket;
|
|
1217
1246
|
constructor(options) {
|
|
@@ -1412,6 +1441,8 @@ var OpenMatesWsClient = class {
|
|
|
1412
1441
|
let recoveryJobId = null;
|
|
1413
1442
|
let followUpSuggestions = [];
|
|
1414
1443
|
let newChatSuggestions = [];
|
|
1444
|
+
let taskProposals = [];
|
|
1445
|
+
let taskUpdateProposals = [];
|
|
1415
1446
|
const subChatEvents = [];
|
|
1416
1447
|
const pendingSubChatHandlers = /* @__PURE__ */ new Set();
|
|
1417
1448
|
const pendingMemoryRequestHandlers = /* @__PURE__ */ new Set();
|
|
@@ -1472,6 +1503,8 @@ var OpenMatesWsClient = class {
|
|
|
1472
1503
|
modelName,
|
|
1473
1504
|
followUpSuggestions,
|
|
1474
1505
|
newChatSuggestions,
|
|
1506
|
+
taskProposals,
|
|
1507
|
+
taskUpdateProposals,
|
|
1475
1508
|
embeds: [...embeds.values()],
|
|
1476
1509
|
subChatEvents,
|
|
1477
1510
|
recoveryJobId
|
|
@@ -1493,6 +1526,8 @@ var OpenMatesWsClient = class {
|
|
|
1493
1526
|
modelName,
|
|
1494
1527
|
followUpSuggestions,
|
|
1495
1528
|
newChatSuggestions,
|
|
1529
|
+
taskProposals,
|
|
1530
|
+
taskUpdateProposals,
|
|
1496
1531
|
embeds: [...embeds.values()],
|
|
1497
1532
|
subChatEvents,
|
|
1498
1533
|
recoveryJobId
|
|
@@ -1511,6 +1546,8 @@ var OpenMatesWsClient = class {
|
|
|
1511
1546
|
modelName,
|
|
1512
1547
|
followUpSuggestions,
|
|
1513
1548
|
newChatSuggestions,
|
|
1549
|
+
taskProposals,
|
|
1550
|
+
taskUpdateProposals,
|
|
1514
1551
|
embeds: [...embeds.values()],
|
|
1515
1552
|
subChatEvents,
|
|
1516
1553
|
recoveryJobId
|
|
@@ -1695,6 +1732,8 @@ var OpenMatesWsClient = class {
|
|
|
1695
1732
|
(s) => typeof s === "string" && s.length > 0
|
|
1696
1733
|
);
|
|
1697
1734
|
}
|
|
1735
|
+
taskProposals = parseTaskProposals(p.task_proposals);
|
|
1736
|
+
taskUpdateProposals = parseTaskUpdateProposals(p.task_update_proposals);
|
|
1698
1737
|
if (aiResponseDone) {
|
|
1699
1738
|
if (postProcessingTimer) {
|
|
1700
1739
|
clearTimeout(postProcessingTimer);
|
|
@@ -1723,6 +1762,8 @@ var OpenMatesWsClient = class {
|
|
|
1723
1762
|
modelName,
|
|
1724
1763
|
followUpSuggestions,
|
|
1725
1764
|
newChatSuggestions,
|
|
1765
|
+
taskProposals,
|
|
1766
|
+
taskUpdateProposals,
|
|
1726
1767
|
embeds: [...embeds.values()],
|
|
1727
1768
|
subChatEvents,
|
|
1728
1769
|
recoveryJobId
|
|
@@ -3352,6 +3393,8 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
3352
3393
|
modelName: response.data.modelName ?? null,
|
|
3353
3394
|
mateName: null,
|
|
3354
3395
|
followUpSuggestions: response.data.followUpSuggestions ?? [],
|
|
3396
|
+
taskProposals: [],
|
|
3397
|
+
taskUpdateProposals: [],
|
|
3355
3398
|
subChatEvents: [],
|
|
3356
3399
|
appSettingsMemoryRequests: []
|
|
3357
3400
|
};
|
|
@@ -4451,6 +4494,7 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
4451
4494
|
let chatKeyBytes = null;
|
|
4452
4495
|
let encryptedChatKey = null;
|
|
4453
4496
|
let baselineMessagesV = 0;
|
|
4497
|
+
let terminalExpectedMessagesV = 1;
|
|
4454
4498
|
let savedTurnId = null;
|
|
4455
4499
|
if (!params.incognito) {
|
|
4456
4500
|
const masterKey = this.getMasterKeyBytes();
|
|
@@ -4573,6 +4617,7 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
4573
4617
|
const chatKeyVersion = 1;
|
|
4574
4618
|
const turnId = randomUUID3();
|
|
4575
4619
|
savedTurnId = turnId;
|
|
4620
|
+
terminalExpectedMessagesV = baselineMessagesV + 1;
|
|
4576
4621
|
const recoveryKeypair = await deriveChatCompletionRecoveryKeypair(
|
|
4577
4622
|
Buffer.from(chatKeyBytes).toString("base64url"),
|
|
4578
4623
|
chatId,
|
|
@@ -4638,6 +4683,9 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
4638
4683
|
protocol_version: protocolVersion,
|
|
4639
4684
|
preflight_id: ackPayload.preflight_id
|
|
4640
4685
|
});
|
|
4686
|
+
if (typeof ackPayload.committed_messages_v === "number" && Number.isSafeInteger(ackPayload.committed_messages_v)) {
|
|
4687
|
+
terminalExpectedMessagesV = ackPayload.committed_messages_v;
|
|
4688
|
+
}
|
|
4641
4689
|
}
|
|
4642
4690
|
if (params.precollectResponse && !params.incognito) {
|
|
4643
4691
|
precollectedResponse = ws.collectAiResponse(messageId, chatId, {
|
|
@@ -4653,12 +4701,17 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
4653
4701
|
2e4
|
|
4654
4702
|
);
|
|
4655
4703
|
await ws.sendAsync("chat_message_added", messagePayload);
|
|
4656
|
-
await confirmed;
|
|
4704
|
+
const confirmedPayload = (await confirmed).payload;
|
|
4705
|
+
if (typeof confirmedPayload.new_messages_v === "number" && Number.isSafeInteger(confirmedPayload.new_messages_v)) {
|
|
4706
|
+
terminalExpectedMessagesV = confirmedPayload.new_messages_v + 1;
|
|
4707
|
+
}
|
|
4657
4708
|
let assistant = "";
|
|
4658
4709
|
let assistantMessageId = null;
|
|
4659
4710
|
let category = null;
|
|
4660
4711
|
let modelName = null;
|
|
4661
4712
|
let followUpSuggestions = [];
|
|
4713
|
+
let taskProposals = [];
|
|
4714
|
+
let taskUpdateProposals = [];
|
|
4662
4715
|
let subChatEvents = [];
|
|
4663
4716
|
const appSettingsMemoryRequests = [];
|
|
4664
4717
|
const numberOrNull = (value) => typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
@@ -4844,6 +4897,8 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
4844
4897
|
modelName,
|
|
4845
4898
|
mateName: category ? MATE_NAMES[category] ?? null : null,
|
|
4846
4899
|
followUpSuggestions,
|
|
4900
|
+
taskProposals,
|
|
4901
|
+
taskUpdateProposals,
|
|
4847
4902
|
subChatEvents,
|
|
4848
4903
|
appSettingsMemoryRequests
|
|
4849
4904
|
};
|
|
@@ -4859,6 +4914,8 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
4859
4914
|
category = resp.category;
|
|
4860
4915
|
modelName = resp.modelName;
|
|
4861
4916
|
followUpSuggestions = resp.followUpSuggestions;
|
|
4917
|
+
taskProposals = resp.taskProposals;
|
|
4918
|
+
taskUpdateProposals = resp.taskUpdateProposals;
|
|
4862
4919
|
subChatEvents = resp.subChatEvents;
|
|
4863
4920
|
if (resp.status === "waiting_for_user") {
|
|
4864
4921
|
return {
|
|
@@ -4870,6 +4927,8 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
4870
4927
|
modelName,
|
|
4871
4928
|
mateName: category ? MATE_NAMES[category] ?? null : null,
|
|
4872
4929
|
followUpSuggestions,
|
|
4930
|
+
taskProposals,
|
|
4931
|
+
taskUpdateProposals,
|
|
4873
4932
|
subChatEvents,
|
|
4874
4933
|
appSettingsMemoryRequests
|
|
4875
4934
|
};
|
|
@@ -4956,7 +5015,7 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
4956
5015
|
job_id: recoveryJobId,
|
|
4957
5016
|
lease_token: leaseToken,
|
|
4958
5017
|
lease_generation: leaseGeneration,
|
|
4959
|
-
expected_messages_v:
|
|
5018
|
+
expected_messages_v: terminalExpectedMessagesV,
|
|
4960
5019
|
encrypted_assistant_message: {
|
|
4961
5020
|
client_message_id: assistantId,
|
|
4962
5021
|
chat_id: chatId,
|
|
@@ -5003,6 +5062,8 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
5003
5062
|
modelName,
|
|
5004
5063
|
mateName,
|
|
5005
5064
|
followUpSuggestions,
|
|
5065
|
+
taskProposals,
|
|
5066
|
+
taskUpdateProposals,
|
|
5006
5067
|
subChatEvents,
|
|
5007
5068
|
appSettingsMemoryRequests
|
|
5008
5069
|
};
|
|
@@ -5935,6 +5996,22 @@ var OpenMatesClient = class _OpenMatesClient {
|
|
|
5935
5996
|
}
|
|
5936
5997
|
return response.data.task;
|
|
5937
5998
|
}
|
|
5999
|
+
async extractUserTaskProposals(input) {
|
|
6000
|
+
const response = await this.http.post(
|
|
6001
|
+
"/v1/user-tasks/extract",
|
|
6002
|
+
{
|
|
6003
|
+
corrected_text: input.correctedText,
|
|
6004
|
+
mode: input.mode ?? "create",
|
|
6005
|
+
context_chat_id: input.contextChatId ?? null,
|
|
6006
|
+
project_ids: input.projectIds ?? []
|
|
6007
|
+
},
|
|
6008
|
+
this.getCliRequestHeaders()
|
|
6009
|
+
);
|
|
6010
|
+
if (!response.ok || !Array.isArray(response.data.proposed_tasks)) {
|
|
6011
|
+
throw new Error(`Failed to extract task proposals (HTTP ${response.status})`);
|
|
6012
|
+
}
|
|
6013
|
+
return response.data.proposed_tasks;
|
|
6014
|
+
}
|
|
5938
6015
|
async updateUserTask(taskId, input) {
|
|
5939
6016
|
this.requireSession();
|
|
5940
6017
|
const response = await this.http.patch(
|
|
@@ -48313,12 +48390,12 @@ function boxed(line, width) {
|
|
|
48313
48390
|
|
|
48314
48391
|
// src/tasksCli.ts
|
|
48315
48392
|
import { createHash as createHash7, randomBytes as randomBytes3, randomUUID as randomUUID5 } from "crypto";
|
|
48316
|
-
var
|
|
48393
|
+
var TASK_STATUSES2 = ["backlog", "todo", "in_progress", "blocked", "done"];
|
|
48317
48394
|
var DEFAULT_STANDALONE_PREFIX = "TASK";
|
|
48318
48395
|
function normalizeTaskStatus(value) {
|
|
48319
48396
|
if (value === void 0) return void 0;
|
|
48320
|
-
if (
|
|
48321
|
-
throw new Error(`Unknown task status '${value}'. Expected one of: ${
|
|
48397
|
+
if (TASK_STATUSES2.includes(value)) return value;
|
|
48398
|
+
throw new Error(`Unknown task status '${value}'. Expected one of: ${TASK_STATUSES2.join(", ")}`);
|
|
48322
48399
|
}
|
|
48323
48400
|
function parseAssignee(value) {
|
|
48324
48401
|
if (!value || value === "user") return { assigneeType: "user", assigneeHash: null };
|
|
@@ -48448,7 +48525,7 @@ function renderTaskDetail2(task) {
|
|
|
48448
48525
|
return lines.join("\n");
|
|
48449
48526
|
}
|
|
48450
48527
|
function renderTaskBoard(tasks, width = process.stdout.columns || 100) {
|
|
48451
|
-
const columns =
|
|
48528
|
+
const columns = TASK_STATUSES2.map((status) => ({ status, tasks: tasks.filter((task) => task.status === status).sort(compareTasks) }));
|
|
48452
48529
|
if (width < 96) {
|
|
48453
48530
|
const lines2 = ["OpenMates Tasks Board"];
|
|
48454
48531
|
for (const column of columns) {
|
|
@@ -50380,6 +50457,7 @@ async function handleChats(client, subcommand, rest, flags, redactor) {
|
|
|
50380
50457
|
json: flags.json === true,
|
|
50381
50458
|
autoApproveSubChats: flags["auto-approve"] === true,
|
|
50382
50459
|
autoApproveMemories: flags["auto-approve-memories"] === true,
|
|
50460
|
+
acceptTaskProposals: flags["accept-task-proposals"] === true,
|
|
50383
50461
|
piiDetection: flags["no-pii-detection"] !== true,
|
|
50384
50462
|
anonymousLearningMode: client.hasSession() ? void 0 : parseAnonymousLearningModeFlags(flags)
|
|
50385
50463
|
},
|
|
@@ -50455,6 +50533,7 @@ Run 'openmates chats show ` + chatId + "' to check if suggestions have been save
|
|
|
50455
50533
|
json: flags.json === true,
|
|
50456
50534
|
autoApproveSubChats: flags["auto-approve"] === true,
|
|
50457
50535
|
autoApproveMemories: flags["auto-approve-memories"] === true,
|
|
50536
|
+
acceptTaskProposals: flags["accept-task-proposals"] === true,
|
|
50458
50537
|
piiDetection: flags["no-pii-detection"] !== true
|
|
50459
50538
|
},
|
|
50460
50539
|
redactor
|
|
@@ -50483,6 +50562,7 @@ Run 'openmates chats show ` + chatId + "' to check if suggestions have been save
|
|
|
50483
50562
|
json: flags.json === true,
|
|
50484
50563
|
autoApproveSubChats: flags["auto-approve"] === true,
|
|
50485
50564
|
autoApproveMemories: flags["auto-approve-memories"] === true,
|
|
50565
|
+
acceptTaskProposals: flags["accept-task-proposals"] === true,
|
|
50486
50566
|
piiDetection: flags["no-pii-detection"] !== true
|
|
50487
50567
|
},
|
|
50488
50568
|
redactor
|
|
@@ -53891,7 +53971,7 @@ async function sendMessageStreaming(client, params, redactor) {
|
|
|
53891
53971
|
process.stdout.write(`${result2.assistant}
|
|
53892
53972
|
`);
|
|
53893
53973
|
}
|
|
53894
|
-
return result2;
|
|
53974
|
+
return { ...result2, acceptedTaskProposals: [] };
|
|
53895
53975
|
}
|
|
53896
53976
|
const urlResult = prepareUrlEmbeds(finalMessage);
|
|
53897
53977
|
finalMessage = urlResult.message;
|
|
@@ -53915,6 +53995,9 @@ async function sendMessageStreaming(client, params, redactor) {
|
|
|
53915
53995
|
}))
|
|
53916
53996
|
});
|
|
53917
53997
|
clearTyping();
|
|
53998
|
+
const acceptedTaskProposals = params.acceptTaskProposals === true && result.status === "completed" ? await acceptChatTaskProposals(client, result.chatId, result.taskProposals, `${finalMessage}
|
|
53999
|
+
|
|
54000
|
+
${result.assistant}`) : [];
|
|
53918
54001
|
if (result.status === "waiting_for_user") {
|
|
53919
54002
|
const question = parseInteractiveQuestionBlock(result.assistant);
|
|
53920
54003
|
if (params.json && question) {
|
|
@@ -53930,7 +54013,7 @@ async function sendMessageStreaming(client, params, redactor) {
|
|
|
53930
54013
|
"\x1B[33mOpenMates needs more input to continue.\x1B[0m\nContinue in the web app, or rerun with --json to inspect the structured waiting state.\n"
|
|
53931
54014
|
);
|
|
53932
54015
|
}
|
|
53933
|
-
return result;
|
|
54016
|
+
return { ...result, acceptedTaskProposals: [] };
|
|
53934
54017
|
}
|
|
53935
54018
|
if (!params.json) {
|
|
53936
54019
|
if (!headerPrinted) {
|
|
@@ -54000,7 +54083,43 @@ async function sendMessageStreaming(client, params, redactor) {
|
|
|
54000
54083
|
`
|
|
54001
54084
|
);
|
|
54002
54085
|
}
|
|
54003
|
-
return result;
|
|
54086
|
+
return { ...result, acceptedTaskProposals };
|
|
54087
|
+
}
|
|
54088
|
+
async function acceptChatTaskProposals(client, chatId, proposals, fallbackText) {
|
|
54089
|
+
let proposalsToAccept = proposals;
|
|
54090
|
+
if (proposalsToAccept.length === 0 && fallbackText.trim()) {
|
|
54091
|
+
const extractionText = buildTaskProposalFallbackText(fallbackText);
|
|
54092
|
+
proposalsToAccept = await client.extractUserTaskProposals({
|
|
54093
|
+
correctedText: extractionText,
|
|
54094
|
+
contextChatId: chatId
|
|
54095
|
+
});
|
|
54096
|
+
}
|
|
54097
|
+
if (proposalsToAccept.length === 0) return [];
|
|
54098
|
+
const masterKey = client.getMasterKeyBytes();
|
|
54099
|
+
const accepted = [];
|
|
54100
|
+
for (const proposal of proposalsToAccept) {
|
|
54101
|
+
const input = await buildCreateUserTaskInput(masterKey, {
|
|
54102
|
+
title: proposal.title,
|
|
54103
|
+
description: proposal.description ?? "",
|
|
54104
|
+
status: proposal.status,
|
|
54105
|
+
assign: proposal.assignee_type ?? "user",
|
|
54106
|
+
chatId
|
|
54107
|
+
});
|
|
54108
|
+
const created = await client.createUserTask(input);
|
|
54109
|
+
const decrypted = await decryptUserTask(created, masterKey);
|
|
54110
|
+
accepted.push(taskToJson(decrypted));
|
|
54111
|
+
}
|
|
54112
|
+
return accepted;
|
|
54113
|
+
}
|
|
54114
|
+
function buildTaskProposalFallbackText(text) {
|
|
54115
|
+
const seen = /* @__PURE__ */ new Set();
|
|
54116
|
+
const bulletLines = text.split("\n").map((line) => line.trim()).filter((line) => /^[-*•]\s+/.test(line)).map((line) => line.replace(/^([-*•]\s*)\[[ xX]\]\s*/, "$1")).filter((line) => {
|
|
54117
|
+
const key = line.replace(/^[-*•]\s+/, "").trim().toLowerCase();
|
|
54118
|
+
if (seen.has(key)) return false;
|
|
54119
|
+
seen.add(key);
|
|
54120
|
+
return true;
|
|
54121
|
+
});
|
|
54122
|
+
return bulletLines.length > 0 ? bulletLines.join("\n") : text;
|
|
54004
54123
|
}
|
|
54005
54124
|
function printIncognitoNoHistoryNotice(json) {
|
|
54006
54125
|
const message = "Incognito chats are not stored. There is no incognito history to show or clear.";
|
|
@@ -55401,10 +55520,10 @@ function printChatsHelp() {
|
|
|
55401
55520
|
openmates chats show <chat-id> [--raw] [--json]
|
|
55402
55521
|
openmates chats open [<n|example-id|slug>] [--json]
|
|
55403
55522
|
openmates chats search <query> [--json]
|
|
55404
|
-
openmates chats new <message> [--json] [--learning-mode --age-group <group>] [--auto-approve] [--auto-approve-memories] [--no-pii-detection]
|
|
55405
|
-
openmates chats send [--chat <id>] [--incognito] <message> [--json] [--auto-approve] [--auto-approve-memories] [--no-pii-detection]
|
|
55523
|
+
openmates chats new <message> [--json] [--learning-mode --age-group <group>] [--auto-approve] [--auto-approve-memories] [--accept-task-proposals] [--no-pii-detection]
|
|
55524
|
+
openmates chats send [--chat <id>] [--incognito] <message> [--json] [--auto-approve] [--auto-approve-memories] [--accept-task-proposals] [--no-pii-detection]
|
|
55406
55525
|
openmates chats send --chat <id> --followup <n> [--json] [--auto-approve] [--auto-approve-memories]
|
|
55407
|
-
openmates chats answer-interactive --chat <id> --question-json '<json>' --answer-json '<json>' [--json]
|
|
55526
|
+
openmates chats answer-interactive --chat <id> --question-json '<json>' --answer-json '<json>' [--json] [--accept-task-proposals]
|
|
55408
55527
|
openmates chats download <chat-id> [--output <path>] [--zip] [--json]
|
|
55409
55528
|
openmates chats delete <id1> [id2] [id3] ... [--yes]
|
|
55410
55529
|
openmates chats share [<chat-id>] [--expires <seconds>] [--password <pwd>] [--json]
|
|
@@ -55447,6 +55566,11 @@ Options for 'new', 'send', and 'incognito':
|
|
|
55447
55566
|
--no-pii-detection Send the message exactly as typed. By default, the CLI
|
|
55448
55567
|
replaces detected PII with placeholders before send.
|
|
55449
55568
|
|
|
55569
|
+
Saved-chat task options for 'new', 'send', and 'answer-interactive':
|
|
55570
|
+
--accept-task-proposals Explicitly save assistant task proposals as encrypted
|
|
55571
|
+
Tasks V1 records scoped to the chat. Without this,
|
|
55572
|
+
proposals remain review-only, like the web app card.
|
|
55573
|
+
|
|
55450
55574
|
Guest-only options for logged-out 'new':
|
|
55451
55575
|
--learning-mode Opt anonymous chat into request-scoped Learning Mode.
|
|
55452
55576
|
--age-group <group> Required with --learning-mode: under_10, 10_12,
|
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -71,6 +71,19 @@ interface SubChatEvent {
|
|
|
71
71
|
type: SubChatEventType;
|
|
72
72
|
payload: Record<string, unknown>;
|
|
73
73
|
}
|
|
74
|
+
interface TaskProposalEvent {
|
|
75
|
+
title: string;
|
|
76
|
+
description?: string | null;
|
|
77
|
+
status?: "backlog" | "todo" | "in_progress" | "blocked" | "done";
|
|
78
|
+
assignee_type?: "ai" | "user";
|
|
79
|
+
}
|
|
80
|
+
interface TaskUpdateProposalEvent {
|
|
81
|
+
task_id: string;
|
|
82
|
+
title?: string | null;
|
|
83
|
+
description?: string | null;
|
|
84
|
+
status?: "backlog" | "todo" | "in_progress" | "blocked" | "done" | null;
|
|
85
|
+
assignee_type?: "ai" | "user" | null;
|
|
86
|
+
}
|
|
74
87
|
|
|
75
88
|
interface SignupCryptoMaterial {
|
|
76
89
|
hashedEmail: string;
|
|
@@ -411,6 +424,12 @@ interface UserTaskRecord {
|
|
|
411
424
|
blocked_reason_code?: string | null;
|
|
412
425
|
ai_execution_state?: string | null;
|
|
413
426
|
}
|
|
427
|
+
interface UserTaskProposalRecord {
|
|
428
|
+
title: string;
|
|
429
|
+
description?: string | null;
|
|
430
|
+
status?: UserTaskStatus;
|
|
431
|
+
assignee_type?: UserTaskAssigneeType;
|
|
432
|
+
}
|
|
414
433
|
type UserTaskCreateInput = Omit<UserTaskRecord, "version" | "started_at" | "completed_at" | "blocked_reason_code" | "ai_execution_state"> & {
|
|
415
434
|
version?: number;
|
|
416
435
|
};
|
|
@@ -937,6 +956,8 @@ declare class OpenMatesClient {
|
|
|
937
956
|
modelName: string | null;
|
|
938
957
|
mateName: string | null;
|
|
939
958
|
followUpSuggestions: string[];
|
|
959
|
+
taskProposals: TaskProposalEvent[];
|
|
960
|
+
taskUpdateProposals: TaskUpdateProposalEvent[];
|
|
940
961
|
subChatEvents: SubChatEvent[];
|
|
941
962
|
appSettingsMemoryRequests: Array<{
|
|
942
963
|
requestId: string | null;
|
|
@@ -1160,6 +1181,10 @@ declare class OpenMatesClient {
|
|
|
1160
1181
|
mateName: string | null;
|
|
1161
1182
|
/** Follow-up suggestions from post-processing (may be empty for incognito chats). */
|
|
1162
1183
|
followUpSuggestions: string[];
|
|
1184
|
+
/** Review-only task proposals from post-processing. */
|
|
1185
|
+
taskProposals: TaskProposalEvent[];
|
|
1186
|
+
/** Review-only task update proposals from post-processing. */
|
|
1187
|
+
taskUpdateProposals: TaskUpdateProposalEvent[];
|
|
1163
1188
|
/** Sub-chat lifecycle frames observed while collecting the parent response. */
|
|
1164
1189
|
subChatEvents: SubChatEvent[];
|
|
1165
1190
|
/** Memory permission requests observed and optionally approved while collecting the response. */
|
|
@@ -1303,6 +1328,12 @@ declare class OpenMatesClient {
|
|
|
1303
1328
|
projectId?: string;
|
|
1304
1329
|
}): Promise<UserTaskRecord[]>;
|
|
1305
1330
|
createUserTask(input: UserTaskCreateInput): Promise<UserTaskRecord>;
|
|
1331
|
+
extractUserTaskProposals(input: {
|
|
1332
|
+
correctedText: string;
|
|
1333
|
+
mode?: "create" | "update";
|
|
1334
|
+
contextChatId?: string | null;
|
|
1335
|
+
projectIds?: string[];
|
|
1336
|
+
}): Promise<UserTaskProposalRecord[]>;
|
|
1306
1337
|
updateUserTask(taskId: string, input: UserTaskUpdateInput): Promise<UserTaskRecord>;
|
|
1307
1338
|
startUserTaskWithAI(taskId: string, input?: UserTaskStartAIInput): Promise<UserTaskRecord>;
|
|
1308
1339
|
deleteUserTask(taskId: string): Promise<{
|
package/dist/index.js
CHANGED