@crossworks/content-core 0.232.254 → 0.232.256

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossworks/content-core",
3
- "version": "0.232.254",
3
+ "version": "0.232.256",
4
4
  "description": "Browser-safe content logic — markdown, blocks, pages, tables, formulas — shared by the server and any client. Zero server deps by design: nothing here may reach @mantle/db, node-only APIs, or the network (the jackdaw-repo-split P0 boundary).",
5
5
  "exports": {
6
6
  "./app-nav": "./src/app-nav.ts",
@@ -30,7 +30,7 @@
30
30
  "./thinking-tiers": "./src/thinking-tiers.ts"
31
31
  },
32
32
  "dependencies": {
33
- "@mantle/client-types": "npm:@crossworks/client-types@0.232.254",
33
+ "@mantle/client-types": "npm:@crossworks/client-types@0.232.256",
34
34
  "marked": "^18.0.11",
35
35
  "mathjs": "15.2.0"
36
36
  },
@@ -86,6 +86,26 @@ export function isTeamPrivateReadsEnabled(
86
86
  return prefs.teamPrivateReads === true;
87
87
  }
88
88
 
89
+ /** Node types that hold the owner's private corpus (email + journal). A team
90
+ * surface sees them only when the owner opted in (`teamPrivateReads`). */
91
+ export const TEAM_PRIVATE_CORPUS_TYPES: readonly string[] = ['email', 'email_thread', 'journal'];
92
+
93
+ /** Node types a team surface NEVER sees, opt-in or not: credentials, the
94
+ * owner's own Telegram chats, saved places ("home") and federation peers. */
95
+ export const TEAM_NEVER_TYPES: readonly string[] = [
96
+ 'secret',
97
+ 'telegram_message',
98
+ 'location',
99
+ 'mantle_peer',
100
+ ];
101
+
102
+ /** Every node type hidden from a team-member surface (team chat, forum, a
103
+ * team-mode shared app). The ONE list the read tools and the context loader
104
+ * filter on; see `surfaceHiddenNodeTypes` in @mantle/tools. */
105
+ export function teamHiddenNodeTypes(privateReads: boolean): readonly string[] {
106
+ return privateReads ? TEAM_NEVER_TYPES : [...TEAM_NEVER_TYPES, ...TEAM_PRIVATE_CORPUS_TYPES];
107
+ }
108
+
89
109
  /** Project a stored `thinkingBudget` jsonb value to the typed field — a positive
90
110
  * integer, or undefined for unset/garbage/non-positive. Shared by BOTH the read
91
111
  * (`loadProfilePreferences`) and return (`updateProfilePreferences`) projections