@opencxh/domain 1.263.0 → 1.264.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.
@@ -24,6 +24,33 @@ interface AssistRanked {
24
24
  /** The assignment that handles this — fills the launcher, or the agent's procedure. */
25
25
  ask: LocalizedText;
26
26
  }
27
+ /** A moment as a fact's value: the queue formats it, because only the client knows the reader. */
28
+ export interface AssistMoment {
29
+ /** Epoch ms. */
30
+ at: number;
31
+ }
32
+ /**
33
+ * One labelled fact on a card's context row.
34
+ *
35
+ * `value` has three forms and no fourth: a bare string when the owner already has the words (a
36
+ * name, an issue key), a {@link LocalizedText} when it needs translating (a status label, a
37
+ * channel name), and an {@link AssistMoment} when it is a date or a time. A source must never
38
+ * format a moment itself — it runs on the server and does not know the reader's locale.
39
+ */
40
+ export interface AssistFact {
41
+ label: LocalizedText;
42
+ value: LocalizedText | string | AssistMoment;
43
+ /** Tints the value: a deadline that has passed or is about to. One per card, promoted to the head. */
44
+ tone?: "due";
45
+ }
46
+ /** The last thing that happened on a nudge's subject. Raw text throughout: nothing here translates. */
47
+ export interface AssistPreview {
48
+ text: string;
49
+ /** Who wrote it, when that is known and is a person. */
50
+ author?: string;
51
+ /** Epoch ms. */
52
+ when?: number;
53
+ }
27
54
  /**
28
55
  * One thing that needs attention now, declared by the app that owns it. Only comms knows that an
29
56
  * unanswered first reply outranks an unread newsletter; a hub scoring this itself would need every
@@ -36,6 +63,16 @@ export interface AssistNudge extends AssistRanked {
36
63
  text: LocalizedText;
37
64
  /** What it is about, as `<kind>:<ref>`. Also the scope the queue's composer writes to. */
38
65
  subjectKey?: string;
66
+ /**
67
+ * The card's context row: two to four facts, in the owner's words.
68
+ *
69
+ * Drawn by the queue itself, so a source gets a usable card without shipping a component — and
70
+ * so every card carries the same row in the same place, which is what made four hand-built
71
+ * cards read as four products. A federated `resource` adds to this, it does not replace it.
72
+ */
73
+ facts?: AssistFact[];
74
+ /** The last thing that happened, drawn as the card's quote. Same reason as {@link facts}. */
75
+ preview?: AssistPreview;
39
76
  /** Where "open it" goes: `/…` follows the kernel router, `https://…` opens a tab. */
40
77
  url?: string;
41
78
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencxh/domain",
3
- "version": "1.263.0",
3
+ "version": "1.264.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",