@ai-matrx/associations 0.14.79 → 0.14.81

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,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ComponentType, ReactNode } from 'react';
3
- import { j as AssociationsNotifier, W as WindowShellPort, k as CapturePort, P as PickerOverrideMap, E as EntityDoorsPort, l as AuthorDisplayPort, m as AssociationsStore, n as CategoryMutationResult, o as CategoryDimension, p as PlatformCategory, q as CategoriesEntry, r as EntityTypeToken, s as UniversalCandidate, t as CandidateRecord, u as PlatformComment, v as CommentsEntry, w as CommentAnchor, x as CommentMutationResult, e as AssociationPickerProps, y as EntityDoorProps, z as EntityRefProps, B as ContentRole } from '../CommentThread-iSMK-0Lb.cjs';
4
- export { D as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, F as AssociationCard, G as AssociationCardGrid, b as AssociationCardGridProps, H as AssociationCardLook, a as AssociationCardProps, I as AssociationEntitySelect, J as AssociationEntitySelectAdapter, K as AssociationEntitySelectItem, c as AssociationEntitySelectProps, L as AssociationList, d as AssociationListProps, M as AssociationWindow, f as AssociationWindowProps, N as AssociationWriteResult, O as AttachedItemsSheet, g as AttachedItemsSheetProps, Q as CaptureAttach, R as CaptureAttachResult, S as CaptureToolbarAction, T as CategorySelect, C as CategorySelectProps, V as CategoryTagPicker, h as CategoryTagPickerProps, X as CommentComposer, Y as CommentComposerProps, Z as CommentThread, i as CommentThreadProps, _ as ContainerLink, $ as ContainerResourceRow, a0 as ContainerResourcesAdapter, a1 as DefaultEntityIcon, a2 as PostedComment, a3 as PrimaryContainerEntity, a4 as PrimaryEntity, a5 as PrimaryEntityProvider, a6 as PrimaryFiledEntity, a7 as TagPickerIcon, a8 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a9 as UseAssociationEntitySelectAdapterArgs, aa as UseAssociationsArgs, ab as UseAssociationsReturn, ac as UseContainerLinksArgs, ad as UseContainerLinksReturn, ae as attachedKey, af as buildCommentTree, ag as containerLinksArgs, ah as linkDirection, ai as useAssociationEntitySelectAdapter, aj as useAssociations, ak as useContainerLinks, al as useContainerLinksAdapter, am as useEntityRelationships, an as usePrimaryEntity } from '../CommentThread-iSMK-0Lb.cjs';
3
+ import { j as AssociationsNotifier, W as WindowShellPort, k as CapturePort, P as PickerOverrideMap, E as EntityDoorsPort, l as AuthorDisplayPort, m as AssociationsStore, n as CategoryMutationResult, o as CategoryDimension, p as PlatformCategory, q as CategoriesEntry, r as EntityTypeToken, s as UniversalCandidate, t as CandidateRecord, u as PlatformComment, v as CommentsEntry, w as CommentAnchor, x as CommentMutationResult, e as AssociationPickerProps, y as EntityDoorProps, z as EntityRefProps, B as ContentRole } from '../CommentThread-RI-iPDmV.cjs';
4
+ export { D as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, F as AssociationCard, G as AssociationCardGrid, b as AssociationCardGridProps, H as AssociationCardLook, a as AssociationCardProps, I as AssociationEntitySelect, J as AssociationEntitySelectAdapter, K as AssociationEntitySelectItem, c as AssociationEntitySelectProps, L as AssociationList, d as AssociationListProps, M as AssociationWindow, f as AssociationWindowProps, N as AssociationWriteResult, O as AttachedItemsSheet, g as AttachedItemsSheetProps, Q as CaptureAttach, R as CaptureAttachResult, S as CaptureToolbarAction, T as CategorySelect, C as CategorySelectProps, V as CategoryTagPicker, h as CategoryTagPickerProps, X as CommentComposer, Y as CommentComposerProps, Z as CommentThread, i as CommentThreadProps, _ as ContainerLink, $ as ContainerResourceRow, a0 as ContainerResourcesAdapter, a1 as DefaultEntityIcon, a2 as PostedComment, a3 as PrimaryContainerEntity, a4 as PrimaryEntity, a5 as PrimaryEntityProvider, a6 as PrimaryFiledEntity, a7 as TagPickerIcon, a8 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a9 as UseAssociationEntitySelectAdapterArgs, aa as UseAssociationsArgs, ab as UseAssociationsReturn, ac as UseContainerLinksArgs, ad as UseContainerLinksReturn, ae as attachedKey, af as buildCommentTree, ag as containerLinksArgs, ah as linkDirection, ai as useAssociationEntitySelectAdapter, aj as useAssociations, ak as useContainerLinks, al as useContainerLinksAdapter, am as useEntityRelationships, an as usePrimaryEntity } from '../CommentThread-RI-iPDmV.cjs';
5
5
  import '@ai-matrx/data/db';
6
6
 
7
7
  interface AssociationsUiPorts {
@@ -19,13 +19,19 @@ interface AssociationsUiPorts {
19
19
  body: string;
20
20
  className?: string | undefined;
21
21
  }>;
22
+ /**
23
+ * Sign in again (a signed-out tab). Shown as the action beside a signed-out
24
+ * failure; absent → the sentence alone, with Retry. The host opens its login
25
+ * in a NEW tab so the words typed here stay for Retry.
26
+ */
27
+ signIn?: () => void;
22
28
  }
23
29
  interface AssociationsProviderProps extends AssociationsUiPorts {
24
30
  /** The /core store the host constructed with `createAssociationsStore`. */
25
31
  store: AssociationsStore;
26
32
  children: ReactNode;
27
33
  }
28
- declare function AssociationsProvider({ store, notifier, windowShell, capture, pickerOverrides, entityDoors, authorDisplay, commentBody, children, }: AssociationsProviderProps): react.JSX.Element;
34
+ declare function AssociationsProvider({ store, notifier, windowShell, capture, pickerOverrides, entityDoors, authorDisplay, commentBody, signIn, children, }: AssociationsProviderProps): react.JSX.Element;
29
35
  /** The /core store bound by the nearest provider. Throws when unmounted. */
30
36
  declare function useAssociationsStore(): AssociationsStore;
31
37
  /** The UI ports the host bound (each optional, each degradable). */
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ComponentType, ReactNode } from 'react';
3
- import { j as AssociationsNotifier, W as WindowShellPort, k as CapturePort, P as PickerOverrideMap, E as EntityDoorsPort, l as AuthorDisplayPort, m as AssociationsStore, n as CategoryMutationResult, o as CategoryDimension, p as PlatformCategory, q as CategoriesEntry, r as EntityTypeToken, s as UniversalCandidate, t as CandidateRecord, u as PlatformComment, v as CommentsEntry, w as CommentAnchor, x as CommentMutationResult, e as AssociationPickerProps, y as EntityDoorProps, z as EntityRefProps, B as ContentRole } from '../CommentThread-iSMK-0Lb.js';
4
- export { D as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, F as AssociationCard, G as AssociationCardGrid, b as AssociationCardGridProps, H as AssociationCardLook, a as AssociationCardProps, I as AssociationEntitySelect, J as AssociationEntitySelectAdapter, K as AssociationEntitySelectItem, c as AssociationEntitySelectProps, L as AssociationList, d as AssociationListProps, M as AssociationWindow, f as AssociationWindowProps, N as AssociationWriteResult, O as AttachedItemsSheet, g as AttachedItemsSheetProps, Q as CaptureAttach, R as CaptureAttachResult, S as CaptureToolbarAction, T as CategorySelect, C as CategorySelectProps, V as CategoryTagPicker, h as CategoryTagPickerProps, X as CommentComposer, Y as CommentComposerProps, Z as CommentThread, i as CommentThreadProps, _ as ContainerLink, $ as ContainerResourceRow, a0 as ContainerResourcesAdapter, a1 as DefaultEntityIcon, a2 as PostedComment, a3 as PrimaryContainerEntity, a4 as PrimaryEntity, a5 as PrimaryEntityProvider, a6 as PrimaryFiledEntity, a7 as TagPickerIcon, a8 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a9 as UseAssociationEntitySelectAdapterArgs, aa as UseAssociationsArgs, ab as UseAssociationsReturn, ac as UseContainerLinksArgs, ad as UseContainerLinksReturn, ae as attachedKey, af as buildCommentTree, ag as containerLinksArgs, ah as linkDirection, ai as useAssociationEntitySelectAdapter, aj as useAssociations, ak as useContainerLinks, al as useContainerLinksAdapter, am as useEntityRelationships, an as usePrimaryEntity } from '../CommentThread-iSMK-0Lb.js';
3
+ import { j as AssociationsNotifier, W as WindowShellPort, k as CapturePort, P as PickerOverrideMap, E as EntityDoorsPort, l as AuthorDisplayPort, m as AssociationsStore, n as CategoryMutationResult, o as CategoryDimension, p as PlatformCategory, q as CategoriesEntry, r as EntityTypeToken, s as UniversalCandidate, t as CandidateRecord, u as PlatformComment, v as CommentsEntry, w as CommentAnchor, x as CommentMutationResult, e as AssociationPickerProps, y as EntityDoorProps, z as EntityRefProps, B as ContentRole } from '../CommentThread-RI-iPDmV.js';
4
+ export { D as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, F as AssociationCard, G as AssociationCardGrid, b as AssociationCardGridProps, H as AssociationCardLook, a as AssociationCardProps, I as AssociationEntitySelect, J as AssociationEntitySelectAdapter, K as AssociationEntitySelectItem, c as AssociationEntitySelectProps, L as AssociationList, d as AssociationListProps, M as AssociationWindow, f as AssociationWindowProps, N as AssociationWriteResult, O as AttachedItemsSheet, g as AttachedItemsSheetProps, Q as CaptureAttach, R as CaptureAttachResult, S as CaptureToolbarAction, T as CategorySelect, C as CategorySelectProps, V as CategoryTagPicker, h as CategoryTagPickerProps, X as CommentComposer, Y as CommentComposerProps, Z as CommentThread, i as CommentThreadProps, _ as ContainerLink, $ as ContainerResourceRow, a0 as ContainerResourcesAdapter, a1 as DefaultEntityIcon, a2 as PostedComment, a3 as PrimaryContainerEntity, a4 as PrimaryEntity, a5 as PrimaryEntityProvider, a6 as PrimaryFiledEntity, a7 as TagPickerIcon, a8 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a9 as UseAssociationEntitySelectAdapterArgs, aa as UseAssociationsArgs, ab as UseAssociationsReturn, ac as UseContainerLinksArgs, ad as UseContainerLinksReturn, ae as attachedKey, af as buildCommentTree, ag as containerLinksArgs, ah as linkDirection, ai as useAssociationEntitySelectAdapter, aj as useAssociations, ak as useContainerLinks, al as useContainerLinksAdapter, am as useEntityRelationships, an as usePrimaryEntity } from '../CommentThread-RI-iPDmV.js';
5
5
  import '@ai-matrx/data/db';
6
6
 
7
7
  interface AssociationsUiPorts {
@@ -19,13 +19,19 @@ interface AssociationsUiPorts {
19
19
  body: string;
20
20
  className?: string | undefined;
21
21
  }>;
22
+ /**
23
+ * Sign in again (a signed-out tab). Shown as the action beside a signed-out
24
+ * failure; absent → the sentence alone, with Retry. The host opens its login
25
+ * in a NEW tab so the words typed here stay for Retry.
26
+ */
27
+ signIn?: () => void;
22
28
  }
23
29
  interface AssociationsProviderProps extends AssociationsUiPorts {
24
30
  /** The /core store the host constructed with `createAssociationsStore`. */
25
31
  store: AssociationsStore;
26
32
  children: ReactNode;
27
33
  }
28
- declare function AssociationsProvider({ store, notifier, windowShell, capture, pickerOverrides, entityDoors, authorDisplay, commentBody, children, }: AssociationsProviderProps): react.JSX.Element;
34
+ declare function AssociationsProvider({ store, notifier, windowShell, capture, pickerOverrides, entityDoors, authorDisplay, commentBody, signIn, children, }: AssociationsProviderProps): react.JSX.Element;
29
35
  /** The /core store bound by the nearest provider. Throws when unmounted. */
30
36
  declare function useAssociationsStore(): AssociationsStore;
31
37
  /** The UI ports the host bound (each optional, each degradable). */
@@ -26,6 +26,7 @@ function AssociationsProvider({
26
26
  entityDoors,
27
27
  authorDisplay,
28
28
  commentBody,
29
+ signIn,
29
30
  children
30
31
  }) {
31
32
  const notifierWarned = useRef(false);
@@ -41,7 +42,8 @@ function AssociationsProvider({
41
42
  ...pickerOverrides !== void 0 ? { pickerOverrides } : {},
42
43
  ...entityDoors !== void 0 ? { entityDoors } : {},
43
44
  ...authorDisplay !== void 0 ? { authorDisplay } : {},
44
- ...commentBody !== void 0 ? { commentBody } : {}
45
+ ...commentBody !== void 0 ? { commentBody } : {},
46
+ ...signIn !== void 0 ? { signIn } : {}
45
47
  },
46
48
  children
47
49
  }
@@ -436,6 +438,7 @@ var ENTITY_TYPE_TOKENS = [
436
438
  "cx_pending_injection",
437
439
  "cx_request",
438
440
  "cx_request_snapshot",
441
+ "cx_request_values",
439
442
  "cx_tool_trace",
440
443
  "cx_user_request",
441
444
  "cx_user_todo",
@@ -951,6 +954,8 @@ var ENTITY_TYPE_TOKENS = [
951
954
  "recompute_queue",
952
955
  "record",
953
956
  "record_alias",
957
+ "record_computed",
958
+ "record_follow",
954
959
  "redaction_mapping",
955
960
  "relationship_rule",
956
961
  "research_analysis",
@@ -1310,6 +1315,7 @@ var ENTITY_TYPE_TOKENS = [
1310
1315
  "workflow_checkpoint",
1311
1316
  "workflow_checkpoint_value",
1312
1317
  "workflow_comparison",
1318
+ "workflow_definition_overview",
1313
1319
  "workflow_definition_version",
1314
1320
  "workflow_idempotency",
1315
1321
  "workflow_job",
@@ -1339,6 +1345,14 @@ function isEntityTypeToken(value) {
1339
1345
  return typeof value === "string" && ENTITY_TYPE_TOKEN_SET.has(value);
1340
1346
  }
1341
1347
 
1348
+ // src/core/rpcResult.ts
1349
+ import { isTransportFailure } from "@ai-matrx/api/net";
1350
+ var SIGNED_OUT_LEAD = "You're signed out";
1351
+ var SIGNED_OUT_MESSAGE = `${SIGNED_OUT_LEAD}. Sign in again \u2014 your text is kept here.`;
1352
+ function isSignedOutMessage(text) {
1353
+ return typeof text === "string" && text.startsWith(SIGNED_OUT_LEAD);
1354
+ }
1355
+
1342
1356
  // src/association-types.generated.ts
1343
1357
  var ASSOCIATION_PAIRS = /* @__PURE__ */ new Set([
1344
1358
  "agent>agent",
@@ -6276,6 +6290,7 @@ function CommentComposer({
6276
6290
  autoFocus = false
6277
6291
  }) {
6278
6292
  const notifier = useNotifier();
6293
+ const { signIn } = useAssociationsUiPorts();
6279
6294
  const [body, setBody] = useState16(initialValue);
6280
6295
  const [submitting, setSubmitting] = useState16(false);
6281
6296
  const [error, setError] = useState16(null);
@@ -6321,6 +6336,7 @@ function CommentComposer({
6321
6336
  origin: "associations/CommentThread"
6322
6337
  }
6323
6338
  ),
6339
+ error && signIn && isSignedOutMessage(error) && /* @__PURE__ */ jsx20(SignInAgain, { onClick: signIn }),
6324
6340
  /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
6325
6341
  /* @__PURE__ */ jsxs16(Button4, { type: "submit", size: "sm", disabled: !body.trim() || submitting, children: [
6326
6342
  submitting && /* @__PURE__ */ jsx20(SpinnerIcon, { className: "mr-1 h-3 w-3 animate-spin" }),
@@ -6566,6 +6582,7 @@ function CommentThread({
6566
6582
  className
6567
6583
  }) {
6568
6584
  const thread = useComments({ token, id });
6585
+ const { signIn: signInPort } = useAssociationsUiPorts();
6569
6586
  const tree = buildCommentTree(thread.comments);
6570
6587
  const { childrenOf } = tree;
6571
6588
  const roots = part ? tree.roots.filter((c) => partKeyOf(c) === part.key) : tree.roots;
@@ -6597,6 +6614,7 @@ function CommentThread({
6597
6614
  origin: "associations/CommentThread",
6598
6615
  children: [
6599
6616
  /* @__PURE__ */ jsx20("span", { className: "min-w-0 flex-1", children: thread.error }),
6617
+ signInPort && isSignedOutMessage(thread.error) && /* @__PURE__ */ jsx20(SignInAgain, { onClick: signInPort }),
6600
6618
  /* @__PURE__ */ jsx20(
6601
6619
  Button4,
6602
6620
  {
@@ -6640,6 +6658,9 @@ function CommentThread({
6640
6658
  )
6641
6659
  ] });
6642
6660
  }
6661
+ function SignInAgain({ onClick }) {
6662
+ return /* @__PURE__ */ jsx20(Button4, { type: "button", size: "sm", variant: "outline", onClick, children: "Sign in" });
6663
+ }
6643
6664
  export {
6644
6665
  AssociationCandidateBody,
6645
6666
  AssociationCaptureToolbar,