@pam-ai/pam-ordo-contracts 3.17.1 → 3.19.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.
@@ -1,4 +1,4 @@
1
- import type { MentionRef, ResolveMentionResult, SearchInboxContactsParams } from './index.js';
1
+ import type { ConversationSearchMatch, MentionRef, ResolveMentionResult, SearchInboxContactsParams } from './index.js';
2
2
  type Assert<T extends true> = T;
3
3
  type Accepts<Value, Shape> = Value extends Shape ? true : false;
4
4
  type Rejects<Value, Shape> = Value extends Shape ? false : true;
@@ -130,5 +130,23 @@ export type ResolveMentionResultInvariants = [
130
130
  * resolver comes back a `string`, not a `string | null`.
131
131
  */
132
132
  export declare function mentionResolver(mention: MentionRef): string | null;
133
+ /** A search match names at least one facet; a match in nothing is not a match. */
134
+ export type ConversationSearchMatchInvariants = [
135
+ Assert<Accepts<{
136
+ interactionId: 'i';
137
+ sequenceNumber: 1;
138
+ facets: ['body'];
139
+ }, ConversationSearchMatch>>,
140
+ Assert<Accepts<{
141
+ interactionId: 'i';
142
+ sequenceNumber: 1;
143
+ facets: ['summary', 'transcript'];
144
+ }, ConversationSearchMatch>>,
145
+ Assert<Rejects<{
146
+ interactionId: 'i';
147
+ sequenceNumber: 1;
148
+ facets: [];
149
+ }, ConversationSearchMatch>>
150
+ ];
133
151
  export {};
134
152
  //# sourceMappingURL=contract-invariants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract-invariants.d.ts","sourceRoot":"","sources":["../src/contract-invariants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAoB9F,KAAK,MAAM,CAAC,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC;AAChC,KAAK,OAAO,CAAC,KAAK,EAAE,KAAK,IAAI,KAAK,SAAS,KAAK,GAAG,IAAI,GAAG,KAAK,CAAC;AAChE,KAAK,OAAO,CAAC,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AAC,CAAC;YAAC,UAAU,EAAE,IAAI,CAAA;SAAE,CAAA;KAAE,EAAE,oBAAoB,CAAC,CAAC;IACjG,MAAM,CAAC,OAAO,CAAC;QAAE,IAAI,EAAE,OAAO,GAAG;YAAE,aAAa,EAAE,CAAC,CAAA;SAAE,CAAA;KAAE,EAAE,oBAAoB,CAAC,CAAC;CAChF,CAAC;AAEF;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAElE;AAED,kFAAkF;AAClF,MAAM,MAAM,iCAAiC,GAAG;IAC9C,MAAM,CACJ,OAAO,CAAC;QAAE,aAAa,EAAE,GAAG,CAAC;QAAC,cAAc,EAAE,CAAC,CAAC;QAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAA;KAAE,EAAE,uBAAuB,CAAC,CAC9F;IACD,MAAM,CACJ,OAAO,CACL;QAAE,aAAa,EAAE,GAAG,CAAC;QAAC,cAAc,EAAE,CAAC,CAAC;QAAC,MAAM,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,CAAA;KAAE,EAC5E,uBAAuB,CACxB,CACF;IACD,MAAM,CAAC,OAAO,CAAC;QAAE,aAAa,EAAE,GAAG,CAAC;QAAC,cAAc,EAAE,CAAC,CAAC;QAAC,MAAM,EAAE,EAAE,CAAA;KAAE,EAAE,uBAAuB,CAAC,CAAC;CAChG,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"contract-invariants.js","sourceRoot":"","sources":["../src/contract-invariants.ts"],"names":[],"mappings":"AA2FA;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,OAAmB;IACjD,OAAO,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9D,CAAC"}
1
+ {"version":3,"file":"contract-invariants.js","sourceRoot":"","sources":["../src/contract-invariants.ts"],"names":[],"mappings":"AAgGA;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,OAAmB;IACjD,OAAO,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9D,CAAC"}
@@ -74,6 +74,54 @@ export interface paths {
74
74
  patch?: never;
75
75
  trace?: never;
76
76
  };
77
+ "/v1/inbox/conversations/{conversationId}/search": {
78
+ parameters: {
79
+ query?: never;
80
+ header?: never;
81
+ path?: never;
82
+ cookie?: never;
83
+ };
84
+ get?: never;
85
+ put?: never;
86
+ /**
87
+ * Find where a term appears in one Conversation's whole history
88
+ * @description Find-in-conversation. Returns WHICH Interactions match, newest first, and nothing else: no bodies, no snippets, no offsets. The reader's client loads a window around a match through the interactions read and marks the term in the hydrated body itself, so the search response carries no message text and no PII beyond identifiers.
89
+ * AN INDEXED LOOKUP, NOT A SCAN. Text is tokenised once, when it arrives, into a derived index that stores lexemes and never the sentence. A query costs what its matches cost, not what the conversation's history costs - a customer texting daily for three years searches in the same time as one who texted twice. Spec 13.1 permits this; spec 22 requires it to be its own contract, which is why this is not a parameter on the detail read.
90
+ * ONE INTERACTION IS ONE MATCH however many of its facets contain the term. A call whose summary and transcript both match is counted once and lists both facets, so the reader steps onto the call once.
91
+ * A SNAPSHOT. The response carries asOf, and a client walking the results passes it back on every later call in the same session - stepping, the interactions read, re-issuing the query - so a message arriving mid-session cannot renumber the list under the reader. New arrivals are counted separately and offered, never imposed.
92
+ * Requires the same visibility as the Conversation detail read: a reader who cannot open the Conversation cannot search it.
93
+ */
94
+ post: operations["searchInboxConversation"];
95
+ delete?: never;
96
+ options?: never;
97
+ head?: never;
98
+ patch?: never;
99
+ trace?: never;
100
+ };
101
+ "/v1/inbox/conversations/{conversationId}/interactions": {
102
+ parameters: {
103
+ query?: never;
104
+ header?: never;
105
+ path?: never;
106
+ cookie?: never;
107
+ };
108
+ /**
109
+ * Read a window of one Conversation's Interactions around a sequence number
110
+ * @description A slice of the thread, bodies hydrated, addressed by sequence number.
111
+ * WHY A WINDOW. The detail read returns every Interaction in a Conversation and hydrates the first 500 bodies it meets. On a long-lived Conversation that is thousands of rows and a positional cap that leaves the recent ones wordless. A reader jumping to a search match on row 4,488 of 5,000 needs the fifty rows around it with their bodies - not the thread - and this is how they get them. It is also how the timeline opens: the newest window, and older ones as the reader scrolls back.
112
+ * Anchor omitted means the newest `before` Interactions, which is the view a Conversation opens on. Anchor given means `before` rows preceding it, the anchor itself, and `after` rows following it, so a client can centre a match. The extent tells the client how long the thread is so a virtualised view can size its scrollbar honestly.
113
+ * Honours asOf like every other read: pass the snapshot from a search and the window is consistent with the match list it came from.
114
+ * Same visibility as the Conversation detail read.
115
+ */
116
+ get: operations["listInboxConversationInteractions"];
117
+ put?: never;
118
+ post?: never;
119
+ delete?: never;
120
+ options?: never;
121
+ head?: never;
122
+ patch?: never;
123
+ trace?: never;
124
+ };
77
125
  "/v1/inbox/contacts": {
78
126
  parameters: {
79
127
  query?: never;
@@ -588,6 +636,12 @@ export interface components {
588
636
  enabled: boolean;
589
637
  recipients: components["schemas"]["InboxPolicyRecipientTargetV1"][];
590
638
  };
639
+ /** @description Forward-only activation for the assigned-owner customer-message alert. Missing configuration or enabled=false leaves the legacy alert boundary intact. Messages occurring before activatedAt are never replayed by this feature. */
640
+ InboxPolicyCustomerMessageNotificationsV1: {
641
+ enabled: boolean;
642
+ /** Format: date-time */
643
+ activatedAt: string;
644
+ };
591
645
  /** @description Strict rooftop policy stored at ClientInfo.pamConfig.ordoInbox. policyVersion is derived by consumers from canonical normalized policy content and is not stored inside the policy. Legacy timed escalation configuration is outside this schema and must never be translated implicitly. */
592
646
  InboxPolicyV1: {
593
647
  /** @constant */
@@ -595,6 +649,7 @@ export interface components {
595
649
  categories: components["schemas"]["InboxPolicyCategoryV1"][];
596
650
  overdue: components["schemas"]["InboxPolicyOverdueV1"];
597
651
  notifications: components["schemas"]["InboxPolicyNotificationRuleV1"][];
652
+ customerMessageNotifications?: components["schemas"]["InboxPolicyCustomerMessageNotificationsV1"];
598
653
  emailDelivery?: components["schemas"]["InboxEmailDeliveryPolicyV1"];
599
654
  };
600
655
  /** @description Optional email-only delivery policy, separate from notification creation and recipient selection. Missing policy or enabled=false sends no email. Only notifications created at or after activatedAt are eligible. An empty kinds array opts into nothing. Reading, dismissal, and source resolution do not suppress an otherwise authorized send. Current disablement is a kill switch for unsent work; unknown send outcomes require reconciliation. */
@@ -1046,7 +1101,7 @@ export interface components {
1046
1101
  };
1047
1102
  };
1048
1103
  /** @enum {string} */
1049
- NotificationKind: "reminder_due" | "mention" | "internal_comment_reply" | "needs_attention" | "overdue" | "ro_opened" | "ro_closed";
1104
+ NotificationKind: "reminder_due" | "customer_message" | "mention" | "internal_comment_reply" | "needs_attention" | "overdue" | "ro_opened" | "ro_closed";
1050
1105
  /** @description Recipient-specific Ordo alert state. Opening or dismissing it never resolves domain work. */
1051
1106
  InboxNotification: {
1052
1107
  /** Format: uuid */
@@ -1516,6 +1571,65 @@ export interface components {
1516
1571
  };
1517
1572
  };
1518
1573
  BaseCommand: components["schemas"]["CommandEnvelope"];
1574
+ /**
1575
+ * @description Which text of an Interaction a term was found in. `body` is what was typed; `summary` is Pam's account of a call; `transcript` is what was said on it; `composed` is a line the client renders from structured fields, such as a repair-order event. A call can match in more than one.
1576
+ * @enum {string}
1577
+ */
1578
+ SearchFacet: "body" | "summary" | "transcript" | "composed";
1579
+ ConversationSearchRequest: {
1580
+ /** @description What the reader typed. Normalised server-side - NFKC, unaccented, lowercased, operators stripped, split into at most six prefix terms - so nothing here reaches the database as a query language. Three characters minimum because a shorter prefix matches nearly every message and the count becomes noise. */
1581
+ query: string;
1582
+ /**
1583
+ * @description Matches returned. totalCount is exact regardless, so a client can say "first 500 of 4,112".
1584
+ * @default 500
1585
+ */
1586
+ limit: number;
1587
+ /**
1588
+ * Format: date-time
1589
+ * @description The snapshot from an earlier response in this search session. Omit on the first call; pass it back on every later one so the result set is frozen while the reader walks it.
1590
+ */
1591
+ asOf?: string;
1592
+ };
1593
+ ConversationSearchMatch: {
1594
+ /** Format: uuid */
1595
+ interactionId: string;
1596
+ sequenceNumber: number;
1597
+ /** @description Every facet of this Interaction the term was found in. Never empty - a match with no facet would be a match in nothing. */
1598
+ facets: components["schemas"]["SearchFacet"][];
1599
+ };
1600
+ /** @description What the answer is over. `indexed` Interactions had searchable text in the index as of the snapshot; `total` exist in the Conversation. The gap is history the backfill has not reached, bodies the source refused, or hydration that failed and is being retried - and the client says so beside the count, so "no matches" is never a claim about text nobody looked at. */
1601
+ ConversationSearchCoverage: {
1602
+ indexed: number;
1603
+ total: number;
1604
+ };
1605
+ ConversationSearchResponse: {
1606
+ data: {
1607
+ /**
1608
+ * Format: date-time
1609
+ * @description The snapshot this answer is as of. Pass back on every later call.
1610
+ */
1611
+ asOf: string;
1612
+ /** @description Newest first. Position 0 is the most recent match and where the cursor starts. */
1613
+ matches: components["schemas"]["ConversationSearchMatch"][];
1614
+ /** @description Distinct matching Interactions - never facets, never occurrences. */
1615
+ totalCount: number;
1616
+ coverage: components["schemas"]["ConversationSearchCoverage"];
1617
+ };
1618
+ };
1619
+ ConversationInteractionWindowResponse: {
1620
+ data: {
1621
+ /** Format: date-time */
1622
+ asOf: string;
1623
+ /** @description In sequence order. Bodies hydrated for every row in the window. */
1624
+ interactions: components["schemas"]["InteractionRef"][];
1625
+ /** @description How long the thread is as of the snapshot, so a virtualised view can size itself before it has loaded anything but this window. `null` when no Interaction exists at or before `asOf` — a permitted snapshot earlier than the thread's first row — in which case `interactions` is empty. A thread with rows always has a first and a last, so the bounds are never zero. */
1626
+ extent: {
1627
+ firstSequence: number;
1628
+ lastSequence: number;
1629
+ total: number;
1630
+ } | null;
1631
+ };
1632
+ };
1519
1633
  UserAssignmentTarget: {
1520
1634
  /**
1521
1635
  * @description discriminator enum property added by openapi-typescript
@@ -2130,6 +2244,85 @@ export interface operations {
2130
2244
  503: components["responses"]["ServiceUnavailable"];
2131
2245
  };
2132
2246
  };
2247
+ searchInboxConversation: {
2248
+ parameters: {
2249
+ query?: never;
2250
+ header: {
2251
+ /** @description Authorized rooftop context. For commands this value must match body.clientOrgId; neither value is trusted without DASH-233 resolution. */
2252
+ "x-client-org-id": components["parameters"]["ClientOrgId"];
2253
+ };
2254
+ path: {
2255
+ conversationId: components["parameters"]["ConversationId"];
2256
+ };
2257
+ cookie?: never;
2258
+ };
2259
+ requestBody: {
2260
+ content: {
2261
+ "application/json": components["schemas"]["ConversationSearchRequest"];
2262
+ };
2263
+ };
2264
+ responses: {
2265
+ /** @description Matching Interactions, newest first, over the indexed part of the history. */
2266
+ 200: {
2267
+ headers: {
2268
+ "x-correlation-id": components["headers"]["CorrelationId"];
2269
+ [name: string]: unknown;
2270
+ };
2271
+ content: {
2272
+ "application/json": components["schemas"]["ConversationSearchResponse"];
2273
+ };
2274
+ };
2275
+ 400: components["responses"]["BadRequest"];
2276
+ 401: components["responses"]["Unauthorized"];
2277
+ 403: components["responses"]["Forbidden"];
2278
+ 404: components["responses"]["NotFound"];
2279
+ 500: components["responses"]["InternalError"];
2280
+ 501: components["responses"]["NotImplemented"];
2281
+ 503: components["responses"]["ServiceUnavailable"];
2282
+ };
2283
+ };
2284
+ listInboxConversationInteractions: {
2285
+ parameters: {
2286
+ query?: {
2287
+ /** @description The sequence number to centre on. Omit for the newest window. */
2288
+ anchor?: number;
2289
+ /** @description Rows preceding the anchor (or, with no anchor, the newest N rows). */
2290
+ before?: number;
2291
+ /** @description Rows following the anchor. Ignored when there is no anchor. */
2292
+ after?: number;
2293
+ /** @description The snapshot to read as of. From a search response, so the window agrees with the match list. Defaults to now. */
2294
+ asOf?: string;
2295
+ };
2296
+ header: {
2297
+ /** @description Authorized rooftop context. For commands this value must match body.clientOrgId; neither value is trusted without DASH-233 resolution. */
2298
+ "x-client-org-id": components["parameters"]["ClientOrgId"];
2299
+ };
2300
+ path: {
2301
+ conversationId: components["parameters"]["ConversationId"];
2302
+ };
2303
+ cookie?: never;
2304
+ };
2305
+ requestBody?: never;
2306
+ responses: {
2307
+ /** @description The window, in sequence order, with the thread's extent. */
2308
+ 200: {
2309
+ headers: {
2310
+ "x-correlation-id": components["headers"]["CorrelationId"];
2311
+ [name: string]: unknown;
2312
+ };
2313
+ content: {
2314
+ "application/json": components["schemas"]["ConversationInteractionWindowResponse"];
2315
+ };
2316
+ };
2317
+ 400: components["responses"]["BadRequest"];
2318
+ 401: components["responses"]["Unauthorized"];
2319
+ 403: components["responses"]["Forbidden"];
2320
+ 404: components["responses"]["NotFound"];
2321
+ 500: components["responses"]["InternalError"];
2322
+ 501: components["responses"]["NotImplemented"];
2323
+ 503: components["responses"]["ServiceUnavailable"];
2324
+ };
2325
+ };
2133
2326
  searchInboxContacts: {
2134
2327
  parameters: {
2135
2328
  query?: {