@opencxh/domain 1.172.1 → 1.172.2

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.
Files changed (82) hide show
  1. package/dist/entities/activity/blocks.d.ts +30 -30
  2. package/dist/entities/activity/catalog.d.ts +63 -86
  3. package/dist/entities/activity/descriptor.d.ts +31 -32
  4. package/dist/entities/activity/index.d.ts +2 -2
  5. package/dist/entities/activity/preview.d.ts +7 -7
  6. package/dist/entities/activity/resolve.d.ts +37 -38
  7. package/dist/entities/activity/types.d.ts +34 -34
  8. package/dist/entities/ai-account/types.d.ts +3 -3
  9. package/dist/entities/ai-account/vendors.d.ts +25 -32
  10. package/dist/entities/ai-budget/types.d.ts +5 -5
  11. package/dist/entities/ai-conversation/types.d.ts +12 -12
  12. package/dist/entities/ai-profile/types.d.ts +14 -21
  13. package/dist/entities/ai-settings/types.d.ts +12 -13
  14. package/dist/entities/analytics/index.d.ts +4 -4
  15. package/dist/entities/analytics/source.d.ts +1 -1
  16. package/dist/entities/analytics/usage.d.ts +23 -28
  17. package/dist/entities/artifact/blocks.d.ts +54 -69
  18. package/dist/entities/artifact/markdown.d.ts +2 -3
  19. package/dist/entities/artifact/types.d.ts +46 -54
  20. package/dist/entities/assignment/types.d.ts +74 -88
  21. package/dist/entities/channel/index.d.ts +1 -1
  22. package/dist/entities/channel/signature.d.ts +8 -9
  23. package/dist/entities/communication/index.d.ts +1 -1
  24. package/dist/entities/contact/index.d.ts +1 -1
  25. package/dist/entities/custom-field-def/types.d.ts +14 -14
  26. package/dist/entities/external-identity/types.d.ts +45 -50
  27. package/dist/entities/interaction/index.d.ts +1 -1
  28. package/dist/entities/interaction/types.d.ts +44 -47
  29. package/dist/entities/live-lens/types.d.ts +39 -44
  30. package/dist/entities/mcp/types.d.ts +53 -57
  31. package/dist/entities/memory/alias.d.ts +7 -7
  32. package/dist/entities/memory/browse.d.ts +21 -21
  33. package/dist/entities/memory/ingest.d.ts +24 -28
  34. package/dist/entities/memory/item.d.ts +53 -58
  35. package/dist/entities/memory/kind.d.ts +25 -25
  36. package/dist/entities/memory/query.d.ts +49 -51
  37. package/dist/entities/playbook/actor.d.ts +17 -17
  38. package/dist/entities/playbook/assignment.d.ts +54 -63
  39. package/dist/entities/playbook/index.d.ts +2 -2
  40. package/dist/entities/playbook/labels.d.ts +4 -4
  41. package/dist/entities/playbook/trigger-vars.d.ts +14 -15
  42. package/dist/entities/playbook/types.d.ts +172 -302
  43. package/dist/entities/resource-reminder/types.d.ts +8 -9
  44. package/dist/entities/time-entry/duration.d.ts +11 -11
  45. package/dist/entities/time-entry/types.d.ts +59 -59
  46. package/dist/entities/time-entry/work-type.d.ts +21 -24
  47. package/dist/entities/topic/examples.d.ts +26 -27
  48. package/dist/entities/topic/scope.d.ts +11 -12
  49. package/dist/entities/topic/types.d.ts +26 -28
  50. package/dist/entities/user/types.d.ts +24 -28
  51. package/dist/entities/webhook/types.d.ts +6 -6
  52. package/dist/entities/work/keys.d.ts +25 -26
  53. package/dist/entities/work/ladder.d.ts +48 -52
  54. package/dist/entities/work/types.d.ts +108 -114
  55. package/dist/index.cjs +6 -6
  56. package/dist/index.d.ts +29 -28
  57. package/dist/index.js +1377 -1242
  58. package/dist/platform/account.d.ts +34 -38
  59. package/dist/platform/ai-tools.d.ts +48 -52
  60. package/dist/platform/api.d.ts +9 -10
  61. package/dist/platform/author.d.ts +7 -9
  62. package/dist/platform/capabilities.d.ts +3 -3
  63. package/dist/platform/communication.d.ts +163 -204
  64. package/dist/platform/context.d.ts +8 -8
  65. package/dist/platform/identity.d.ts +16 -19
  66. package/dist/platform/kernel.d.ts +1 -1
  67. package/dist/platform/manifest.d.ts +2 -2
  68. package/dist/platform/media.d.ts +13 -15
  69. package/dist/platform/permission.d.ts +39 -0
  70. package/dist/platform/permission.test.d.ts +1 -0
  71. package/dist/platform/presence.d.ts +30 -30
  72. package/dist/platform/provider.d.ts +14 -15
  73. package/dist/platform/resource-source.d.ts +43 -45
  74. package/dist/platform/resource.d.ts +17 -23
  75. package/dist/platform/scope.d.ts +35 -61
  76. package/dist/platform/services.d.ts +4 -4
  77. package/dist/platform/storage.d.ts +1 -1
  78. package/dist/platform/sync-source.d.ts +196 -216
  79. package/dist/platform/transcript-cadence.d.ts +37 -41
  80. package/dist/platform/ui.d.ts +6 -6
  81. package/dist/text/endpoint.d.ts +11 -27
  82. package/package.json +3 -2
@@ -1,39 +1,33 @@
1
1
  /**
2
- * Waar iets **over gaat**: een verwijzing naar een resource, los van welke app hem bezit.
2
+ * What something is **about**: a reference to a resource, independent of which app owns it.
3
3
  *
4
- * Dit type stond in `entities/read-state`, met als doc "so read-state (and, later, an audit log)
5
- * can attach to any resource". Dat "later" is nu: een run heeft precies dezelfde verwijzing nodig.
6
- * Hij is daarom naar `platform/` gehesen in plaats van er een tweede naast te zetten — read-state
7
- * exporteert hem door, zodat geen enkele bestaande importeur verandert.
4
+ * The platform-wide key shape is `"<kind>:<id>"`: what `authorizeScope` accepts, what
5
+ * `ScopeAuthorizeRequest.scopeKey` carries, and what the file keys are made of. {@link refKey} is
6
+ * the bridge there.
8
7
  *
9
- * De platformbrede sleutelvorm is `"<soort>:<id>"`: dat is wat `authorizeScope` aanneemt, wat
10
- * `ScopeAuthorizeRequest.scopeKey` draagt, en waar de dossiersleutels uit bestaan. {@link refKey}
11
- * is de brug daarheen.
12
- *
13
- * Let op de veldnaam: `type`, terwijl de rest van de codebase `kind` gebruikt voor een
14
- * discriminant (`OwnerScope.kind`, `ActingIdentity.kind`, `Decider.kind`, `splitScopeKey().kind`).
15
- * Dat is een inconsistentie van vóór dit type, en hem hier omdopen zou read-state en de
16
- * resource-reminders meesleuren — een eigen opruiming, niet deze.
8
+ * Mind the field name: `type`, while the rest of the codebase uses `kind` for a discriminant
9
+ * (`OwnerScope.kind`, `ActingIdentity.kind`, `Decider.kind`, `splitScopeKey().kind`). That
10
+ * inconsistency predates this type, and renaming it here would drag read-state and the resource
11
+ * reminders along — a cleanup of its own, not this one.
17
12
  */
18
13
  export interface ResourceRef {
19
- /** `"interaction"`, `"task"`, … — dezelfde soorten die een scope-provider declareert. */
14
+ /** `"interaction"`, `"task"`, … — the same kinds a scope provider declares. */
20
15
  type: string;
21
16
  id: string;
22
17
  }
23
- /** De sleutelvorm die `authorizeScope` en de dossiersleutels gebruiken. */
18
+ /** The key shape `authorizeScope` and the file keys use. */
24
19
  export declare function refKey(ref: ResourceRef): string;
25
20
  /**
26
- * De soort die comms bezit, en de enige waar de engine iets extra's van weet: op een interactie
27
- * kun je wachten op een antwoord en een regel in de tijdlijn zetten. Andere soorten kunnen dat
28
- * niet, en dat is geen omissie maar het verschil tussen een gesprek en een taak.
21
+ * The kind comms owns, and the only one the engine knows something extra about: on an interaction
22
+ * you can wait for a reply and put a line in the timeline. Other kinds cannot, and that is not an
23
+ * omission but the difference between a conversation and a task.
29
24
  */
30
25
  export declare const INTERACTION_KIND = "interaction";
31
26
  /**
32
- * Het interactie-id, als dit onderwerp een gesprek is.
27
+ * The interaction id, when this subject is a conversation.
33
28
  *
34
- * Bestaat zodat de twee dingen die écht een gesprek nodig hebben (`wait-for-reply` en de
35
- * lifecycle-marker) daarnaar kunnen vragen zonder overal `type === "interaction"` uit te
36
- * schrijven — en zodat een run over een taak daar netjes `undefined` uit krijgt in plaats van
37
- * stilzwijgend een id dat naar het verkeerde soort wijst.
29
+ * Exists so the two things that really need a conversation (`wait-for-reply` and the lifecycle
30
+ * marker) can ask for it without spelling out `type === "interaction"` everywhere — and so a run
31
+ * about a task gets a clean `undefined` instead of silently an id pointing at the wrong kind.
38
32
  */
39
33
  export declare function interactionIdOf(subject: ResourceRef | undefined): string | undefined;
@@ -6,63 +6,38 @@ export interface ScopeAuth {
6
6
  shared?: boolean;
7
7
  audience?: string[];
8
8
  /**
9
- * Van wie deze resource is, zoals de eigenaar-app het ziet: een persoonlijke mailbox, een
10
- * teaminbox, of de organisatie.
11
- *
12
- * Los van `shared` en `audience`, die iets anders zeggen. `shared` gaat over of een
13
- * AI-gesprek op deze scope met het team gedeeld wordt (voor een interactie altijd waar), en
14
- * `audience` is de momentane ledenlijst voor SSE. Dit veld gaat over **eigenaarschap**, en
15
- * dat is wat een consument nodig heeft om te beslissen of afgeleide kennis breder mag dan
16
- * de resource zelf.
17
- *
18
- * Eerste consument is de geheugenlaag: een org-brede geheugensoort wordt bij het schrijven
19
- * versmald naar `audience` als het bronsubject persoonlijk is, zodat een gesprek uit iemands
20
- * eigen mailbox niet in de cross-klant-zoekresultaten van een collega opduikt. Afwezig =
21
- * onbekend, en dat wordt daar als "versmallen" gelezen: de veilige kant.
9
+ * Who owns this resource as the owner app sees it: a personal mailbox, a
10
+ * team inbox, or the organization. Distinct from `shared` (whether an AI
11
+ * conversation on this scope is team-shared) and `audience` (current member
12
+ * list for SSE): this is **ownership** — what a consumer needs to decide
13
+ * whether derived knowledge may travel wider than the resource itself.
14
+ * First consumer is the memory layer: an org-wide memory kind is narrowed
15
+ * to `audience` at write time when the source subject is personal. Absent =
16
+ * unknown, read there as "narrow": the safe side.
22
17
  */
23
18
  ownerScope?: OwnerScope;
24
19
  /**
25
- * De **dossiersleutels** waaronder deze resource valt: de canonieke sleutels waarmee andere
26
- * apps hem in één geïndexeerde `$in` terugvinden.
27
- *
28
- * Dit is de ene conventie waarmee verbanden in dit platform worden uitgedrukt. Deze
29
- * datastore kan niet joinen en niet recursief traverseren, dus een edge-*tabel* zou van
30
- * elke vraag een keten van `$in`-hops met een groeiende idlijst maken. In plaats daarvan
31
- * draagt elke contextdragende rij zijn eigen sleutels, platgeslagen op **schrijfmoment**:
32
- * `Interaction.partyKeys` doet dat al, `Contact.keys`/`Company.keys` ook, en de
33
- * geheugenlaag stempelt ze via dit veld op zijn items (`MemoryItem.keys`).
34
- *
35
- * Het vocabulaire is dat van `endpointKey`: `mailto:`, `tel:`, `domain:`, plus de
36
- * vastgelegde `contact:<id>` / `company:<id>` / `interaction:<id>`. Twee rollen, één
37
- * vorm — *identiteit* ("dit ben ik", `Contact.keys`) en *verwijzing* ("hier hoor ik bij",
38
- * `partyKeys`).
39
- *
40
- * **Klein houden.** Dit is de set van de rij zelf, niet zijn hele omgeving: een company
41
- * geeft zijn eigen sleutels en domeinen, níet die van tweehonderd medewerkers. Die
42
- * fan-out hoort bij een expliciete zoekvraag (`keySetForCompany`), niet bij elke
43
- * autorisatie — deze call zit op het hete pad van elke geheugen-schrijfactie.
44
- *
45
- * Afwezig = onbekend, en dat wordt gelezen als "alleen het subject zelf": minder
46
- * vindbaar, nooit ruimer. Dezelfde richting als {@link ScopeAuth.ownerScope}.
20
+ * The **dossier keys** this resource falls under: the canonical keys other
21
+ * apps use to find it in one indexed `$in`. The platform's one convention for
22
+ * relationships — the datastore cannot join or traverse, so each
23
+ * context-bearing row carries its own keys, flattened at **write time**
24
+ * (`Interaction.partyKeys`, `Contact.keys`, `MemoryItem.keys` via this
25
+ * field). Vocabulary is `endpointKey` (`mailto:`, `tel:`, `domain:`) plus
26
+ * `contact:<id>` / `company:<id>` / `interaction:<id>`. Keep it small: the
27
+ * row's own keys, not its whole neighborhood — fan-out belongs to an explicit
28
+ * search (`keySetForCompany`), and this call sits on the hot path of every
29
+ * memory write. Absent = unknown, read as "only the subject itself": less
30
+ * findable, never wider. Same direction as {@link ScopeAuth.ownerScope}.
47
31
  */
48
32
  keys?: string[];
49
33
  /**
50
- * Wie deze resource *behandelt*, als de eigenaar-app dat weet: het userId van de
51
- * toegewezen behandelaar.
52
- *
53
- * Los van {@link ScopeAuth.ownerScope}, dat over eigenaarschap gaat (een persoonlijke
54
- * mailbox, een teaminbox, de organisatie). Dit is de persoon, en het is een ander
55
- * antwoord: een gesprek in een teaminbox heeft `ownerScope.kind === "team"` én een
56
- * concrete behandelaar.
57
- *
58
- * Eerste consument is `apps/work`: werk dat de assistent uit een gesprek aanmaakt hoort
59
- * bij de behandelaar van dat gesprek te landen, niet op naam van de agent die het
60
- * aanmaakte. Comms leidde dat vroeger in-process af (`resolveInteractionOwnership`);
61
- * cross-app is dit hetzelfde antwoord zonder een tweede endpoint, want de aanroeper heeft
62
- * de interactie en de inbox hier toch al gelezen.
63
- *
64
- * Afwezig = onbekend, en dat leest een consument als "val terug op je eigen regels" —
65
- * nooit als "niemand".
34
+ * Who *handles* this resource, if the owner app knows: the assigned
35
+ * handler's userId. Distinct from {@link ScopeAuth.ownerScope} (ownership) —
36
+ * a team-inbox conversation has `ownerScope.kind === "team"` *and* a
37
+ * concrete handler. First consumer is `apps/work`: work the assistant
38
+ * creates from a conversation must land with that conversation's handler,
39
+ * not under the creating agent's name. Absent = unknown, read by consumers
40
+ * as "fall back to your own rules" — never as "nobody".
66
41
  */
67
42
  ownerUserId?: string;
68
43
  }
@@ -70,22 +45,21 @@ export interface ScopeAuth {
70
45
  export interface ScopeDescribe {
71
46
  kinds: string[];
72
47
  /**
73
- * Welke soorten acting identity deze provider daadwerkelijk evalueert.
74
- * Afwezig = alleen het klassieke `userId`-contract.
75
- *
76
- * Dit is een fail-closed schakelaar, geen documentatie: een provider die
77
- * `actor` negeert ziet bij een team-actor een lege `userId` en zou dat als
78
- * "trusted system caller" lezen — dus volledige toegang. `authorizeIdentity`
79
- * weigert daarom een `team`-actor zolang de eigenaar `"team"` niet declareert.
48
+ * Which acting-identity kinds this provider actually evaluates. Absent =
49
+ * only the classic `userId` contract. A fail-closed switch, not
50
+ * documentation: a provider that ignores `actor` sees an empty `userId` for
51
+ * a team actor and would read that as "trusted system caller" — full access.
52
+ * `authorizeIdentity` therefore refuses a `team` actor until the owner
53
+ * declares `"team"`.
80
54
  */
81
55
  actorKinds?: ActingIdentity["kind"][];
82
56
  }
83
57
  /**
84
58
  * POST /provider/scope/authorize body.
85
59
  *
86
- * `userId` blijft voor back-compat: bestaande providers lezen alleen dat veld, en
87
- * een `user`-actor vult het mee zodat zij ongewijzigd blijven werken. `userId`
88
- * afwezig = trusted system caller (ruim!), dus zie de waarschuwing bij
60
+ * `userId` stays for back-compat: existing providers read only that field, and
61
+ * a `user` actor fills it so they keep working unchanged. Absent `userId` =
62
+ * trusted system caller (broad!) — see the warning at
89
63
  * {@link ScopeDescribe.actorKinds}.
90
64
  */
91
65
  export interface ScopeAuthorizeRequest {
@@ -7,21 +7,21 @@ export type ServiceMap = {
7
7
  [key: string]: ServiceDefinition;
8
8
  };
9
9
  export interface GlobalServices extends ServiceMap {
10
- 'platform:router:push': {
10
+ "platform:router:push": {
11
11
  params: {
12
12
  path: string;
13
13
  options?: any;
14
14
  };
15
15
  response: void;
16
16
  };
17
- 'platform:auth:expired': {
17
+ "platform:auth:expired": {
18
18
  params: {};
19
19
  response: void;
20
20
  };
21
- 'platform:ui:toast': {
21
+ "platform:ui:toast": {
22
22
  params: {
23
23
  message: string;
24
- type: 'success' | 'error';
24
+ type: "success" | "error";
25
25
  };
26
26
  response: void;
27
27
  };
@@ -26,7 +26,7 @@ export interface FilePointer {
26
26
  id: string;
27
27
  mountId: string;
28
28
  name: string;
29
- type: 'file' | 'folder';
29
+ type: "file" | "folder";
30
30
  path: string;
31
31
  providerKey: string;
32
32
  mimeType: string;