@wirecat/cli-core 0.589.0 → 0.590.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 CHANGED
@@ -7,6 +7,19 @@ shape of this file.
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 0.590.0 — 06.11.2026
11
+
12
+ ### Changed — may break callers
13
+
14
+ - **Project status calls a word-found money request `asked`, not `open`.** The `amounts` signal (version 3) gives
15
+ `state: "asked"` where it gave `"open"`, and `attention` says `money asked`. A word match cannot tell a real request
16
+ from a price the owner quoted, and "open" read as a debt. `paid-mentioned` and `mentioned` are unchanged.
17
+ - **Agents write organizations at once.** `proposeOrganization` and `proposeOrganizationRename` are gone: an agent's
18
+ `organizations add` and `organizations rename` call `store.knowledge.addOrganization` and `updateOrganization` as the
19
+ owner's do, as deals do since 0.588.0. `organization_add` and `organization_rename` rows already stored stay listed
20
+ and decidable through the `organization` review kind, and `ORGANIZATION_ADD_KIND` and `ORGANIZATION_RENAME_KIND`
21
+ stay exported.
22
+
10
23
  ## 0.589.0 — 06.11.2026
11
24
 
12
25
  ### Added
@@ -80,7 +80,7 @@ const partial = (found, chat) => {
80
80
  const readFrom = (found, chat) => {
81
81
  const reply = found.items.find((one) => one.signal === "reply-next" && one.chat === chat)?.data;
82
82
  const money = found.items
83
- .filter((one) => one.signal === "amounts" && one.chat === chat && one.data.state === "open")
83
+ .filter((one) => one.signal === "amounts" && one.chat === chat && one.data.state === "asked")
84
84
  .map((one) => one.data.since)
85
85
  .sort()[0];
86
86
  return day([money, reply?.waitingSince, found.window.since].find((one) => typeof one === "string"));
@@ -188,7 +188,7 @@ export { type PackageUpgradeOutcome, type PackageUpgradePorts, type PackageUpgra
188
188
  export { type PersonMeetingContext, type PersonMeetingContextItem, type PersonMeetingContextOptions, type PersonMeetingReadStore, personMeetingContext, } from "./person-meeting-context.js";
189
189
  export { privatePeopleService } from "./private-people.js";
190
190
  export { approveAsTask, type ProposalTaskStore, proposalSource } from "./proposal-tasks.js";
191
- export { type Decided, type Decision, emptyProposalRegistry, FACT_SUMMARIES, ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND, type OrganizationProposal, type OrganizationRenameProposal, type ProposalFilter, type ProposalKind, type ProposalRegistry, type ProposalRow, parseProposalIds, proposalRegistry, proposeOrganization, proposeOrganizationRename, } from "./proposals/index.js";
191
+ export { type Decided, type Decision, emptyProposalRegistry, FACT_SUMMARIES, ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND, type OrganizationProposal, type OrganizationRenameProposal, type ProposalFilter, type ProposalKind, type ProposalRegistry, type ProposalRow, parseProposalIds, proposalRegistry, } from "./proposals/index.js";
192
192
  export type { RetentionQuery, RetentionService } from "./retention.js";
193
193
  export { retentionService } from "./retention.js";
194
194
  export { RESOURCES_SEARCHED, type SearchAllFound, type SearchAllItem, type SearchAllMessenger, type SearchAllRequest, type SearchedResource, searchAll, } from "./search-all.js";
@@ -146,7 +146,7 @@ export { upgradePackage, } from "./package-upgrade.js";
146
146
  export { personMeetingContext, } from "./person-meeting-context.js";
147
147
  export { privatePeopleService } from "./private-people.js";
148
148
  export { approveAsTask, proposalSource } from "./proposal-tasks.js";
149
- export { emptyProposalRegistry, FACT_SUMMARIES, ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND, parseProposalIds, proposalRegistry, proposeOrganization, proposeOrganizationRename, } from "./proposals/index.js";
149
+ export { emptyProposalRegistry, FACT_SUMMARIES, ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND, parseProposalIds, proposalRegistry, } from "./proposals/index.js";
150
150
  export { retentionService } from "./retention.js";
151
151
  export { RESOURCES_SEARCHED, searchAll, } from "./search-all.js";
152
152
  export { RESOURCES_SEARCHED_WITH_MEETINGS, searchAllIncludingMeetings, searchAllWithMeetings, } from "./search-all-meetings.js";
@@ -5,8 +5,11 @@ export interface AmountsData {
5
5
  amount: string;
6
6
  currency: string | null;
7
7
  direction: MoneyDirection;
8
- /** `paid-mentioned` is a message saying so, never a payment the owner recorded. */
9
- state: "open" | "paid-mentioned" | "mentioned";
8
+ /**
9
+ * `asked` is a message asking for it, not a debt: a word match cannot tell a request from a price the owner quoted.
10
+ * `paid-mentioned` is a message saying so, never a payment the owner recorded.
11
+ */
12
+ state: "asked" | "paid-mentioned" | "mentioned";
10
13
  /** The first ask, or the first mention when nobody asked. */
11
14
  since: string;
12
15
  lastAsked: string | null;
@@ -51,7 +51,7 @@ export const centsText = (cents) => `${Math.floor(cents / 100)}.${String(cents %
51
51
  */
52
52
  export const amounts = {
53
53
  id: "amounts",
54
- version: 2,
54
+ version: 3,
55
55
  scope: "chat",
56
56
  read: async (context, chat) => {
57
57
  if (!chat || context.books)
@@ -67,7 +67,8 @@ export const amounts = {
67
67
  const lastAsk = asks.at(-1);
68
68
  const first = (asks[0] ?? done[0] ?? rows[0]);
69
69
  const paidAfter = done.some((row) => !lastAsk || Date.parse(row.message.timestamp) >= Date.parse(lastAsk.message.timestamp));
70
- const state = asks.length ? (paidAfter ? "paid-mentioned" : "open") : done.length ? "paid-mentioned" : "mentioned";
70
+ const paid = asks.length ? paidAfter : done.length > 0;
71
+ const state = paid ? "paid-mentioned" : asks.length ? "asked" : "mentioned";
71
72
  const cited = asks.length ? [...asks, ...(paidAfter ? done.slice(-1) : [])] : rows;
72
73
  return {
73
74
  signal: "amounts",
@@ -88,5 +89,5 @@ export const amounts = {
88
89
  };
89
90
  });
90
91
  },
91
- attention: (items) => items.flatMap((item) => item.chat !== null && item.data.state === "open" ? [{ chat: item.chat, weight: 2, why: "money open" }] : []),
92
+ attention: (items) => items.flatMap((item) => item.chat !== null && item.data.state === "asked" ? [{ chat: item.chat, weight: 2, why: "money asked" }] : []),
92
93
  };
@@ -1,5 +1,5 @@
1
1
  export { parseProposalIds } from "./ids.js";
2
2
  export { FACT_SUMMARIES } from "./kinds/findings.js";
3
- export { ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND, type OrganizationProposal, type OrganizationRenameProposal, proposeOrganization, proposeOrganizationRename, } from "./kinds/organization.js";
3
+ export { ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND, type OrganizationProposal, type OrganizationRenameProposal, } from "./kinds/organization.js";
4
4
  export { emptyProposalRegistry, proposalRegistry } from "./registry.js";
5
5
  export type { Decided, Decision, ProposalFilter, ProposalKind, ProposalRegistry, ProposalRow } from "./types.js";
@@ -1,4 +1,4 @@
1
1
  export { parseProposalIds } from "./ids.js";
2
2
  export { FACT_SUMMARIES } from "./kinds/findings.js";
3
- export { ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND, proposeOrganization, proposeOrganizationRename, } from "./kinds/organization.js";
3
+ export { ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND, } from "./kinds/organization.js";
4
4
  export { emptyProposalRegistry, proposalRegistry } from "./registry.js";
@@ -1,4 +1,4 @@
1
- import type { Author, MessageStore, Organization, ProposedAction } from "../../../store/index.js";
1
+ import type { MessageStore, Organization } from "../../../store/index.js";
2
2
  import type { ProposalKind } from "../types.js";
3
3
  export declare const ORGANIZATION_ADD_KIND = "organization_add";
4
4
  export declare const ORGANIZATION_RENAME_KIND = "organization_rename";
@@ -11,8 +11,5 @@ export interface OrganizationRenameProposal {
11
11
  organization: string;
12
12
  name: string;
13
13
  }
14
- /** An agent's new organization waits as a stored proposal; the organization exists only once it is confirmed. */
15
- export declare const proposeOrganization: (store: Pick<MessageStore, "proposedActions">, input: OrganizationProposal, by: Author, reason?: string) => Promise<ProposedAction>;
16
- /** An agent's rename waits as a stored proposal too; the organization keeps its name until it is confirmed. */
17
- export declare const proposeOrganizationRename: (store: Pick<MessageStore, "proposedActions">, input: OrganizationRenameProposal, by: Author, reason?: string) => Promise<ProposedAction>;
14
+ /** Only rows stored before agents wrote organizations at once; they stay decidable in review. */
18
15
  export declare const organizationKind: (store: Pick<MessageStore, "proposedActions" | "knowledge">) => ProposalKind;
@@ -23,20 +23,7 @@ const rowOf = (action) => {
23
23
  createdAt: action.createdAt,
24
24
  };
25
25
  };
26
- /** An agent's new organization waits as a stored proposal; the organization exists only once it is confirmed. */
27
- export const proposeOrganization = (store, input, by, reason) => store.proposedActions.propose({
28
- kind: ORGANIZATION_ADD_KIND,
29
- by,
30
- payload: input,
31
- ...(reason === undefined ? {} : { reason }),
32
- });
33
- /** An agent's rename waits as a stored proposal too; the organization keeps its name until it is confirmed. */
34
- export const proposeOrganizationRename = (store, input, by, reason) => store.proposedActions.propose({
35
- kind: ORGANIZATION_RENAME_KIND,
36
- by,
37
- payload: input,
38
- ...(reason === undefined ? {} : { reason }),
39
- });
26
+ /** Only rows stored before agents wrote organizations at once; they stay decidable in review. */
40
27
  export const organizationKind = (store) => ({
41
28
  kind: "organization",
42
29
  stored: [ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-core",
3
- "version": "0.589.0",
3
+ "version": "0.590.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",