@ai-matrx/associations 0.8.11 → 0.9.1
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 +57 -0
- package/README.md +5 -6
- package/dist/{CommentThread--C4Vgv0S.d.cts → CommentThread-wI65Z4d8.d.cts} +2 -2
- package/dist/{CommentThread--C4Vgv0S.d.ts → CommentThread-wI65Z4d8.d.ts} +2 -2
- package/dist/core/index.cjs +242 -165
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +1 -37
- package/dist/core/index.d.ts +1 -37
- package/dist/core/index.js +242 -165
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +242 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2064 -128
- package/dist/index.d.ts +2064 -128
- package/dist/index.js +242 -0
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +121 -195
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +3 -12
- package/dist/react/index.d.ts +3 -12
- package/dist/react/index.js +142 -221
- package/dist/react/index.js.map +1 -1
- package/dist/react/lazy/index.d.cts +1 -1
- package/dist/react/lazy/index.d.ts +1 -1
- package/package.json +4 -4
package/dist/react/index.js
CHANGED
|
@@ -1,191 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
// src/react/context.tsx
|
|
4
|
-
import {
|
|
5
|
-
createContext,
|
|
6
|
-
useContext,
|
|
7
|
-
useEffect,
|
|
8
|
-
useRef
|
|
9
|
-
} from "react";
|
|
10
|
-
|
|
11
|
-
// src/demanded-rpcs.generated.ts
|
|
12
|
-
var DEMANDED_RPC_NAMES = [
|
|
13
|
-
"assoc_add",
|
|
14
|
-
"assoc_remove",
|
|
15
|
-
"assoc_set_targets",
|
|
16
|
-
"assoc_remove_for_entity",
|
|
17
|
-
"assoc_for_entity",
|
|
18
|
-
"assoc_for_targets",
|
|
19
|
-
"assoc_for_sources",
|
|
20
|
-
"assoc_members_visible",
|
|
21
|
-
"conversation_file_add",
|
|
22
|
-
"conversation_file_remove",
|
|
23
|
-
"conversation_files",
|
|
24
|
-
"agent_resource_add",
|
|
25
|
-
"agent_resource_remove",
|
|
26
|
-
"cat_list",
|
|
27
|
-
"cat_create",
|
|
28
|
-
"cat_update",
|
|
29
|
-
"cat_reparent",
|
|
30
|
-
"cat_delete",
|
|
31
|
-
"ues_set",
|
|
32
|
-
"ues_list",
|
|
33
|
-
"ues_get_bulk",
|
|
34
|
-
"ues_touch",
|
|
35
|
-
"reference_search_candidates",
|
|
36
|
-
"cmt_list",
|
|
37
|
-
"cmt_add",
|
|
38
|
-
"cmt_edit",
|
|
39
|
-
"cmt_delete"
|
|
40
|
-
];
|
|
41
|
-
|
|
42
|
-
// src/core/assertDemandedSchema.ts
|
|
43
|
-
var BAD_UUID = "__not_a_uuid__";
|
|
44
|
-
var SELF_TEST_MISSING_RPC = "assoc_probe_self_test_missing_fn";
|
|
45
|
-
var PROBE_ARGS = {
|
|
46
|
-
// edges — writes
|
|
47
|
-
assoc_add: {
|
|
48
|
-
p_source_type: "note",
|
|
49
|
-
p_source_id: BAD_UUID,
|
|
50
|
-
p_target_type: "task",
|
|
51
|
-
p_target_id: BAD_UUID
|
|
52
|
-
},
|
|
53
|
-
assoc_remove: {
|
|
54
|
-
p_source_type: "note",
|
|
55
|
-
p_source_id: BAD_UUID,
|
|
56
|
-
p_target_type: "task",
|
|
57
|
-
p_target_id: BAD_UUID
|
|
58
|
-
},
|
|
59
|
-
assoc_set_targets: {
|
|
60
|
-
p_source_type: "note",
|
|
61
|
-
p_source_id: BAD_UUID,
|
|
62
|
-
p_target_type: "task",
|
|
63
|
-
p_target_ids: [BAD_UUID]
|
|
64
|
-
},
|
|
65
|
-
assoc_remove_for_entity: { p_type: "note", p_id: BAD_UUID },
|
|
66
|
-
// edges — reads
|
|
67
|
-
assoc_for_entity: { p_type: "note", p_id: BAD_UUID },
|
|
68
|
-
assoc_for_targets: { p_target_type: "task", p_target_ids: [BAD_UUID] },
|
|
69
|
-
assoc_for_sources: { p_source_type: "note", p_source_ids: [BAD_UUID] },
|
|
70
|
-
assoc_members_visible: { p_target_type: "task", p_target_ids: [BAD_UUID] },
|
|
71
|
-
// conversation files
|
|
72
|
-
conversation_file_add: {
|
|
73
|
-
p_conversation_id: BAD_UUID,
|
|
74
|
-
p_file_id: BAD_UUID
|
|
75
|
-
},
|
|
76
|
-
conversation_file_remove: {
|
|
77
|
-
p_conversation_id: BAD_UUID,
|
|
78
|
-
p_file_id: BAD_UUID
|
|
79
|
-
},
|
|
80
|
-
conversation_files: { p_conversation_id: BAD_UUID },
|
|
81
|
-
// agent resources
|
|
82
|
-
agent_resource_add: {
|
|
83
|
-
p_agent_id: BAD_UUID,
|
|
84
|
-
p_source_type: "note",
|
|
85
|
-
p_source_id: BAD_UUID
|
|
86
|
-
},
|
|
87
|
-
agent_resource_remove: {
|
|
88
|
-
p_agent_id: BAD_UUID,
|
|
89
|
-
p_source_type: "note",
|
|
90
|
-
p_source_id: BAD_UUID
|
|
91
|
-
},
|
|
92
|
-
// categories
|
|
93
|
-
cat_list: {},
|
|
94
|
-
cat_create: { p_dimension: "", p_name: "", p_org_id: BAD_UUID },
|
|
95
|
-
cat_update: { p_category_id: BAD_UUID, p_name: "__probe__" },
|
|
96
|
-
cat_reparent: { p_category_id: BAD_UUID },
|
|
97
|
-
cat_delete: { p_category_id: BAD_UUID },
|
|
98
|
-
// favorites / recents
|
|
99
|
-
ues_set: { p_entity_type: "__probe__", p_entity_id: BAD_UUID },
|
|
100
|
-
ues_list: {},
|
|
101
|
-
ues_get_bulk: { p_entity_type: "__probe__", p_entity_ids: [BAD_UUID] },
|
|
102
|
-
ues_touch: { p_entity_type: "__probe__", p_entity_id: BAD_UUID },
|
|
103
|
-
// candidates
|
|
104
|
-
reference_search_candidates: { p_token: "__probe__", p_limit: 1 },
|
|
105
|
-
// comments (W6) — every fn takes a uuid arg, so the unparseable sentinel
|
|
106
|
-
// guarantees 22P02 before any SECURITY DEFINER body runs (no write occurs).
|
|
107
|
-
cmt_list: { p_entity_type: "__probe__", p_entity_id: BAD_UUID },
|
|
108
|
-
cmt_add: {
|
|
109
|
-
p_entity_type: "__probe__",
|
|
110
|
-
p_entity_id: BAD_UUID,
|
|
111
|
-
p_body: "__probe__"
|
|
112
|
-
},
|
|
113
|
-
cmt_edit: { p_id: BAD_UUID, p_body: "__probe__" },
|
|
114
|
-
cmt_delete: { p_id: BAD_UUID }
|
|
115
|
-
};
|
|
116
|
-
function isMissingFunctionError(error) {
|
|
117
|
-
if (!error || typeof error !== "object") return false;
|
|
118
|
-
return error.code === "PGRST202";
|
|
119
|
-
}
|
|
120
|
-
async function assertDemandedSchema(dataSource, options = {}) {
|
|
121
|
-
const { selfTest = false, concurrency = 6, throwOnViolation = true } = options;
|
|
122
|
-
const names = [...DEMANDED_RPC_NAMES];
|
|
123
|
-
if (selfTest) names.push(SELF_TEST_MISSING_RPC);
|
|
124
|
-
const missing = [];
|
|
125
|
-
const unreachable = [];
|
|
126
|
-
const answered = [];
|
|
127
|
-
let cursor = 0;
|
|
128
|
-
async function worker() {
|
|
129
|
-
while (cursor < names.length) {
|
|
130
|
-
const fn = names[cursor];
|
|
131
|
-
cursor += 1;
|
|
132
|
-
if (!fn) continue;
|
|
133
|
-
const args = fn === SELF_TEST_MISSING_RPC ? {} : PROBE_ARGS[fn];
|
|
134
|
-
try {
|
|
135
|
-
const { error } = await dataSource.rpc(fn, args);
|
|
136
|
-
if (error == null) answered.push(fn);
|
|
137
|
-
else if (isMissingFunctionError(error)) missing.push(fn);
|
|
138
|
-
else answered.push(fn);
|
|
139
|
-
} catch (e) {
|
|
140
|
-
unreachable.push({ fn, error: e });
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
await Promise.all(
|
|
145
|
-
Array.from({ length: Math.min(concurrency, names.length) }, worker)
|
|
146
|
-
);
|
|
147
|
-
if (selfTest) {
|
|
148
|
-
const selfTestMissing = missing.includes(SELF_TEST_MISSING_RPC);
|
|
149
|
-
const idx = missing.indexOf(SELF_TEST_MISSING_RPC);
|
|
150
|
-
if (idx >= 0) missing.splice(idx, 1);
|
|
151
|
-
const answeredIdx = answered.indexOf(SELF_TEST_MISSING_RPC);
|
|
152
|
-
if (answeredIdx >= 0) answered.splice(answeredIdx, 1);
|
|
153
|
-
if (!selfTestMissing) {
|
|
154
|
-
throw new Error(
|
|
155
|
-
`assertDemandedSchema self-test FAILED: the fabricated function "${SELF_TEST_MISSING_RPC}" did not come back as missing (PGRST202). This probe cannot currently fail, so its green result proves nothing \u2014 the dataSource is swallowing or faking errors.`
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
if (unreachable.length > 0) {
|
|
160
|
-
throw new Error(
|
|
161
|
-
`assertDemandedSchema could not complete: ${unreachable.length} probe call(s) failed to reach the database (${unreachable.map((u) => u.fn).join(", ")}). This is NOT a schema verdict \u2014 fix connectivity and re-run.`
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
|
-
const ok = missing.length === 0;
|
|
165
|
-
const report = { ok, missing, unreachable, answered };
|
|
166
|
-
if (!ok && throwOnViolation) {
|
|
167
|
-
throw new Error(
|
|
168
|
-
`DEMANDED SCHEMA VIOLATION: the database this dataSource points at cannot answer ${missing.length} demanded @ai-matrx/associations function(s): ${missing.join(", ")}. This package demands the AI Matrx platform schema (README \xA7 The demanded schema); a database without it is not this package's database.`
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
return report;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// src/react/context.tsx
|
|
4
|
+
import { createContext, useContext, useRef } from "react";
|
|
175
5
|
import { jsx } from "react/jsx-runtime";
|
|
176
6
|
var AssociationsReactContext = createContext(
|
|
177
7
|
null
|
|
178
8
|
);
|
|
179
|
-
function isDevelopmentBuild() {
|
|
180
|
-
try {
|
|
181
|
-
return typeof process !== "undefined" && true;
|
|
182
|
-
} catch {
|
|
183
|
-
return false;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
9
|
function AssociationsProvider({
|
|
187
10
|
store,
|
|
188
|
-
probeSchema,
|
|
189
11
|
notifier,
|
|
190
12
|
windowShell,
|
|
191
13
|
capture,
|
|
@@ -195,28 +17,6 @@ function AssociationsProvider({
|
|
|
195
17
|
children
|
|
196
18
|
}) {
|
|
197
19
|
const notifierWarned = useRef(false);
|
|
198
|
-
const shouldProbe = probeSchema ?? isDevelopmentBuild();
|
|
199
|
-
useEffect(() => {
|
|
200
|
-
if (!shouldProbe) return;
|
|
201
|
-
let stale = false;
|
|
202
|
-
void (async () => {
|
|
203
|
-
try {
|
|
204
|
-
await assertDemandedSchema(store.dataSource);
|
|
205
|
-
} catch (error) {
|
|
206
|
-
if (stale) return;
|
|
207
|
-
store.errorSink({
|
|
208
|
-
code: "demanded_schema_violation",
|
|
209
|
-
message: error instanceof Error ? error.message : "assertDemandedSchema failed",
|
|
210
|
-
context: {
|
|
211
|
-
remedy: "Run the platform.associations schema (README \xA7 The demanded schema) on the database this dataSource points at."
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
})();
|
|
216
|
-
return () => {
|
|
217
|
-
stale = true;
|
|
218
|
-
};
|
|
219
|
-
}, [shouldProbe, store]);
|
|
220
20
|
return /* @__PURE__ */ jsx(
|
|
221
21
|
AssociationsReactContext.Provider,
|
|
222
22
|
{
|
|
@@ -278,7 +78,7 @@ function useNotifier() {
|
|
|
278
78
|
}
|
|
279
79
|
|
|
280
80
|
// src/react/hooks/useAssociations.ts
|
|
281
|
-
import { useEffect
|
|
81
|
+
import { useEffect, useRef as useRef2, useSyncExternalStore } from "react";
|
|
282
82
|
|
|
283
83
|
// src/results.ts
|
|
284
84
|
function isAssociationsRpcErr(r) {
|
|
@@ -289,6 +89,10 @@ function isAssociationsRpcErr(r) {
|
|
|
289
89
|
var ENTITY_TYPE_TOKENS = [
|
|
290
90
|
"access_request",
|
|
291
91
|
"activity",
|
|
92
|
+
"admin_audit_log",
|
|
93
|
+
"admin_email_log",
|
|
94
|
+
"admin_markdown_sample",
|
|
95
|
+
"admin_user",
|
|
292
96
|
"agent",
|
|
293
97
|
"agent_card",
|
|
294
98
|
"agent_definition_version",
|
|
@@ -309,12 +113,17 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
309
113
|
"ai_offering",
|
|
310
114
|
"ai_provider",
|
|
311
115
|
"ai_setting",
|
|
116
|
+
"api_field_warning",
|
|
117
|
+
"api_request_log",
|
|
312
118
|
"app",
|
|
119
|
+
"app_config",
|
|
313
120
|
"app_definition_version",
|
|
314
121
|
"app_error",
|
|
315
122
|
"app_execution",
|
|
316
123
|
"app_instance",
|
|
317
124
|
"app_log",
|
|
125
|
+
"app_log_muted_pattern",
|
|
126
|
+
"app_log_norm_exception",
|
|
318
127
|
"app_rate_limit",
|
|
319
128
|
"app_setting",
|
|
320
129
|
"app_sync_status",
|
|
@@ -323,11 +132,36 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
323
132
|
"assessment",
|
|
324
133
|
"assessment_item",
|
|
325
134
|
"assessment_result",
|
|
135
|
+
"assignment_session",
|
|
326
136
|
"assist",
|
|
137
|
+
"assist_producer_policy",
|
|
138
|
+
"association_type",
|
|
139
|
+
"assurance_level",
|
|
140
|
+
"audit_broken_functions",
|
|
141
|
+
"audit_canonical_findings",
|
|
142
|
+
"audit_exemption",
|
|
143
|
+
"audit_function_deps",
|
|
144
|
+
"audit_function_runtime_probe",
|
|
145
|
+
"audit_m2m_candidates",
|
|
146
|
+
"audit_refresh_log",
|
|
147
|
+
"audit_stale_registry",
|
|
148
|
+
"audit_unregistered_candidates",
|
|
149
|
+
"base_entity_template",
|
|
327
150
|
"batch_cost_event",
|
|
328
151
|
"batch_provider_batch",
|
|
329
152
|
"batch_work_item",
|
|
153
|
+
"billing_capability",
|
|
154
|
+
"billing_capability_limit",
|
|
155
|
+
"billing_connect_account",
|
|
156
|
+
"billing_customer",
|
|
157
|
+
"billing_plan",
|
|
158
|
+
"billing_plan_limit",
|
|
159
|
+
"billing_price",
|
|
160
|
+
"billing_product",
|
|
330
161
|
"billing_spend_guardrail",
|
|
162
|
+
"billing_subscription",
|
|
163
|
+
"billing_usage_ledger",
|
|
164
|
+
"billing_user_plan",
|
|
331
165
|
"browser_account_binding",
|
|
332
166
|
"browser_action_event",
|
|
333
167
|
"browser_authenticator_window",
|
|
@@ -349,7 +183,10 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
349
183
|
"canvas_like",
|
|
350
184
|
"canvas_score",
|
|
351
185
|
"canvas_view",
|
|
186
|
+
"catalog_entry",
|
|
352
187
|
"category",
|
|
188
|
+
"change_type_default",
|
|
189
|
+
"chat_user_usage_summary",
|
|
353
190
|
"cmp_entry",
|
|
354
191
|
"cmp_feedback",
|
|
355
192
|
"code_file",
|
|
@@ -412,6 +249,7 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
412
249
|
"comparison_set",
|
|
413
250
|
"contact_medium",
|
|
414
251
|
"contact_submission",
|
|
252
|
+
"content_certification",
|
|
415
253
|
"content_ir_kind",
|
|
416
254
|
"content_ir_kind_component",
|
|
417
255
|
"content_ir_kind_component_incident",
|
|
@@ -420,6 +258,7 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
420
258
|
"content_ir_kind_example",
|
|
421
259
|
"content_ir_kind_instance",
|
|
422
260
|
"content_ir_kind_surface",
|
|
261
|
+
"context_access_log",
|
|
423
262
|
"context_item",
|
|
424
263
|
"context_item_suggestion",
|
|
425
264
|
"context_item_value",
|
|
@@ -465,14 +304,23 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
465
304
|
"cx_tool_trace",
|
|
466
305
|
"cx_user_request",
|
|
467
306
|
"cx_user_todo",
|
|
307
|
+
"data_rights_event",
|
|
468
308
|
"data_store",
|
|
469
309
|
"dataset",
|
|
310
|
+
"ddl_guard_log",
|
|
311
|
+
"deprecated_relation",
|
|
470
312
|
"derive_run",
|
|
313
|
+
"dev_login_audit",
|
|
314
|
+
"dict_entry",
|
|
471
315
|
"dict_setting",
|
|
472
316
|
"dm_conversation",
|
|
473
317
|
"dm_message",
|
|
474
318
|
"dm_participant",
|
|
475
319
|
"domain_classification",
|
|
320
|
+
"edge_payload_kind",
|
|
321
|
+
"entity_grant",
|
|
322
|
+
"entity_relationship",
|
|
323
|
+
"entity_type",
|
|
476
324
|
"esign_campaign",
|
|
477
325
|
"esign_campaign_member",
|
|
478
326
|
"esign_consent_disclosure",
|
|
@@ -485,6 +333,9 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
485
333
|
"esign_provider",
|
|
486
334
|
"esign_provider_binding",
|
|
487
335
|
"esign_signing_key",
|
|
336
|
+
"execution_event_cursor",
|
|
337
|
+
"extension_auth_code",
|
|
338
|
+
"extract_sweep_state",
|
|
488
339
|
"fc_card",
|
|
489
340
|
"fc_detail",
|
|
490
341
|
"fc_set",
|
|
@@ -495,7 +346,10 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
495
346
|
"file_overrides",
|
|
496
347
|
"file_page_annotations",
|
|
497
348
|
"file_pages",
|
|
349
|
+
"file_rag_job",
|
|
498
350
|
"file_version",
|
|
351
|
+
"files_account_tier",
|
|
352
|
+
"files_user_account",
|
|
499
353
|
"flexible_data",
|
|
500
354
|
"folder",
|
|
501
355
|
"game_badge",
|
|
@@ -510,6 +364,8 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
510
364
|
"growth_loop_event",
|
|
511
365
|
"growth_loop_run",
|
|
512
366
|
"growth_loop_stage_run",
|
|
367
|
+
"guardian_link",
|
|
368
|
+
"guest_conversion_audit",
|
|
513
369
|
"guided_checklist_run",
|
|
514
370
|
"heatmap_save",
|
|
515
371
|
"hindsight_enrollment",
|
|
@@ -648,10 +504,13 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
648
504
|
"hr_workflow_step",
|
|
649
505
|
"hr_workflow_step_definition",
|
|
650
506
|
"hr_workweek",
|
|
507
|
+
"html_extraction",
|
|
651
508
|
"iam_access_audit",
|
|
652
509
|
"iam_api_key",
|
|
653
510
|
"iam_emergency_door_request",
|
|
511
|
+
"industry",
|
|
654
512
|
"industry_curator",
|
|
513
|
+
"infra_status",
|
|
655
514
|
"interview_document_revision",
|
|
656
515
|
"interview_hole",
|
|
657
516
|
"interview_question",
|
|
@@ -662,15 +521,26 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
662
521
|
"invitation_request",
|
|
663
522
|
"item_mastery",
|
|
664
523
|
"judge_verdict",
|
|
524
|
+
"jurisdiction_policy",
|
|
665
525
|
"kg_alert",
|
|
666
526
|
"kg_suggestion_ack",
|
|
667
527
|
"kg_sweep_queue",
|
|
668
528
|
"kg_sweep_run",
|
|
669
529
|
"kg_sweep_state",
|
|
670
530
|
"kg_value_match",
|
|
531
|
+
"knob_override_audit",
|
|
532
|
+
"knob_scope_kind",
|
|
671
533
|
"league_membership",
|
|
672
534
|
"learn_doc",
|
|
673
535
|
"library_doc",
|
|
536
|
+
"lifecycle_archive",
|
|
537
|
+
"lifecycle_archive_row",
|
|
538
|
+
"lifecycle_audit",
|
|
539
|
+
"lifecycle_entity_plan",
|
|
540
|
+
"lifecycle_map_build",
|
|
541
|
+
"lifecycle_reference_map",
|
|
542
|
+
"lifecycle_run",
|
|
543
|
+
"lifecycle_tier_ledger",
|
|
674
544
|
"mandate",
|
|
675
545
|
"mandate_binding",
|
|
676
546
|
"mandate_observation",
|
|
@@ -680,6 +550,11 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
680
550
|
"marketing_initiative",
|
|
681
551
|
"masterwork_corpus_item",
|
|
682
552
|
"masterwork_run",
|
|
553
|
+
"math_problem",
|
|
554
|
+
"matrx_action_ledger",
|
|
555
|
+
"mcp_config",
|
|
556
|
+
"mcp_server",
|
|
557
|
+
"mcp_user_conn",
|
|
683
558
|
"meet_call_invite",
|
|
684
559
|
"meet_meeting",
|
|
685
560
|
"meet_note",
|
|
@@ -689,6 +564,9 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
689
564
|
"membership",
|
|
690
565
|
"message",
|
|
691
566
|
"message_template",
|
|
567
|
+
"meta_excluded_schema",
|
|
568
|
+
"meta_table_stats_history",
|
|
569
|
+
"mtx_public_url_guard",
|
|
692
570
|
"ner_shadow",
|
|
693
571
|
"note",
|
|
694
572
|
"note_folder",
|
|
@@ -701,6 +579,8 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
701
579
|
"ops_proof_check",
|
|
702
580
|
"ops_proof_run",
|
|
703
581
|
"ops_proof_scenario",
|
|
582
|
+
"org_admin_audit",
|
|
583
|
+
"org_member_control",
|
|
704
584
|
"organization",
|
|
705
585
|
"output_feedback",
|
|
706
586
|
"page_extraction_job",
|
|
@@ -713,6 +593,7 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
713
593
|
"pc_studio_run",
|
|
714
594
|
"pc_studio_run_asset",
|
|
715
595
|
"pdf_redaction_audit",
|
|
596
|
+
"permission_grant",
|
|
716
597
|
"plan_cms_fill_item",
|
|
717
598
|
"plan_cms_fill_job",
|
|
718
599
|
"plan_entity",
|
|
@@ -726,7 +607,13 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
726
607
|
"platform_continued_access",
|
|
727
608
|
"platform_outcome_event",
|
|
728
609
|
"platform_outsider_consumer",
|
|
610
|
+
"platform_reachability",
|
|
611
|
+
"platform_reference_category",
|
|
612
|
+
"platform_reference_declaration",
|
|
613
|
+
"platform_repo",
|
|
729
614
|
"platform_saved_view",
|
|
615
|
+
"platform_schema",
|
|
616
|
+
"platform_share_link",
|
|
730
617
|
"podcast_race",
|
|
731
618
|
"processed_document",
|
|
732
619
|
"processed_document_page",
|
|
@@ -740,6 +627,7 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
740
627
|
"purpose",
|
|
741
628
|
"quiz_session",
|
|
742
629
|
"rag_ingest_run",
|
|
630
|
+
"rag_library_audit_log",
|
|
743
631
|
"redaction_mapping",
|
|
744
632
|
"research_analysis",
|
|
745
633
|
"research_content",
|
|
@@ -752,7 +640,10 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
752
640
|
"research_tag",
|
|
753
641
|
"research_template",
|
|
754
642
|
"research_topic",
|
|
643
|
+
"retention_policy",
|
|
644
|
+
"retrieval_audit",
|
|
755
645
|
"route_manifest_entry",
|
|
646
|
+
"row_version",
|
|
756
647
|
"rulebook",
|
|
757
648
|
"runtime_operation_stream",
|
|
758
649
|
"runtime_operation_stream_batch",
|
|
@@ -761,11 +652,16 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
761
652
|
"sch_run",
|
|
762
653
|
"sch_task",
|
|
763
654
|
"sch_trigger",
|
|
655
|
+
"schema_migration_ledger",
|
|
656
|
+
"schema_migration_legacy",
|
|
764
657
|
"scope",
|
|
765
658
|
"scope_association_suggestion",
|
|
659
|
+
"scope_dataset_instance",
|
|
766
660
|
"scope_item_value_suggestion",
|
|
767
661
|
"scope_suggestion",
|
|
768
662
|
"scope_type",
|
|
663
|
+
"scrape_parsed_page",
|
|
664
|
+
"seo_ai_capability",
|
|
769
665
|
"seo_ai_visibility_citation",
|
|
770
666
|
"seo_ai_visibility_claim",
|
|
771
667
|
"seo_ai_visibility_panel",
|
|
@@ -832,6 +728,7 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
832
728
|
"seo_story_angle",
|
|
833
729
|
"seo_topic",
|
|
834
730
|
"seo_web_analytics_daily",
|
|
731
|
+
"shareable_resource_registry",
|
|
835
732
|
"shared_canvas_item",
|
|
836
733
|
"short_link",
|
|
837
734
|
"skill",
|
|
@@ -843,6 +740,8 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
843
740
|
"sms_notification",
|
|
844
741
|
"sms_notification_preference",
|
|
845
742
|
"sms_phone_number",
|
|
743
|
+
"source_authority",
|
|
744
|
+
"stage_ref_kind",
|
|
846
745
|
"structured_list",
|
|
847
746
|
"studio_documents",
|
|
848
747
|
"studio_recording_chunks",
|
|
@@ -859,17 +758,24 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
859
758
|
"study_reminder_context",
|
|
860
759
|
"study_reminder_delivery",
|
|
861
760
|
"study_session",
|
|
761
|
+
"study_streak",
|
|
862
762
|
"surface",
|
|
763
|
+
"system_announcement",
|
|
863
764
|
"system_context_item",
|
|
864
765
|
"system_error",
|
|
865
766
|
"system_personal_org_failure",
|
|
866
767
|
"system_write_failure",
|
|
867
768
|
"task",
|
|
769
|
+
"task_user_state",
|
|
770
|
+
"taxonomy_node",
|
|
868
771
|
"thread",
|
|
869
772
|
"tool",
|
|
773
|
+
"tool_binding",
|
|
870
774
|
"tool_bundle",
|
|
871
775
|
"tool_call",
|
|
872
776
|
"tool_definition_version",
|
|
777
|
+
"tool_executor",
|
|
778
|
+
"tool_surface_defaults",
|
|
873
779
|
"tool_test_sample",
|
|
874
780
|
"tool_ui",
|
|
875
781
|
"tool_ui_incident",
|
|
@@ -877,14 +783,24 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
877
783
|
"transcript",
|
|
878
784
|
"udt_dataset_fields",
|
|
879
785
|
"udt_dataset_rows",
|
|
786
|
+
"udt_dataset_template",
|
|
880
787
|
"udt_document",
|
|
788
|
+
"udt_document_snapshot",
|
|
881
789
|
"udt_structured_list_items",
|
|
790
|
+
"udt_workbook_snapshot",
|
|
791
|
+
"ui_client",
|
|
882
792
|
"ui_surface_agent_pref",
|
|
793
|
+
"ui_surface_agent_role",
|
|
794
|
+
"ui_surface_client_tool",
|
|
883
795
|
"ui_surface_config",
|
|
796
|
+
"ui_surface_value",
|
|
797
|
+
"ui_surface_write_target",
|
|
884
798
|
"user_achievement",
|
|
799
|
+
"user_active_context",
|
|
885
800
|
"user_analysis_preference",
|
|
886
801
|
"user_bookmark",
|
|
887
802
|
"user_email_preference",
|
|
803
|
+
"user_entity_state",
|
|
888
804
|
"user_feedback",
|
|
889
805
|
"user_form_profile",
|
|
890
806
|
"user_markdown_sample",
|
|
@@ -892,14 +808,19 @@ var ENTITY_TYPE_TOKENS = [
|
|
|
892
808
|
"user_preference",
|
|
893
809
|
"user_profile",
|
|
894
810
|
"user_secret",
|
|
811
|
+
"user_secret_audit",
|
|
812
|
+
"user_secret_grant",
|
|
895
813
|
"user_stat",
|
|
814
|
+
"user_storage_usage",
|
|
896
815
|
"user_surface_state",
|
|
897
816
|
"voice",
|
|
898
817
|
"war_room",
|
|
899
818
|
"wbx_capture",
|
|
819
|
+
"wbx_demo",
|
|
900
820
|
"wbx_guidance",
|
|
901
821
|
"wbx_highlight",
|
|
902
822
|
"wbx_pattern",
|
|
823
|
+
"wbx_recipe",
|
|
903
824
|
"wbx_screenshot",
|
|
904
825
|
"wbx_seo_audit",
|
|
905
826
|
"wc_claim",
|
|
@@ -1010,7 +931,7 @@ function useAssociations(args) {
|
|
|
1010
931
|
() => store.getEdges(type, id ?? "")
|
|
1011
932
|
);
|
|
1012
933
|
const loadedKey = useRef2(null);
|
|
1013
|
-
|
|
934
|
+
useEffect(() => {
|
|
1014
935
|
if (!autoLoad || !type || !id) return;
|
|
1015
936
|
const k = associationsKey(type, id);
|
|
1016
937
|
if (loadedKey.current === k) return;
|
|
@@ -1066,7 +987,7 @@ var useEntityRelationships = useAssociations;
|
|
|
1066
987
|
// src/react/hooks/useContainerLinks.ts
|
|
1067
988
|
import {
|
|
1068
989
|
useCallback,
|
|
1069
|
-
useEffect as
|
|
990
|
+
useEffect as useEffect2,
|
|
1070
991
|
useLayoutEffect,
|
|
1071
992
|
useRef as useRef3,
|
|
1072
993
|
useState
|
|
@@ -1137,7 +1058,7 @@ function useContainerLinks(args) {
|
|
|
1137
1058
|
loading: false
|
|
1138
1059
|
});
|
|
1139
1060
|
}, [containerId, conversationKey, store]);
|
|
1140
|
-
|
|
1061
|
+
useEffect2(() => {
|
|
1141
1062
|
const timeout = setTimeout(() => {
|
|
1142
1063
|
void loadConversationFiles();
|
|
1143
1064
|
}, 0);
|
|
@@ -1246,7 +1167,7 @@ function useContainerLinks(args) {
|
|
|
1246
1167
|
}
|
|
1247
1168
|
|
|
1248
1169
|
// src/react/hooks/useEntityTitles.ts
|
|
1249
|
-
import { useEffect as
|
|
1170
|
+
import { useEffect as useEffect3, useState as useState2 } from "react";
|
|
1250
1171
|
function useEntityTitles(refs) {
|
|
1251
1172
|
const store = useAssociationsStore();
|
|
1252
1173
|
const [resolved, setResolved] = useState2({});
|
|
@@ -1256,7 +1177,7 @@ function useEntityTitles(refs) {
|
|
|
1256
1177
|
(r) => store.registry.tryGetEntityInfo(r.token)?.titleColumn != null && store.titles.get(r.token, r.id) == null && !attempted[entityTitleCacheKey(r.token, r.id)]
|
|
1257
1178
|
);
|
|
1258
1179
|
const neededKey = needed.map((r) => entityTitleCacheKey(r.token, r.id)).sort().join("|");
|
|
1259
|
-
|
|
1180
|
+
useEffect3(() => {
|
|
1260
1181
|
if (!neededKey) return;
|
|
1261
1182
|
let cancelled = false;
|
|
1262
1183
|
setLoading(true);
|
|
@@ -1320,7 +1241,7 @@ function useEntityTitles(refs) {
|
|
|
1320
1241
|
}
|
|
1321
1242
|
|
|
1322
1243
|
// src/react/hooks/useCategories.ts
|
|
1323
|
-
import { useEffect as
|
|
1244
|
+
import { useEffect as useEffect4, useRef as useRef4, useSyncExternalStore as useSyncExternalStore2 } from "react";
|
|
1324
1245
|
var noopSubscribe2 = () => () => {
|
|
1325
1246
|
};
|
|
1326
1247
|
function useCategories(args) {
|
|
@@ -1332,7 +1253,7 @@ function useCategories(args) {
|
|
|
1332
1253
|
() => store.getCategories(dimension ?? "")
|
|
1333
1254
|
);
|
|
1334
1255
|
const loadedKey = useRef4(null);
|
|
1335
|
-
|
|
1256
|
+
useEffect4(() => {
|
|
1336
1257
|
if (!autoLoad || !dimension) return;
|
|
1337
1258
|
if (loadedKey.current === dimension) return;
|
|
1338
1259
|
loadedKey.current = dimension;
|
|
@@ -1383,7 +1304,7 @@ function useCategories(args) {
|
|
|
1383
1304
|
}
|
|
1384
1305
|
|
|
1385
1306
|
// src/react/hooks/useUniversalEntitySearch.ts
|
|
1386
|
-
import { useEffect as
|
|
1307
|
+
import { useEffect as useEffect5, useRef as useRef5, useState as useState3 } from "react";
|
|
1387
1308
|
var DEBOUNCE_MS = 250;
|
|
1388
1309
|
var RECENTS_LIMIT = 12;
|
|
1389
1310
|
function useUniversalEntitySearch(args) {
|
|
@@ -1401,7 +1322,7 @@ function useUniversalEntitySearch(args) {
|
|
|
1401
1322
|
const [isRecents, setIsRecents] = useState3(true);
|
|
1402
1323
|
const runRef = useRef5(0);
|
|
1403
1324
|
const tokensKey = (tokens ?? []).join(",");
|
|
1404
|
-
|
|
1325
|
+
useEffect5(() => {
|
|
1405
1326
|
if (!enabled) return;
|
|
1406
1327
|
const run = ++runRef.current;
|
|
1407
1328
|
const trimmed = query.trim();
|
|
@@ -1466,7 +1387,7 @@ async function loadRecents(store, tokens) {
|
|
|
1466
1387
|
}
|
|
1467
1388
|
|
|
1468
1389
|
// src/react/hooks/useAssociationCandidates.ts
|
|
1469
|
-
import { useEffect as
|
|
1390
|
+
import { useEffect as useEffect6, useState as useState4 } from "react";
|
|
1470
1391
|
function useAssociationCandidates(args) {
|
|
1471
1392
|
const { token, enabled = true, search, limit } = args;
|
|
1472
1393
|
const store = useAssociationsStore();
|
|
@@ -1475,7 +1396,7 @@ function useAssociationCandidates(args) {
|
|
|
1475
1396
|
const [loading, setLoading] = useState4(false);
|
|
1476
1397
|
const [error, setError] = useState4(null);
|
|
1477
1398
|
const [tick, setTick] = useState4(0);
|
|
1478
|
-
|
|
1399
|
+
useEffect6(() => {
|
|
1479
1400
|
if (!enabled) return void 0;
|
|
1480
1401
|
let cancelled = false;
|
|
1481
1402
|
void (async () => {
|
|
@@ -1516,7 +1437,7 @@ function currentUserIdOrNull(store) {
|
|
|
1516
1437
|
}
|
|
1517
1438
|
|
|
1518
1439
|
// src/react/hooks/useComments.ts
|
|
1519
|
-
import { useEffect as
|
|
1440
|
+
import { useEffect as useEffect7, useRef as useRef6, useSyncExternalStore as useSyncExternalStore3 } from "react";
|
|
1520
1441
|
var noopSubscribe3 = () => () => {
|
|
1521
1442
|
};
|
|
1522
1443
|
function useComments(args) {
|
|
@@ -1529,7 +1450,7 @@ function useComments(args) {
|
|
|
1529
1450
|
() => store.getComments(token, id ?? "")
|
|
1530
1451
|
);
|
|
1531
1452
|
const loadedKey = useRef6(null);
|
|
1532
|
-
|
|
1453
|
+
useEffect7(() => {
|
|
1533
1454
|
if (!autoLoad || !key || !id) return;
|
|
1534
1455
|
if (loadedKey.current === key) return;
|
|
1535
1456
|
loadedKey.current = key;
|
|
@@ -1675,7 +1596,7 @@ import { useId } from "react";
|
|
|
1675
1596
|
// src/react/components/DefaultWindowShell.tsx
|
|
1676
1597
|
import {
|
|
1677
1598
|
useCallback as useCallback2,
|
|
1678
|
-
useEffect as
|
|
1599
|
+
useEffect as useEffect8,
|
|
1679
1600
|
useLayoutEffect as useLayoutEffect2,
|
|
1680
1601
|
useRef as useRef7,
|
|
1681
1602
|
useState as useState6
|
|
@@ -1880,7 +1801,7 @@ function DefaultWindowShell({
|
|
|
1880
1801
|
setIsMobile(window.innerWidth < MOBILE_MAX_WIDTH);
|
|
1881
1802
|
setRect(centred());
|
|
1882
1803
|
}, []);
|
|
1883
|
-
|
|
1804
|
+
useEffect8(() => {
|
|
1884
1805
|
if (!mounted) return;
|
|
1885
1806
|
const onResize = () => {
|
|
1886
1807
|
setIsMobile(window.innerWidth < MOBILE_MAX_WIDTH);
|
|
@@ -1889,14 +1810,14 @@ function DefaultWindowShell({
|
|
|
1889
1810
|
window.addEventListener("resize", onResize);
|
|
1890
1811
|
return () => window.removeEventListener("resize", onResize);
|
|
1891
1812
|
}, [mounted]);
|
|
1892
|
-
|
|
1813
|
+
useEffect8(() => {
|
|
1893
1814
|
const onKeyDown = (event) => {
|
|
1894
1815
|
if (event.key === "Escape") onClose();
|
|
1895
1816
|
};
|
|
1896
1817
|
window.addEventListener("keydown", onKeyDown);
|
|
1897
1818
|
return () => window.removeEventListener("keydown", onKeyDown);
|
|
1898
1819
|
}, [onClose]);
|
|
1899
|
-
|
|
1820
|
+
useEffect8(() => {
|
|
1900
1821
|
panelRef.current?.focus({ preventScroll: true });
|
|
1901
1822
|
}, [mounted]);
|
|
1902
1823
|
const beginGesture = useCallback2(
|
|
@@ -2689,7 +2610,7 @@ function UniversalAssociationPicker(props) {
|
|
|
2689
2610
|
}
|
|
2690
2611
|
|
|
2691
2612
|
// src/react/components/AttachedItemsSheet.tsx
|
|
2692
|
-
import { useEffect as
|
|
2613
|
+
import { useEffect as useEffect9, useState as useState9 } from "react";
|
|
2693
2614
|
import { cn as cn5 } from "@ai-matrx/design-system";
|
|
2694
2615
|
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2695
2616
|
function metadataIsPinned(metadata) {
|
|
@@ -2753,7 +2674,7 @@ function AttachedItemsBody({
|
|
|
2753
2674
|
const [titleError, setTitleError] = useState9(null);
|
|
2754
2675
|
const [busyId, setBusyId] = useState9(null);
|
|
2755
2676
|
const idKey = links.map((l) => l.resourceId).sort().join(",");
|
|
2756
|
-
|
|
2677
|
+
useEffect9(() => {
|
|
2757
2678
|
if (!enabled) return;
|
|
2758
2679
|
const ids = idKey ? idKey.split(",") : [];
|
|
2759
2680
|
if (ids.length === 0) {
|