@wirecat/cli-core 0.555.0 → 0.557.0
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/CHANGELOG.md +59 -0
- package/dist/cli/config-command.js +64 -2
- package/dist/cli/config-issues.d.ts +2 -0
- package/dist/cli/config-issues.js +11 -3
- package/dist/cli/config-repair.d.ts +26 -0
- package/dist/cli/config-repair.js +252 -0
- package/dist/cli/messenger/tasks-analysis-command.d.ts +8 -0
- package/dist/cli/messenger/tasks-analysis-command.js +184 -0
- package/dist/cli/messenger/tasks-command.js +11 -2
- package/dist/cli/steps.js +10 -0
- package/dist/domain/finance.d.ts +40 -0
- package/dist/domain/finance.js +39 -0
- package/dist/domain/money.d.ts +29 -0
- package/dist/domain/money.js +98 -0
- package/dist/domain/ref-summaries.js +2 -0
- package/dist/domain/references.d.ts +1 -1
- package/dist/domain/references.js +2 -0
- package/dist/entities/index.d.ts +64 -2
- package/dist/entities/index.js +5 -2
- package/dist/entities/task-results.d.ts +72 -0
- package/dist/entities/task-results.js +40 -1
- package/dist/errors/reasons.d.ts +1 -1
- package/dist/errors/reasons.js +24 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/mail/cli/index.d.ts +1 -0
- package/dist/mail/cli/index.js +3 -0
- package/dist/mail/cli/marks.d.ts +26 -0
- package/dist/mail/cli/marks.js +51 -0
- package/dist/mail/cli/review.js +70 -1
- package/dist/mail/index.d.ts +1 -0
- package/dist/mail/index.js +1 -0
- package/dist/mail/marks.d.ts +56 -0
- package/dist/mail/marks.js +178 -0
- package/dist/meetings/mcp/index.d.ts +15 -15
- package/dist/sends/permissions.js +1 -0
- package/dist/services/proposals/kinds/finance.d.ts +4 -0
- package/dist/services/proposals/kinds/finance.js +40 -0
- package/dist/services/proposals/registry.js +3 -0
- package/dist/services/task-analysis.d.ts +58 -0
- package/dist/services/task-analysis.js +125 -0
- package/dist/store/exports.d.ts +2 -2
- package/dist/store/index.d.ts +2 -1
- package/dist/store/sqlite/email-activity.d.ts +31 -0
- package/dist/store/sqlite/email-activity.js +38 -0
- package/dist/store/sqlite/emails.d.ts +2 -0
- package/dist/store/sqlite/emails.js +1 -0
- package/dist/store/sqlite/entity-types.d.ts +2 -0
- package/dist/store/sqlite/entity-types.js +2 -0
- package/dist/store/sqlite/finance.d.ts +199 -0
- package/dist/store/sqlite/finance.js +514 -0
- package/dist/store/sqlite/knowledge.js +3 -1
- package/dist/store/sqlite/manifest.js +2 -0
- package/dist/store/sqlite/migrations.generated.js +35 -0
- package/dist/store/sqlite/ref-summaries.js +33 -0
- package/dist/store/sqlite/schema.d.ts +1043 -0
- package/dist/store/sqlite/schema.js +98 -0
- package/dist/store/sqlite/task-analysis-marks.d.ts +7 -0
- package/dist/store/sqlite/task-analysis-marks.js +27 -0
- package/dist/store/sqlite/things.js +2 -0
- package/dist/store/store.d.ts +3 -0
- package/dist/store/store.js +5 -0
- package/dist/store/sync.d.ts +5 -1
- package/dist/store/sync.js +4 -0
- package/dist/store/types.d.ts +25 -0
- package/package.json +1 -1
- package/parity.json +29 -0
- package/skills/follow-ups/SKILL.md +22 -2
|
@@ -1394,6 +1394,104 @@ export const facts = sqliteTable("facts", {
|
|
|
1394
1394
|
index("facts_by_author_type_author_id").on(table.authorType, table.authorId),
|
|
1395
1395
|
index("facts_by_confirmed_by_type_confirmed_by_id").on(table.confirmedByType, table.confirmedById),
|
|
1396
1396
|
]);
|
|
1397
|
+
/** An invoice the owner issued or received; its total is the sum of its lines, its status follows allocations. */
|
|
1398
|
+
export const invoices = sqliteTable("invoices", {
|
|
1399
|
+
id: integer("id").primaryKey(),
|
|
1400
|
+
direction: text("direction").notNull(),
|
|
1401
|
+
number: text("number"),
|
|
1402
|
+
issuerType: text("issuer_type"),
|
|
1403
|
+
issuerId: integer("issuer_id"),
|
|
1404
|
+
counterpartyType: text("counterparty_type").notNull(),
|
|
1405
|
+
counterpartyId: integer("counterparty_id").notNull(),
|
|
1406
|
+
projectId: integer("project_id").references(() => projects.id),
|
|
1407
|
+
currency: text("currency").notNull(),
|
|
1408
|
+
/** Minor units of `currency`. */
|
|
1409
|
+
total: integer("total").notNull(),
|
|
1410
|
+
issueDate: text("issue_date"),
|
|
1411
|
+
dueDate: text("due_date"),
|
|
1412
|
+
status: text("status").notNull(),
|
|
1413
|
+
review: text("review").notNull(),
|
|
1414
|
+
authorType: text("author_type").notNull(),
|
|
1415
|
+
authorId: integer("author_id").notNull(),
|
|
1416
|
+
model: text("model"),
|
|
1417
|
+
confirmedByType: text("confirmed_by_type"),
|
|
1418
|
+
confirmedById: integer("confirmed_by_id"),
|
|
1419
|
+
source: text("source").notNull(),
|
|
1420
|
+
metadata: text("metadata"),
|
|
1421
|
+
createdAt: integer("created_at").notNull(),
|
|
1422
|
+
updatedAt: integer("updated_at").notNull(),
|
|
1423
|
+
deletedAt: integer("deleted_at"),
|
|
1424
|
+
}, (table) => [
|
|
1425
|
+
index("invoices_by_issuer_type_issuer_id").on(table.issuerType, table.issuerId),
|
|
1426
|
+
index("invoices_by_counterparty_type_counterparty_id").on(table.counterpartyType, table.counterpartyId),
|
|
1427
|
+
index("invoices_by_project_id").on(table.projectId),
|
|
1428
|
+
index("invoices_by_author_type_author_id").on(table.authorType, table.authorId),
|
|
1429
|
+
index("invoices_by_confirmed_by_type_confirmed_by_id").on(table.confirmedByType, table.confirmedById),
|
|
1430
|
+
]);
|
|
1431
|
+
export const invoiceLines = sqliteTable("invoice_lines", {
|
|
1432
|
+
id: integer("id").primaryKey(),
|
|
1433
|
+
invoiceId: integer("invoice_id")
|
|
1434
|
+
.notNull()
|
|
1435
|
+
.references(() => invoices.id),
|
|
1436
|
+
position: integer("position").notNull(),
|
|
1437
|
+
description: text("description").notNull(),
|
|
1438
|
+
/** A decimal as text: never a float. */
|
|
1439
|
+
quantity: text("quantity").notNull(),
|
|
1440
|
+
unitPrice: integer("unit_price"),
|
|
1441
|
+
amount: integer("amount").notNull(),
|
|
1442
|
+
createdAt: integer("created_at").notNull(),
|
|
1443
|
+
updatedAt: integer("updated_at").notNull(),
|
|
1444
|
+
}, (table) => [unique().on(table.invoiceId, table.position)]);
|
|
1445
|
+
/** Money that moved to or from the owner, in minor units of its currency. */
|
|
1446
|
+
export const payments = sqliteTable("payments", {
|
|
1447
|
+
id: integer("id").primaryKey(),
|
|
1448
|
+
direction: text("direction").notNull(),
|
|
1449
|
+
payerType: text("payer_type"),
|
|
1450
|
+
payerId: integer("payer_id"),
|
|
1451
|
+
payeeType: text("payee_type"),
|
|
1452
|
+
payeeId: integer("payee_id"),
|
|
1453
|
+
amount: integer("amount").notNull(),
|
|
1454
|
+
currency: text("currency").notNull(),
|
|
1455
|
+
paymentDate: text("payment_date").notNull(),
|
|
1456
|
+
reference: text("reference"),
|
|
1457
|
+
projectId: integer("project_id").references(() => projects.id),
|
|
1458
|
+
review: text("review").notNull(),
|
|
1459
|
+
authorType: text("author_type").notNull(),
|
|
1460
|
+
authorId: integer("author_id").notNull(),
|
|
1461
|
+
model: text("model"),
|
|
1462
|
+
confirmedByType: text("confirmed_by_type"),
|
|
1463
|
+
confirmedById: integer("confirmed_by_id"),
|
|
1464
|
+
source: text("source").notNull(),
|
|
1465
|
+
metadata: text("metadata"),
|
|
1466
|
+
createdAt: integer("created_at").notNull(),
|
|
1467
|
+
updatedAt: integer("updated_at").notNull(),
|
|
1468
|
+
deletedAt: integer("deleted_at"),
|
|
1469
|
+
}, (table) => [
|
|
1470
|
+
index("payments_by_payer_type_payer_id").on(table.payerType, table.payerId),
|
|
1471
|
+
index("payments_by_payee_type_payee_id").on(table.payeeType, table.payeeId),
|
|
1472
|
+
index("payments_by_project_id").on(table.projectId),
|
|
1473
|
+
index("payments_by_author_type_author_id").on(table.authorType, table.authorId),
|
|
1474
|
+
index("payments_by_confirmed_by_type_confirmed_by_id").on(table.confirmedByType, table.confirmedById),
|
|
1475
|
+
]);
|
|
1476
|
+
/** How much of a payment settles an invoice; triggers keep it within both and in one currency. */
|
|
1477
|
+
export const paymentAllocations = sqliteTable("payment_allocations", {
|
|
1478
|
+
id: integer("id").primaryKey(),
|
|
1479
|
+
paymentId: integer("payment_id")
|
|
1480
|
+
.notNull()
|
|
1481
|
+
.references(() => payments.id),
|
|
1482
|
+
invoiceId: integer("invoice_id")
|
|
1483
|
+
.notNull()
|
|
1484
|
+
.references(() => invoices.id),
|
|
1485
|
+
amount: integer("amount").notNull(),
|
|
1486
|
+
authorType: text("author_type").notNull(),
|
|
1487
|
+
authorId: integer("author_id").notNull(),
|
|
1488
|
+
createdAt: integer("created_at").notNull(),
|
|
1489
|
+
updatedAt: integer("updated_at").notNull(),
|
|
1490
|
+
}, (table) => [
|
|
1491
|
+
unique().on(table.paymentId, table.invoiceId),
|
|
1492
|
+
index("payment_allocations_by_invoice_id").on(table.invoiceId),
|
|
1493
|
+
index("payment_allocations_by_author_type_author_id").on(table.authorType, table.authorId),
|
|
1494
|
+
]);
|
|
1397
1495
|
export const proposedActions = sqliteTable("proposed_actions", {
|
|
1398
1496
|
id: integer("id").primaryKey(),
|
|
1399
1497
|
kind: text("kind").notNull(),
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Id } from "../../domain/models.js";
|
|
2
|
+
import type { CacheDatabase } from "../driver.js";
|
|
3
|
+
import type { AccountKey, TaskAnalysisMark, TaskAnalysisMarkWrite } from "../types.js";
|
|
4
|
+
export declare const taskAnalysisMarks: (database: CacheDatabase, account: AccountKey) => TaskAnalysisMark[];
|
|
5
|
+
export declare const taskAnalysisMark: (database: CacheDatabase, account: AccountKey, chatId: Id) => TaskAnalysisMark | undefined;
|
|
6
|
+
/** `checked`: the whole stretch through `checkedThrough` was read just now, by this store's clock. */
|
|
7
|
+
export declare const setTaskAnalysisMark: (database: CacheDatabase, account: AccountKey, { chatId, checked, ...saved }: TaskAnalysisMarkWrite, now: number) => void;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// In store_settings beside task_rules_until, so backup and restore carry it and it needs no migration.
|
|
2
|
+
const prefixOf = ({ provider, account }) => `task_analysis:${provider}:${account}:`;
|
|
3
|
+
const markOf = (prefix, row) => ({
|
|
4
|
+
chatId: String(row.key).slice(prefix.length),
|
|
5
|
+
...JSON.parse(String(row.value)),
|
|
6
|
+
at: new Date(Number(row.at)).toISOString(),
|
|
7
|
+
});
|
|
8
|
+
export const taskAnalysisMarks = (database, account) => {
|
|
9
|
+
const prefix = prefixOf(account);
|
|
10
|
+
return database
|
|
11
|
+
.prepare("SELECT key, value, at FROM store_settings WHERE substr(key, 1, ?) = ? ORDER BY at DESC")
|
|
12
|
+
.all(prefix.length, prefix)
|
|
13
|
+
.map((row) => markOf(prefix, row));
|
|
14
|
+
};
|
|
15
|
+
export const taskAnalysisMark = (database, account, chatId) => {
|
|
16
|
+
const prefix = prefixOf(account);
|
|
17
|
+
const row = database.prepare("SELECT key, value, at FROM store_settings WHERE key = ?").get(prefix + chatId);
|
|
18
|
+
return row ? markOf(prefix, row) : undefined;
|
|
19
|
+
};
|
|
20
|
+
/** `checked`: the whole stretch through `checkedThrough` was read just now, by this store's clock. */
|
|
21
|
+
export const setTaskAnalysisMark = (database, account, { chatId, checked, ...saved }, now) => {
|
|
22
|
+
const checkedAt = checked ? new Date(now).toISOString() : taskAnalysisMark(database, account, chatId)?.checkedAt;
|
|
23
|
+
database
|
|
24
|
+
.prepare("INSERT INTO store_settings (key, value, at) VALUES (?, ?, ?) " +
|
|
25
|
+
"ON CONFLICT (key) DO UPDATE SET value = excluded.value, at = excluded.at")
|
|
26
|
+
.run(prefixOf(account) + chatId, JSON.stringify({ ...saved, checkedAt: checkedAt ?? new Date(now).toISOString() }), now);
|
|
27
|
+
};
|
|
@@ -17,6 +17,8 @@ const REFERABLE = {
|
|
|
17
17
|
fact: { tombstone: true },
|
|
18
18
|
bot: { tombstone: false },
|
|
19
19
|
event: { tombstone: true },
|
|
20
|
+
invoice: { tombstone: true },
|
|
21
|
+
payment: { tombstone: true },
|
|
20
22
|
message: { tombstone: true },
|
|
21
23
|
email: { tombstone: true },
|
|
22
24
|
email_thread: { tombstone: true },
|
package/dist/store/store.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ import { type MailStore } from "./sqlite/emails.js";
|
|
|
25
25
|
import { type EventSearch } from "./sqlite/event-search.js";
|
|
26
26
|
import { type FactsStore } from "./sqlite/facts.js";
|
|
27
27
|
import { type FilesStore } from "./sqlite/files.js";
|
|
28
|
+
import { type FinanceStore } from "./sqlite/finance.js";
|
|
28
29
|
import { type InvolvementStore } from "./sqlite/involvements.js";
|
|
29
30
|
import { type KnowledgeStore } from "./sqlite/knowledge.js";
|
|
30
31
|
import { type MeetingVectors } from "./sqlite/meeting-vectors.js";
|
|
@@ -95,6 +96,8 @@ export interface MessageStore {
|
|
|
95
96
|
/** What any ref names, a page of them at a time: read once per page, never once per row. */
|
|
96
97
|
readonly refs: RefsStore;
|
|
97
98
|
readonly facts: FactsStore;
|
|
99
|
+
/** Invoices, payments and their allocations, in exact minor units; an agent's or an import's wait for the owner. */
|
|
100
|
+
readonly finance: FinanceStore;
|
|
98
101
|
/** What agents concluded: summaries, digests, facts, preferences, each with evidence and a scope. */
|
|
99
102
|
readonly memories: MemoriesStore;
|
|
100
103
|
/** What an agent wants done outside the store, waiting for the owner's approval. */
|
package/dist/store/store.js
CHANGED
|
@@ -24,6 +24,7 @@ import { eventSearchOver } from "./sqlite/event-search.js";
|
|
|
24
24
|
import { evidenceFindingsStoreOver } from "./sqlite/evidence-findings.js";
|
|
25
25
|
import { factsStoreOver } from "./sqlite/facts.js";
|
|
26
26
|
import { filesStoreOver } from "./sqlite/files.js";
|
|
27
|
+
import { financeStoreOver } from "./sqlite/finance.js";
|
|
27
28
|
import { involvementStoreOver } from "./sqlite/involvements.js";
|
|
28
29
|
import { knowledgeStoreOver } from "./sqlite/knowledge.js";
|
|
29
30
|
import { logPruner } from "./sqlite/log-pruning.js";
|
|
@@ -110,6 +111,7 @@ const storeOver = (context) => {
|
|
|
110
111
|
summaries: async (texts, options) => refSummariesOf(context.database, texts, options),
|
|
111
112
|
};
|
|
112
113
|
const facts = once(() => factsStoreOver(context));
|
|
114
|
+
const finance = once(() => financeStoreOver(context));
|
|
113
115
|
const memories = once(() => memoriesStoreOver(context));
|
|
114
116
|
const proposedActions = once(() => proposedActionsStoreOver(context));
|
|
115
117
|
const agentActions = once(() => agentActionsStoreOver(context, pruneLogsWhenDue));
|
|
@@ -210,6 +212,9 @@ const storeOver = (context) => {
|
|
|
210
212
|
get facts() {
|
|
211
213
|
return facts();
|
|
212
214
|
},
|
|
215
|
+
get finance() {
|
|
216
|
+
return finance();
|
|
217
|
+
},
|
|
213
218
|
get memories() {
|
|
214
219
|
return memories();
|
|
215
220
|
},
|
package/dist/store/sync.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Id } from "../domain/models.js";
|
|
2
2
|
import type { StoreContext } from "./sqlite/open.js";
|
|
3
|
-
import type { AccountKey, Delta, Range } from "./types.js";
|
|
3
|
+
import type { AccountKey, Delta, Range, TaskAnalysisMark, TaskAnalysisMarkWrite } from "./types.js";
|
|
4
4
|
export interface SyncStore {
|
|
5
5
|
/** What a sync remembered under `name` for this account, and when; a caller encodes a number itself. */
|
|
6
6
|
syncState(key: AccountKey, name: string): Promise<{
|
|
@@ -31,5 +31,9 @@ export interface SyncStore {
|
|
|
31
31
|
/** Where the account's last task-rule pass stopped: the newest store time it read. */
|
|
32
32
|
taskRulesStop(key: AccountKey): Promise<string | null>;
|
|
33
33
|
setTaskRulesStop(key: AccountKey, until: string): Promise<void>;
|
|
34
|
+
/** Every chat of the account read for tasks, the latest moved first. */
|
|
35
|
+
taskAnalysisMarks(key: AccountKey): Promise<TaskAnalysisMark[]>;
|
|
36
|
+
taskAnalysisMark(key: AccountKey, chatId: Id): Promise<TaskAnalysisMark | undefined>;
|
|
37
|
+
setTaskAnalysisMark(key: AccountKey, mark: TaskAnalysisMarkWrite): Promise<void>;
|
|
34
38
|
}
|
|
35
39
|
export declare const syncStoreOver: (context: StoreContext) => SyncStore;
|
package/dist/store/sync.js
CHANGED
|
@@ -2,6 +2,7 @@ import { keysOver } from "./keys.js";
|
|
|
2
2
|
import * as chatQueries from "./sqlite/chats.js";
|
|
3
3
|
import * as ranges from "./sqlite/ranges.js";
|
|
4
4
|
import * as sync from "./sqlite/sync.js";
|
|
5
|
+
import { setTaskAnalysisMark, taskAnalysisMark, taskAnalysisMarks } from "./sqlite/task-analysis-marks.js";
|
|
5
6
|
import { setTaskRulesStop, taskRulesStop } from "./sqlite/task-rule-stops.js";
|
|
6
7
|
import { write } from "./sqlite/transaction.js";
|
|
7
8
|
export const syncStoreOver = (context) => {
|
|
@@ -56,5 +57,8 @@ export const syncStoreOver = (context) => {
|
|
|
56
57
|
},
|
|
57
58
|
taskRulesStop: async (key) => taskRulesStop(database, key),
|
|
58
59
|
setTaskRulesStop: async (key, until) => setTaskRulesStop(database, key, until, context.now()),
|
|
60
|
+
taskAnalysisMarks: async (key) => taskAnalysisMarks(database, key),
|
|
61
|
+
taskAnalysisMark: async (key, chatId) => taskAnalysisMark(database, key, chatId),
|
|
62
|
+
setTaskAnalysisMark: async (key, mark) => setTaskAnalysisMark(database, key, mark, context.now()),
|
|
59
63
|
};
|
|
60
64
|
};
|
package/dist/store/types.d.ts
CHANGED
|
@@ -251,3 +251,28 @@ export interface Range {
|
|
|
251
251
|
from: number;
|
|
252
252
|
to: number;
|
|
253
253
|
}
|
|
254
|
+
/**
|
|
255
|
+
* How far a chat's messages were read for tasks: every stored message sent from `from` through `through`, the one
|
|
256
|
+
* with id `throughId` last. Its own point, so reading a chat, marking it read or another reader's `--new` never
|
|
257
|
+
* moves it.
|
|
258
|
+
*/
|
|
259
|
+
export interface TaskAnalysisMark {
|
|
260
|
+
chatId: Id;
|
|
261
|
+
from: string;
|
|
262
|
+
through: string;
|
|
263
|
+
throughId: Id;
|
|
264
|
+
/** Who moved it last: an agent's name or the owner. */
|
|
265
|
+
by: string;
|
|
266
|
+
/**
|
|
267
|
+
* At `checkedAt` every stored message sent from `from` through `checkedThrough` had been read; one saved or edited
|
|
268
|
+
* later inside that stretch (history fetched afterwards) was not.
|
|
269
|
+
*/
|
|
270
|
+
checkedAt: string;
|
|
271
|
+
checkedThrough: string;
|
|
272
|
+
/** When it last moved. */
|
|
273
|
+
at: string;
|
|
274
|
+
}
|
|
275
|
+
/** `checked` stamps `checkedAt` with the store's clock; otherwise the mark keeps its earlier one. */
|
|
276
|
+
export type TaskAnalysisMarkWrite = Omit<TaskAnalysisMark, "at" | "checkedAt"> & {
|
|
277
|
+
checked: boolean;
|
|
278
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.557.0",
|
|
4
4
|
"description": "The messenger-neutral half of a messaging CLI: domain model, message locators, rendering, name resolution, the SQLite seam, the command skeleton and shared read commands, the send guard, run records and the message store",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|
package/parity.json
CHANGED
|
@@ -735,6 +735,9 @@
|
|
|
735
735
|
"value": "<on|off>",
|
|
736
736
|
"meaning": "only the owner may change the name and photo"
|
|
737
737
|
},
|
|
738
|
+
"--open-new": {
|
|
739
|
+
"meaning": "open a task from a message the chat's task point already passed; without it a read again only updates and closes tasks"
|
|
740
|
+
},
|
|
738
741
|
"--operation-id": {
|
|
739
742
|
"value": "<id>",
|
|
740
743
|
"meaning": "identify a send or creation attempt; message/poll retries reuse it, while an unknown topic creation must never be repeated"
|
|
@@ -2763,6 +2766,12 @@
|
|
|
2763
2766
|
"config": {
|
|
2764
2767
|
"in": "all"
|
|
2765
2768
|
},
|
|
2769
|
+
"config repair": {
|
|
2770
|
+
"in": "all",
|
|
2771
|
+
"options": {
|
|
2772
|
+
"--dry-run": "all"
|
|
2773
|
+
}
|
|
2774
|
+
},
|
|
2766
2775
|
"config set": {
|
|
2767
2776
|
"in": "all",
|
|
2768
2777
|
"options": {
|
|
@@ -4816,6 +4825,12 @@
|
|
|
4816
4825
|
"tasks": {
|
|
4817
4826
|
"in": "all"
|
|
4818
4827
|
},
|
|
4828
|
+
"tasks acknowledge": {
|
|
4829
|
+
"in": "all",
|
|
4830
|
+
"options": {
|
|
4831
|
+
"--since-time": "all"
|
|
4832
|
+
}
|
|
4833
|
+
},
|
|
4819
4834
|
"tasks add": {
|
|
4820
4835
|
"in": "all",
|
|
4821
4836
|
"options": {
|
|
@@ -4825,6 +4840,7 @@
|
|
|
4825
4840
|
"--due": "all",
|
|
4826
4841
|
"--into": "all",
|
|
4827
4842
|
"--new": "all",
|
|
4843
|
+
"--open-new": "all",
|
|
4828
4844
|
"--remind-time": "all",
|
|
4829
4845
|
"--title": "all",
|
|
4830
4846
|
"--type": {
|
|
@@ -4931,6 +4947,13 @@
|
|
|
4931
4947
|
"--holder": "all"
|
|
4932
4948
|
}
|
|
4933
4949
|
},
|
|
4950
|
+
"tasks review": {
|
|
4951
|
+
"in": "all",
|
|
4952
|
+
"options": {
|
|
4953
|
+
"--limit": "all",
|
|
4954
|
+
"--since-time": "all"
|
|
4955
|
+
}
|
|
4956
|
+
},
|
|
4934
4957
|
"tasks scan": {
|
|
4935
4958
|
"in": "all",
|
|
4936
4959
|
"options": {
|
|
@@ -4940,6 +4963,12 @@
|
|
|
4940
4963
|
"tasks show": {
|
|
4941
4964
|
"in": "all"
|
|
4942
4965
|
},
|
|
4966
|
+
"tasks status": {
|
|
4967
|
+
"in": "all",
|
|
4968
|
+
"options": {
|
|
4969
|
+
"--limit": "all"
|
|
4970
|
+
}
|
|
4971
|
+
},
|
|
4943
4972
|
"tasks unmerge": {
|
|
4944
4973
|
"in": "all"
|
|
4945
4974
|
},
|
|
@@ -38,6 +38,26 @@ no message text — read all of it:
|
|
|
38
38
|
|
|
39
39
|
Anything not on the agenda waits for its own date. Do not open it.
|
|
40
40
|
|
|
41
|
+
**Every chat keeps its own point of reading for tasks.** `review --new`, `inbox`, the owner reading on the phone
|
|
42
|
+
and other agents all move their own points, so a message they showed is not yet read for tasks. Work from the
|
|
43
|
+
task point instead:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
{{command}} tasks status --json # per chat: read for tasks through when, how many wait, how many came late
|
|
47
|
+
{{command}} tasks review "<chat>" --json # the messages after the point, oldest first, and the chat's open tasks
|
|
48
|
+
{{command}} tasks acknowledge "<chat>" <message id> # after its tasks are opened, updated or closed: the next review starts after it
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
For each chat with `waiting` above 0: `tasks review`, then open new tasks, update or close the listed `open_tasks`
|
|
52
|
+
the new messages settle, then run the `next` step the answer gives (`tasks acknowledge`). Acknowledge only what you
|
|
53
|
+
finished; a page with `has_more: true` is followed by the next one. A chat with `late` above 0 got older history
|
|
54
|
+
after it was read: `tasks review "<chat>" --since-time <mark.from>` reads the stretch again (up to 1000 messages),
|
|
55
|
+
and acknowledging that read clears it. A read again only updates and closes tasks: `tasks add` refuses a message the
|
|
56
|
+
point already passed (`task.already-read`) unless it is given `--open-new`, which you pass only when the owner asked
|
|
57
|
+
for tasks from that history. When that answer has `has_more: true` it gives no acknowledge step: the stretch
|
|
58
|
+
is too long to read again in one page, so tell the owner and move on. A chat whose history is not stored yet is fetched by `messages sync` first; `tasks review` reads
|
|
59
|
+
only the store.
|
|
60
|
+
|
|
41
61
|
**History is not work.** A first sync opens no tasks from old messages (`task_first_pass_per_chat`, 0 by
|
|
42
62
|
default) and says how many it held. Do not read old chats looking for tasks. Ask the owner which chats to build,
|
|
43
63
|
then for each: `{{command}} tasks scan "<chat>" --json` lists what would open, and `--yes` opens it. Dig deeper
|
|
@@ -103,7 +123,7 @@ stop. The owner sends what they choose.
|
|
|
103
123
|
|
|
104
124
|
`{{command}} schedule agent follow-ups claude "<prompt>" --at 08:30` runs this every morning. Then you run
|
|
105
125
|
with the CLI's read-only variable set (`MAX_READ_ONLY=1` for max). The task work above still runs: `tasks scan --yes`,
|
|
106
|
-
`add`, `plan`, `link`, `merge`, `unmerge`, `duplicates reject`, `duplicates defer`, `claim`, `release` and `close`
|
|
126
|
+
`acknowledge`, `add`, `plan`, `link`, `merge`, `unmerge`, `duplicates reject`, `duplicates defer`, `claim`, `release` and `close`
|
|
107
127
|
— but every `tasks close` then waits on the owner as a suggestion, whatever your certainty, and `--as-owner` is
|
|
108
128
|
refused. Everything else that writes is refused, so do not try: every send, reaction and edit; changes to schedules,
|
|
109
129
|
settings, the recipient list or auto-replies; tags, contact notes and aliases, saved searches, `tasks reject`. What you print is the report the owner opens; its first line shows in the desktop
|
|
@@ -115,7 +135,7 @@ A recipe is a set of flags, not a new command:
|
|
|
115
135
|
|
|
116
136
|
| Recipe | Command |
|
|
117
137
|
|---|---|
|
|
118
|
-
| Morning sweep | `review --new --json`, then `tasks agenda --json` |
|
|
138
|
+
| Morning sweep | `review --new --json`, then `tasks agenda --json`, then `tasks status --json` and a `tasks review` per waiting chat |
|
|
119
139
|
| Weekly quiet-chat pass | `tasks agenda --waiting 3d --within 90d --json` |
|
|
120
140
|
| Groups too, not only people | `tasks agenda "chat_kind:(dialog OR group OR channel)" --json` |
|
|
121
141
|
| Before a call with someone | `tasks list 'chat:"<chat>" state:open' --json`, then `tasks show` each |
|