@ai-matrx/records-ui 0.65.0 → 0.66.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.
package/dist/index.d.cts CHANGED
@@ -108,6 +108,12 @@ interface RecordChatContext {
108
108
  /** The whole door answer, for a host that wants the history or the relations. */
109
109
  scope: RecordScopeContext;
110
110
  }
111
+ /**
112
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `chat` on
113
+ * `<RecordsUiProvider>` with the host's own chat surface — in AI Matrx that is
114
+ * `AgentConversationColumn`, launched through a Mandate. This package
115
+ * deliberately ships no second chat UI.
116
+ */
111
117
  declare const NO_CHAT_REASON: string;
112
118
  interface RecordChatProps {
113
119
  tableId: Uuid;
@@ -138,6 +144,12 @@ interface EnrichOutcome {
138
144
  says?: string;
139
145
  }>;
140
146
  }
147
+ /**
148
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `enrich` on
149
+ * `<RecordsUiProvider>` with a call to the server's own `records` tool (action
150
+ * `enrich_propose`). Only the server may write a value as an agent — a browser
151
+ * stamping itself `agent` would be a browser claiming to be one.
152
+ */
141
153
  declare const NO_ENRICH_REASON: string;
142
154
  /** Which of the four things this cell is. One place, so nothing can disagree. */
143
155
  declare function cellState(cell: EnrichCell | undefined): "none" | "agent" | "yours" | "unsure";
@@ -487,17 +499,52 @@ interface PendingCapture {
487
499
  attempts: number;
488
500
  lastRefusal?: string | null;
489
501
  }
490
- /** The sentence the notify editor shows when no saved-view port is bound. */
502
+ /**
503
+ * The sentence the notify editor shows when no saved-view port is bound.
504
+ *
505
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `savedViews` on
506
+ * `<RecordsUiProvider>` with the host's own list of `platform.saved_view` rows —
507
+ * the record store has no door onto them — and the picker appears.
508
+ */
491
509
  declare const NO_SAVED_VIEWS_REASON: string;
492
- /** The sentence a person question shows when no membership port is bound. */
510
+ /**
511
+ * The sentence a person question shows when no membership port is bound.
512
+ *
513
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `members` on
514
+ * `<RecordsUiProvider>` with the host's own roster. Who is in an organization is
515
+ * the platform's answer, not the record store's, so this package will not guess.
516
+ */
493
517
  declare const NO_MEMBERS_REASON: string;
494
- /** The sentence shown when no share dialog is bound. */
518
+ /**
519
+ * The sentence shown when no share dialog is bound.
520
+ *
521
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `share` on
522
+ * `<RecordsUiProvider>` with the app's own sharing dialog. AI Matrx has exactly
523
+ * one, and this package deliberately does not ship a second.
524
+ */
495
525
  declare const NO_SHARE_REASON: string;
496
- /** The sentence a canvas shows when nothing is bound to open the records behind a number. */
526
+ /**
527
+ * The sentence a canvas shows when nothing is bound to open the records behind a number.
528
+ *
529
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `openRecords` on
530
+ * `<RecordsUiProvider>`. Where this app puts its grid is the host's routing, not
531
+ * this package's, so it will not guess an address.
532
+ */
497
533
  declare const NO_OPEN_RECORDS_REASON: string;
498
- /** The sentence the re-ask box shows when no agent is bound. */
534
+ /**
535
+ * The sentence the re-ask box shows when no agent is bound.
536
+ *
537
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `onReask` on
538
+ * `<RecordsUiProvider>`; it drives `dashboard_propose` on the server's `records`
539
+ * tool with this dashboard's id. Only the server can honestly speak as an agent.
540
+ */
499
541
  declare const NO_REASK_REASON: string;
500
- /** The sentence an attachment question shows when no file store is bound. */
542
+ /**
543
+ * The sentence an attachment question shows when no file store is bound.
544
+ *
545
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `upload` on
546
+ * `<RecordsUiProvider>` with the host's file service and the chooser appears.
547
+ */
501
548
  declare const NO_UPLOAD_REASON: string;
502
549
  declare function RecordsUiProvider({ value, children }: {
503
550
  value: RecordsUiHost;
@@ -549,6 +596,28 @@ declare function isMachineIdentity(text: string): boolean;
549
596
  * the suite to say WHAT it found rather than only that it found something.
550
597
  */
551
598
  declare function machineIdentityIn(text: string): string[];
599
+ /**
600
+ * 🚨 A HINT THIS PACKAGE OR ITS CLIENT WROTE IS NOT A PERSON'S REMEDY.
601
+ *
602
+ * `refusalForAPerson` prefers the DOOR's own hint over the table above, because
603
+ * the door that refused knows more about the way out than a code does. That is
604
+ * right — but it assumed every hint came from the store. It did not: until
605
+ * `@ai-matrx/records` 0.47.0 the client appended its OWN note to `hint` when it
606
+ * met a SQLSTATE it did not know, and the machine-identity filter let it
607
+ * through whenever the code was not exactly five characters (an empty code from
608
+ * a dropped connection, or an HTTP status like `404`). So the Checklists tab of
609
+ * a plumbing company's jobs table told its owner:
610
+ *
611
+ * @ai-matrx/records did not recognise SQLSTATE from checklistTemplates
612
+ *
613
+ * The client no longer writes there. This is the guard on the other side, by
614
+ * SHAPE and not by that one sentence: a hint that talks about a package, a
615
+ * SQLSTATE, or a `camelCaseDoor` is engineer text wherever it came from, and it
616
+ * joins the engineer's line instead of a person's screen.
617
+ */
618
+ declare const ENGINEER_TEXT: RegExp[];
619
+ /** Whether this sentence was written for whoever maintains the code. */
620
+ declare function isEngineerText(text: string): boolean;
552
621
  /** The one shape every screen in this package renders a refusal from. */
553
622
  interface PlainRefusal {
554
623
  /** The heading. Never the store's code. */
@@ -2553,6 +2622,11 @@ declare function nextInWords(page: Pick<BookingSummary, "next_at" | "timezone" |
2553
2622
  /** The three things a phone captures. Each one writes the SAME kind of record. */
2554
2623
  declare const CAPTURE_MODES: readonly ["reading", "photo", "voice"];
2555
2624
  type CaptureMode = (typeof CAPTURE_MODES)[number];
2625
+ /**
2626
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `captureQueue` on
2627
+ * `<RecordsUiProvider>` with the host's own durable store — IndexedDB in a
2628
+ * browser — and a queued capture survives the tab, the reload and the flight.
2629
+ */
2556
2630
  declare const IN_MEMORY_QUEUE_REASON: string;
2557
2631
  interface CaptureSheetProps {
2558
2632
  /**
@@ -2799,6 +2873,31 @@ interface TablePageProps {
2799
2873
  * copy it out of the address bar afterwards.
2800
2874
  */
2801
2875
  onViewChanged?: ((view: PageView) => void) | undefined;
2876
+ /**
2877
+ * WHICH FIELD THE ADDRESS WANTS THE BOARD'S COLUMNS TO BE, for this visit.
2878
+ *
2879
+ * 🚨 THIS IS HOW A DASHBOARD NUMBER CLICKS THROUGH (lane TAILS-6, 2026-09-22).
2880
+ * Until today the canvas told the owner of the business to "bind `openRecords`
2881
+ * on <RecordsUiProvider>" — a developer's sentence on a customer's screen —
2882
+ * because nothing in this app routed a bar or a slice anywhere. The store has
2883
+ * no door that returns the ROWS behind an aggregate filter, so a click cannot
2884
+ * honestly promise a narrowed list; what it CAN do is open this table's board
2885
+ * with its columns set to the very field the chart grouped by, where the
2886
+ * column the person clicked is right there and every card in it is real.
2887
+ *
2888
+ * It overrides the saved view's own `groupField` for this visit only, exactly
2889
+ * as `activeView` overrides its layout, and it is never written back.
2890
+ */
2891
+ activeGroupField?: string | null | undefined;
2892
+ /**
2893
+ * WHAT THE PERSON CLICKED TO GET HERE — "Jobs by stage · Awaiting parts".
2894
+ *
2895
+ * Present, the board says where they came from AND says plainly that it is
2896
+ * showing every record grouped by that field rather than only the ones the
2897
+ * number counted. A screen that quietly showed more rows than the number
2898
+ * promised would be the number lying twice.
2899
+ */
2900
+ cameFrom?: string | null | undefined;
2802
2901
  className?: string | undefined;
2803
2902
  }
2804
2903
  /**
@@ -2817,6 +2916,16 @@ interface TablePageProps {
2817
2916
  * whether the table exists: this person cannot see it, and which of the two it
2818
2917
  * is is not theirs to learn.
2819
2918
  */
2919
+ /**
2920
+ * WHAT THE BOARD SAYS TO SOMEBODY A DASHBOARD NUMBER SENT HERE.
2921
+ *
2922
+ * It says two things and neither is optional: which number they clicked, and
2923
+ * that this is every record grouped by that field rather than only the ones the
2924
+ * number counted. The store has no door that returns the rows behind an
2925
+ * aggregate filter, so claiming a narrowed list would be a lie — and showing a
2926
+ * wider one silently would be the same lie with nobody told.
2927
+ */
2928
+ declare function cameFromLine(label: string, groupField: string | null): string;
2820
2929
  declare const TABLE_NOT_REACHABLE: string;
2821
2930
  /**
2822
2931
  * THE VIEW EVERY TABLE HAS, AND WHY IT IS NOT OPTIONAL.
@@ -2925,7 +3034,7 @@ declare function openingView(activeView: string | null | undefined, activeDashbo
2925
3034
  layout: ViewLayout | null;
2926
3035
  unknown: string | null;
2927
3036
  };
2928
- declare function TablePage({ tableId, pageSize, seedViews, onLeave, leaveLabel, activeDashboardId, activeRecordId, activeView, onViewChanged, className, }: TablePageProps): react.JSX.Element;
3037
+ declare function TablePage({ tableId, pageSize, seedViews, onLeave, leaveLabel, activeDashboardId, activeRecordId, activeView, onViewChanged, activeGroupField, cameFrom, className, }: TablePageProps): react.JSX.Element;
2929
3038
 
2930
3039
  /** What the roster can tell us about a user id. `null` when it cannot. */
2931
3040
  type ResolveName = (userId: Uuid$1) => string | null;
@@ -3103,4 +3212,4 @@ interface PipelineBoardProps {
3103
3212
  }
3104
3213
  declare function PipelineBoard({ tableId, rows, measure, onMeasureChange, onOpenRecord, onMoved, className, }: PipelineBoardProps): react.JSX.Element;
3105
3214
 
3106
- export { ABSENCE_WORD_LABEL, ABSENCE_WORD_VALUES, ACTION_KINDS, type AbsenceWord, ActionInbox, type ActionInboxProps, type ActionKind, type AgentBuildAsk, BOOKING_PAGE_STATE_LABEL, BOOKING_PAGE_STATE_VALUES, BookingBuilder, type BookingBuilderProps, type BookingPageState, BookingSlots, type BookingSlotsProps, BuildOrAsk, type BuildOrAskProps, type BuildableKind, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CHECKLIST_REQUIREMENT_KINDS, CHECKLIST_REQUIREMENT_LABEL, CONDITION_OPS, CONTEXT_POLICY_LABEL, type Capability, type CaptureMode, type CaptureQueuePort, CaptureRun, type CaptureRunProps, CaptureSheet, type CaptureSheetProps, type CellAddress, type CellRefusal, type CellState, ChartBlock, type ChartBlockProps, type ChartConfig, ChartFrame, type ChartKind, ChartLegendContent, type ChartSpec, ChartTooltipContent, ChecklistRunner, type ChecklistRunnerProps, ChecklistTemplateEditor, ChecklistsPanel, type ChecklistsPanelProps, CommentThread, type CommentThreadProps, type ConditionField, ConditionGroup, type ConditionGroupProps, ConditionRow, type ConditionRowProps, CustomFieldsSection, type CustomFieldsSectionProps, DEFAULT_FIELDS, DEFAULT_VIEW_NAME, DUE_STATE_LABEL, DashboardCanvas, type DashboardCanvasProps, type DeclareResult, DigestScheduler, type DigestSchedulerProps, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, EMPTY_PRESENTATION, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, EnrichBadge, type EnrichBadgeProps, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, ExportMenu, type ExportMenuProps, FIELD_RULE_KIND_LABEL, FIELD_RULE_KIND_VALUES, FIELD_SENSITIVITY_LABEL, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FORMULA_OP_JOINS, FORMULA_OP_LABEL, FORMULA_OP_VALUES, FORM_FLOWS, FROZEN_COLUMN_WIDTH, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldHistoryPanel, type FieldHistoryPanelProps, FieldLabel, type FieldProposalRow, type FieldRuleKindValue, type FieldTypeChoice, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormSubmitOutcome, type FormTheme, FormsPanel, type FormsPanelProps, type FormulaOp, Grid, GridCell, type GridEditing, type GridGrouping, type GridPresentation, type GridProps, HistoryPanel, type HistoryPanelProps, IN_MEMORY_QUEUE_REASON, ImportWizard, type ImportWizardProps, KERNEL_REASON, LANE_EMPTY, LANE_TITLE, LAYOUT_FIELD_KIND, LAYOUT_LABEL, LAYOUT_NEEDS, LAYOUT_NO_FIELD, LEVEL_WORD, type LabelLookup, MACHINE_IDENTITY, MAX_ROW_HEIGHT, MIN_ROW_HEIGHT, type MainView, MyChecklistSteps, NEEDS_A_SENTENCE, NOT_ANSWERED_YET, NOT_DRAWN_HERE, NO_AGENT_PORT, NO_CHAT_REASON, NO_COLUMNS_WHY, NO_COLUMNS_YET, NO_ENRICH_REASON, NO_MEMBERS_REASON, NO_OPEN_RECORDS_REASON, NO_REASK_REASON, NO_RIGHTS, NO_RULES_YET, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, type NewFieldSpec, type NewTableSpec, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OpenRecordsAsk, type OrganizationMember, PAGE_VIEWS, PAGE_VIEW_LABEL, PARITY_LABEL, PARITY_MADE_OF, PROPOSED_CHANGE_ACT_LABEL, PROPOSED_CHANGE_ACT_VALUES, type PageView, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, PipelineBoard, type PipelineBoardProps, type PlainFieldType, type PlainRefusal, type PortalAnswer, PortalBuilder, type PortalBuilderProps, PortalCardView, type PortalCardViewProps, PortalShell, type PortalShellProps, PortalsPanel, type PortalsPanelProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, type ProposedChangeAct, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, ROLLUP_AGG_LABEL, ROLLUP_AGG_VALUES, type ReaskContext, RecordChat, type RecordChatContext, type RecordChatEntry, type RecordChatProps, type RecordChatWithheld, RecordChip, RecordForm, type RecordFormProps, RecordLabelProvider, RecordValue, RecordsMount, type RecordsMountProps, type RecordsUiHost, RecordsUiProvider, ReferenceBuilder, type ReferenceBuilderProps, type ReferenceChoice, RefusalLine, RefusalNotice, type RelationFieldType, RelationPicker, type RelationPickerProps, type ResolveName, type RollupAgg, SAVED_VIEWS_UNAVAILABLE, SAY_WHAT_YOU_ARE_WAITING_FOR_AFTER_MS, SERIES_COLORS, SOMEBODY, STAGE_RULE_ON_FAIL_LABEL, STORE_ANSWERS_THESE, STORE_DECIDES_REASON, SUBSCRIPTION_CADENCES, SUBSCRIPTION_CADENCE_LABEL, SUBSCRIPTION_CHANNEL_LABEL, SUBSCRIPTION_CHANNEL_VALUES, type SavedDashboard, type SavedForm, type SavedView, type SavedViewSpec, ShareControl, type ShareControlProps, type ShareSubject, SignBlock, type SignBlockProps, StageRulesSection, type StageRulesSectionProps, StepRow, type SubscriptionChannel, SubscriptionsPanel, type SubscriptionsPanelProps, type Surface, type SurfacePress, type SystemFieldSpec, type SystemTableSpec, TABLE_LANES, TABLE_NOT_REACHABLE, THE_SYSTEM, type TableLane, TablePage, type TablePageProps, type TableRights, TableSettings, type TableSettingsProps, TablesHome, type TablesHomeProps, type TrackedVersion, type UseSystemTableState, VIEW_LAYOUTS, VIEW_NOT_SAVED_YET, VIEW_TABLE, ViewBar, type ViewBarProps, type ViewLayout, type ViewSort, ViewSwitcher, type ViewSwitcherProps, WITHHELD_RECORD_LABEL, WORK_DUE_STATES, WORK_INBOX_KINDS, WORK_INBOX_KIND_LABEL, type WhatYouMayDo, type WhoChanged, WhoChangedSource, actorBadge, actorWords, addFields, askableFields, blockFromSpec, bodyForReading, bodyFromKeys, cellState, chooseSurface, colorFromTheValue, columnForField, conditionInWords, conditionIsDrawable, conditionIsSimple, conditionValue, controlFor, currencyCodeFor, dashboardDeclareArgs, dashboardFromSummary, declareTable, editorKindFor, ensureSystemTable, envelopeFor, fieldDeclarationFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, formDeclareArgs, formFromSummary, formPresentation, formatForField, groupLabel, hintForAPerson, hintIsMachineIdentity, humanize, idsOf, isId, isMachineIdentity, isPlainFieldType, isRelationFieldType, isSignatureField, keyFor, laneFor, lastChangeSentence, looksLikeId, machineIdentityIn, memberName, nextInWords, openingRail, openingView, pageViewFromParam, parityTypesWithNoExplanation, parseGridPresentation, personActor, personRecordForMember, pointsAtRecords, presentationDocument, presentationIsEmpty, previewLine, previewWords, publiclyAnswerable, recordName, recordNameIn, recordsDataSource, refusalForAPerson, refusalLineForAPerson, renderValue, revokeConsequence, rowName, rowNameIn, scalarText, shareUnavailableReason, specFromBlock, storeDecidesRights, submissionStamp, surfaceChosen, tableName, tableRightsAt, tokenFor, unknownViewLine, useCanShare, useEmbedHandshake, useEnrichCells, useGridEditing, useLabelWait, useMeasuredWidth, useMyChecklistSteps, useRecordLabels, useRecordRights, useRecordsUi, useRowRights, useSystemTable, useTableRights, useViewRecords, useWhoChanged, viewDocument, viewFromRecord, viewPatchDocument, whatIsMissing, whatYouMayDo, whatYouMayDoWithTable, whenWords, whyNotAskable };
3215
+ export { ABSENCE_WORD_LABEL, ABSENCE_WORD_VALUES, ACTION_KINDS, type AbsenceWord, ActionInbox, type ActionInboxProps, type ActionKind, type AgentBuildAsk, BOOKING_PAGE_STATE_LABEL, BOOKING_PAGE_STATE_VALUES, BookingBuilder, type BookingBuilderProps, type BookingPageState, BookingSlots, type BookingSlotsProps, BuildOrAsk, type BuildOrAskProps, type BuildableKind, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CHECKLIST_REQUIREMENT_KINDS, CHECKLIST_REQUIREMENT_LABEL, CONDITION_OPS, CONTEXT_POLICY_LABEL, type Capability, type CaptureMode, type CaptureQueuePort, CaptureRun, type CaptureRunProps, CaptureSheet, type CaptureSheetProps, type CellAddress, type CellRefusal, type CellState, ChartBlock, type ChartBlockProps, type ChartConfig, ChartFrame, type ChartKind, ChartLegendContent, type ChartSpec, ChartTooltipContent, ChecklistRunner, type ChecklistRunnerProps, ChecklistTemplateEditor, ChecklistsPanel, type ChecklistsPanelProps, CommentThread, type CommentThreadProps, type ConditionField, ConditionGroup, type ConditionGroupProps, ConditionRow, type ConditionRowProps, CustomFieldsSection, type CustomFieldsSectionProps, DEFAULT_FIELDS, DEFAULT_VIEW_NAME, DUE_STATE_LABEL, DashboardCanvas, type DashboardCanvasProps, type DeclareResult, DigestScheduler, type DigestSchedulerProps, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, EMPTY_PRESENTATION, ENGINEER_TEXT, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, EnrichBadge, type EnrichBadgeProps, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, ExportMenu, type ExportMenuProps, FIELD_RULE_KIND_LABEL, FIELD_RULE_KIND_VALUES, FIELD_SENSITIVITY_LABEL, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FORMULA_OP_JOINS, FORMULA_OP_LABEL, FORMULA_OP_VALUES, FORM_FLOWS, FROZEN_COLUMN_WIDTH, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldHistoryPanel, type FieldHistoryPanelProps, FieldLabel, type FieldProposalRow, type FieldRuleKindValue, type FieldTypeChoice, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormSubmitOutcome, type FormTheme, FormsPanel, type FormsPanelProps, type FormulaOp, Grid, GridCell, type GridEditing, type GridGrouping, type GridPresentation, type GridProps, HistoryPanel, type HistoryPanelProps, IN_MEMORY_QUEUE_REASON, ImportWizard, type ImportWizardProps, KERNEL_REASON, LANE_EMPTY, LANE_TITLE, LAYOUT_FIELD_KIND, LAYOUT_LABEL, LAYOUT_NEEDS, LAYOUT_NO_FIELD, LEVEL_WORD, type LabelLookup, MACHINE_IDENTITY, MAX_ROW_HEIGHT, MIN_ROW_HEIGHT, type MainView, MyChecklistSteps, NEEDS_A_SENTENCE, NOT_ANSWERED_YET, NOT_DRAWN_HERE, NO_AGENT_PORT, NO_CHAT_REASON, NO_COLUMNS_WHY, NO_COLUMNS_YET, NO_ENRICH_REASON, NO_MEMBERS_REASON, NO_OPEN_RECORDS_REASON, NO_REASK_REASON, NO_RIGHTS, NO_RULES_YET, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, type NewFieldSpec, type NewTableSpec, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OpenRecordsAsk, type OrganizationMember, PAGE_VIEWS, PAGE_VIEW_LABEL, PARITY_LABEL, PARITY_MADE_OF, PROPOSED_CHANGE_ACT_LABEL, PROPOSED_CHANGE_ACT_VALUES, type PageView, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, PipelineBoard, type PipelineBoardProps, type PlainFieldType, type PlainRefusal, type PortalAnswer, PortalBuilder, type PortalBuilderProps, PortalCardView, type PortalCardViewProps, PortalShell, type PortalShellProps, PortalsPanel, type PortalsPanelProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, type ProposedChangeAct, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, ROLLUP_AGG_LABEL, ROLLUP_AGG_VALUES, type ReaskContext, RecordChat, type RecordChatContext, type RecordChatEntry, type RecordChatProps, type RecordChatWithheld, RecordChip, RecordForm, type RecordFormProps, RecordLabelProvider, RecordValue, RecordsMount, type RecordsMountProps, type RecordsUiHost, RecordsUiProvider, ReferenceBuilder, type ReferenceBuilderProps, type ReferenceChoice, RefusalLine, RefusalNotice, type RelationFieldType, RelationPicker, type RelationPickerProps, type ResolveName, type RollupAgg, SAVED_VIEWS_UNAVAILABLE, SAY_WHAT_YOU_ARE_WAITING_FOR_AFTER_MS, SERIES_COLORS, SOMEBODY, STAGE_RULE_ON_FAIL_LABEL, STORE_ANSWERS_THESE, STORE_DECIDES_REASON, SUBSCRIPTION_CADENCES, SUBSCRIPTION_CADENCE_LABEL, SUBSCRIPTION_CHANNEL_LABEL, SUBSCRIPTION_CHANNEL_VALUES, type SavedDashboard, type SavedForm, type SavedView, type SavedViewSpec, ShareControl, type ShareControlProps, type ShareSubject, SignBlock, type SignBlockProps, StageRulesSection, type StageRulesSectionProps, StepRow, type SubscriptionChannel, SubscriptionsPanel, type SubscriptionsPanelProps, type Surface, type SurfacePress, type SystemFieldSpec, type SystemTableSpec, TABLE_LANES, TABLE_NOT_REACHABLE, THE_SYSTEM, type TableLane, TablePage, type TablePageProps, type TableRights, TableSettings, type TableSettingsProps, TablesHome, type TablesHomeProps, type TrackedVersion, type UseSystemTableState, VIEW_LAYOUTS, VIEW_NOT_SAVED_YET, VIEW_TABLE, ViewBar, type ViewBarProps, type ViewLayout, type ViewSort, ViewSwitcher, type ViewSwitcherProps, WITHHELD_RECORD_LABEL, WORK_DUE_STATES, WORK_INBOX_KINDS, WORK_INBOX_KIND_LABEL, type WhatYouMayDo, type WhoChanged, WhoChangedSource, actorBadge, actorWords, addFields, askableFields, blockFromSpec, bodyForReading, bodyFromKeys, cameFromLine, cellState, chooseSurface, colorFromTheValue, columnForField, conditionInWords, conditionIsDrawable, conditionIsSimple, conditionValue, controlFor, currencyCodeFor, dashboardDeclareArgs, dashboardFromSummary, declareTable, editorKindFor, ensureSystemTable, envelopeFor, fieldDeclarationFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, formDeclareArgs, formFromSummary, formPresentation, formatForField, groupLabel, hintForAPerson, hintIsMachineIdentity, humanize, idsOf, isEngineerText, isId, isMachineIdentity, isPlainFieldType, isRelationFieldType, isSignatureField, keyFor, laneFor, lastChangeSentence, looksLikeId, machineIdentityIn, memberName, nextInWords, openingRail, openingView, pageViewFromParam, parityTypesWithNoExplanation, parseGridPresentation, personActor, personRecordForMember, pointsAtRecords, presentationDocument, presentationIsEmpty, previewLine, previewWords, publiclyAnswerable, recordName, recordNameIn, recordsDataSource, refusalForAPerson, refusalLineForAPerson, renderValue, revokeConsequence, rowName, rowNameIn, scalarText, shareUnavailableReason, specFromBlock, storeDecidesRights, submissionStamp, surfaceChosen, tableName, tableRightsAt, tokenFor, unknownViewLine, useCanShare, useEmbedHandshake, useEnrichCells, useGridEditing, useLabelWait, useMeasuredWidth, useMyChecklistSteps, useRecordLabels, useRecordRights, useRecordsUi, useRowRights, useSystemTable, useTableRights, useViewRecords, useWhoChanged, viewDocument, viewFromRecord, viewPatchDocument, whatIsMissing, whatYouMayDo, whatYouMayDoWithTable, whenWords, whyNotAskable };
package/dist/index.d.ts CHANGED
@@ -108,6 +108,12 @@ interface RecordChatContext {
108
108
  /** The whole door answer, for a host that wants the history or the relations. */
109
109
  scope: RecordScopeContext;
110
110
  }
111
+ /**
112
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `chat` on
113
+ * `<RecordsUiProvider>` with the host's own chat surface — in AI Matrx that is
114
+ * `AgentConversationColumn`, launched through a Mandate. This package
115
+ * deliberately ships no second chat UI.
116
+ */
111
117
  declare const NO_CHAT_REASON: string;
112
118
  interface RecordChatProps {
113
119
  tableId: Uuid;
@@ -138,6 +144,12 @@ interface EnrichOutcome {
138
144
  says?: string;
139
145
  }>;
140
146
  }
147
+ /**
148
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `enrich` on
149
+ * `<RecordsUiProvider>` with a call to the server's own `records` tool (action
150
+ * `enrich_propose`). Only the server may write a value as an agent — a browser
151
+ * stamping itself `agent` would be a browser claiming to be one.
152
+ */
141
153
  declare const NO_ENRICH_REASON: string;
142
154
  /** Which of the four things this cell is. One place, so nothing can disagree. */
143
155
  declare function cellState(cell: EnrichCell | undefined): "none" | "agent" | "yours" | "unsure";
@@ -487,17 +499,52 @@ interface PendingCapture {
487
499
  attempts: number;
488
500
  lastRefusal?: string | null;
489
501
  }
490
- /** The sentence the notify editor shows when no saved-view port is bound. */
502
+ /**
503
+ * The sentence the notify editor shows when no saved-view port is bound.
504
+ *
505
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `savedViews` on
506
+ * `<RecordsUiProvider>` with the host's own list of `platform.saved_view` rows —
507
+ * the record store has no door onto them — and the picker appears.
508
+ */
491
509
  declare const NO_SAVED_VIEWS_REASON: string;
492
- /** The sentence a person question shows when no membership port is bound. */
510
+ /**
511
+ * The sentence a person question shows when no membership port is bound.
512
+ *
513
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `members` on
514
+ * `<RecordsUiProvider>` with the host's own roster. Who is in an organization is
515
+ * the platform's answer, not the record store's, so this package will not guess.
516
+ */
493
517
  declare const NO_MEMBERS_REASON: string;
494
- /** The sentence shown when no share dialog is bound. */
518
+ /**
519
+ * The sentence shown when no share dialog is bound.
520
+ *
521
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `share` on
522
+ * `<RecordsUiProvider>` with the app's own sharing dialog. AI Matrx has exactly
523
+ * one, and this package deliberately does not ship a second.
524
+ */
495
525
  declare const NO_SHARE_REASON: string;
496
- /** The sentence a canvas shows when nothing is bound to open the records behind a number. */
526
+ /**
527
+ * The sentence a canvas shows when nothing is bound to open the records behind a number.
528
+ *
529
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `openRecords` on
530
+ * `<RecordsUiProvider>`. Where this app puts its grid is the host's routing, not
531
+ * this package's, so it will not guess an address.
532
+ */
497
533
  declare const NO_OPEN_RECORDS_REASON: string;
498
- /** The sentence the re-ask box shows when no agent is bound. */
534
+ /**
535
+ * The sentence the re-ask box shows when no agent is bound.
536
+ *
537
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `onReask` on
538
+ * `<RecordsUiProvider>`; it drives `dashboard_propose` on the server's `records`
539
+ * tool with this dashboard's id. Only the server can honestly speak as an agent.
540
+ */
499
541
  declare const NO_REASK_REASON: string;
500
- /** The sentence an attachment question shows when no file store is bound. */
542
+ /**
543
+ * The sentence an attachment question shows when no file store is bound.
544
+ *
545
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `upload` on
546
+ * `<RecordsUiProvider>` with the host's file service and the chooser appears.
547
+ */
501
548
  declare const NO_UPLOAD_REASON: string;
502
549
  declare function RecordsUiProvider({ value, children }: {
503
550
  value: RecordsUiHost;
@@ -549,6 +596,28 @@ declare function isMachineIdentity(text: string): boolean;
549
596
  * the suite to say WHAT it found rather than only that it found something.
550
597
  */
551
598
  declare function machineIdentityIn(text: string): string[];
599
+ /**
600
+ * 🚨 A HINT THIS PACKAGE OR ITS CLIENT WROTE IS NOT A PERSON'S REMEDY.
601
+ *
602
+ * `refusalForAPerson` prefers the DOOR's own hint over the table above, because
603
+ * the door that refused knows more about the way out than a code does. That is
604
+ * right — but it assumed every hint came from the store. It did not: until
605
+ * `@ai-matrx/records` 0.47.0 the client appended its OWN note to `hint` when it
606
+ * met a SQLSTATE it did not know, and the machine-identity filter let it
607
+ * through whenever the code was not exactly five characters (an empty code from
608
+ * a dropped connection, or an HTTP status like `404`). So the Checklists tab of
609
+ * a plumbing company's jobs table told its owner:
610
+ *
611
+ * @ai-matrx/records did not recognise SQLSTATE from checklistTemplates
612
+ *
613
+ * The client no longer writes there. This is the guard on the other side, by
614
+ * SHAPE and not by that one sentence: a hint that talks about a package, a
615
+ * SQLSTATE, or a `camelCaseDoor` is engineer text wherever it came from, and it
616
+ * joins the engineer's line instead of a person's screen.
617
+ */
618
+ declare const ENGINEER_TEXT: RegExp[];
619
+ /** Whether this sentence was written for whoever maintains the code. */
620
+ declare function isEngineerText(text: string): boolean;
552
621
  /** The one shape every screen in this package renders a refusal from. */
553
622
  interface PlainRefusal {
554
623
  /** The heading. Never the store's code. */
@@ -2553,6 +2622,11 @@ declare function nextInWords(page: Pick<BookingSummary, "next_at" | "timezone" |
2553
2622
  /** The three things a phone captures. Each one writes the SAME kind of record. */
2554
2623
  declare const CAPTURE_MODES: readonly ["reading", "photo", "voice"];
2555
2624
  type CaptureMode = (typeof CAPTURE_MODES)[number];
2625
+ /**
2626
+ * FOR WHOEVER MAINTAINS THIS APP (never on the screen): bind `captureQueue` on
2627
+ * `<RecordsUiProvider>` with the host's own durable store — IndexedDB in a
2628
+ * browser — and a queued capture survives the tab, the reload and the flight.
2629
+ */
2556
2630
  declare const IN_MEMORY_QUEUE_REASON: string;
2557
2631
  interface CaptureSheetProps {
2558
2632
  /**
@@ -2799,6 +2873,31 @@ interface TablePageProps {
2799
2873
  * copy it out of the address bar afterwards.
2800
2874
  */
2801
2875
  onViewChanged?: ((view: PageView) => void) | undefined;
2876
+ /**
2877
+ * WHICH FIELD THE ADDRESS WANTS THE BOARD'S COLUMNS TO BE, for this visit.
2878
+ *
2879
+ * 🚨 THIS IS HOW A DASHBOARD NUMBER CLICKS THROUGH (lane TAILS-6, 2026-09-22).
2880
+ * Until today the canvas told the owner of the business to "bind `openRecords`
2881
+ * on <RecordsUiProvider>" — a developer's sentence on a customer's screen —
2882
+ * because nothing in this app routed a bar or a slice anywhere. The store has
2883
+ * no door that returns the ROWS behind an aggregate filter, so a click cannot
2884
+ * honestly promise a narrowed list; what it CAN do is open this table's board
2885
+ * with its columns set to the very field the chart grouped by, where the
2886
+ * column the person clicked is right there and every card in it is real.
2887
+ *
2888
+ * It overrides the saved view's own `groupField` for this visit only, exactly
2889
+ * as `activeView` overrides its layout, and it is never written back.
2890
+ */
2891
+ activeGroupField?: string | null | undefined;
2892
+ /**
2893
+ * WHAT THE PERSON CLICKED TO GET HERE — "Jobs by stage · Awaiting parts".
2894
+ *
2895
+ * Present, the board says where they came from AND says plainly that it is
2896
+ * showing every record grouped by that field rather than only the ones the
2897
+ * number counted. A screen that quietly showed more rows than the number
2898
+ * promised would be the number lying twice.
2899
+ */
2900
+ cameFrom?: string | null | undefined;
2802
2901
  className?: string | undefined;
2803
2902
  }
2804
2903
  /**
@@ -2817,6 +2916,16 @@ interface TablePageProps {
2817
2916
  * whether the table exists: this person cannot see it, and which of the two it
2818
2917
  * is is not theirs to learn.
2819
2918
  */
2919
+ /**
2920
+ * WHAT THE BOARD SAYS TO SOMEBODY A DASHBOARD NUMBER SENT HERE.
2921
+ *
2922
+ * It says two things and neither is optional: which number they clicked, and
2923
+ * that this is every record grouped by that field rather than only the ones the
2924
+ * number counted. The store has no door that returns the rows behind an
2925
+ * aggregate filter, so claiming a narrowed list would be a lie — and showing a
2926
+ * wider one silently would be the same lie with nobody told.
2927
+ */
2928
+ declare function cameFromLine(label: string, groupField: string | null): string;
2820
2929
  declare const TABLE_NOT_REACHABLE: string;
2821
2930
  /**
2822
2931
  * THE VIEW EVERY TABLE HAS, AND WHY IT IS NOT OPTIONAL.
@@ -2925,7 +3034,7 @@ declare function openingView(activeView: string | null | undefined, activeDashbo
2925
3034
  layout: ViewLayout | null;
2926
3035
  unknown: string | null;
2927
3036
  };
2928
- declare function TablePage({ tableId, pageSize, seedViews, onLeave, leaveLabel, activeDashboardId, activeRecordId, activeView, onViewChanged, className, }: TablePageProps): react.JSX.Element;
3037
+ declare function TablePage({ tableId, pageSize, seedViews, onLeave, leaveLabel, activeDashboardId, activeRecordId, activeView, onViewChanged, activeGroupField, cameFrom, className, }: TablePageProps): react.JSX.Element;
2929
3038
 
2930
3039
  /** What the roster can tell us about a user id. `null` when it cannot. */
2931
3040
  type ResolveName = (userId: Uuid$1) => string | null;
@@ -3103,4 +3212,4 @@ interface PipelineBoardProps {
3103
3212
  }
3104
3213
  declare function PipelineBoard({ tableId, rows, measure, onMeasureChange, onOpenRecord, onMoved, className, }: PipelineBoardProps): react.JSX.Element;
3105
3214
 
3106
- export { ABSENCE_WORD_LABEL, ABSENCE_WORD_VALUES, ACTION_KINDS, type AbsenceWord, ActionInbox, type ActionInboxProps, type ActionKind, type AgentBuildAsk, BOOKING_PAGE_STATE_LABEL, BOOKING_PAGE_STATE_VALUES, BookingBuilder, type BookingBuilderProps, type BookingPageState, BookingSlots, type BookingSlotsProps, BuildOrAsk, type BuildOrAskProps, type BuildableKind, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CHECKLIST_REQUIREMENT_KINDS, CHECKLIST_REQUIREMENT_LABEL, CONDITION_OPS, CONTEXT_POLICY_LABEL, type Capability, type CaptureMode, type CaptureQueuePort, CaptureRun, type CaptureRunProps, CaptureSheet, type CaptureSheetProps, type CellAddress, type CellRefusal, type CellState, ChartBlock, type ChartBlockProps, type ChartConfig, ChartFrame, type ChartKind, ChartLegendContent, type ChartSpec, ChartTooltipContent, ChecklistRunner, type ChecklistRunnerProps, ChecklistTemplateEditor, ChecklistsPanel, type ChecklistsPanelProps, CommentThread, type CommentThreadProps, type ConditionField, ConditionGroup, type ConditionGroupProps, ConditionRow, type ConditionRowProps, CustomFieldsSection, type CustomFieldsSectionProps, DEFAULT_FIELDS, DEFAULT_VIEW_NAME, DUE_STATE_LABEL, DashboardCanvas, type DashboardCanvasProps, type DeclareResult, DigestScheduler, type DigestSchedulerProps, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, EMPTY_PRESENTATION, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, EnrichBadge, type EnrichBadgeProps, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, ExportMenu, type ExportMenuProps, FIELD_RULE_KIND_LABEL, FIELD_RULE_KIND_VALUES, FIELD_SENSITIVITY_LABEL, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FORMULA_OP_JOINS, FORMULA_OP_LABEL, FORMULA_OP_VALUES, FORM_FLOWS, FROZEN_COLUMN_WIDTH, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldHistoryPanel, type FieldHistoryPanelProps, FieldLabel, type FieldProposalRow, type FieldRuleKindValue, type FieldTypeChoice, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormSubmitOutcome, type FormTheme, FormsPanel, type FormsPanelProps, type FormulaOp, Grid, GridCell, type GridEditing, type GridGrouping, type GridPresentation, type GridProps, HistoryPanel, type HistoryPanelProps, IN_MEMORY_QUEUE_REASON, ImportWizard, type ImportWizardProps, KERNEL_REASON, LANE_EMPTY, LANE_TITLE, LAYOUT_FIELD_KIND, LAYOUT_LABEL, LAYOUT_NEEDS, LAYOUT_NO_FIELD, LEVEL_WORD, type LabelLookup, MACHINE_IDENTITY, MAX_ROW_HEIGHT, MIN_ROW_HEIGHT, type MainView, MyChecklistSteps, NEEDS_A_SENTENCE, NOT_ANSWERED_YET, NOT_DRAWN_HERE, NO_AGENT_PORT, NO_CHAT_REASON, NO_COLUMNS_WHY, NO_COLUMNS_YET, NO_ENRICH_REASON, NO_MEMBERS_REASON, NO_OPEN_RECORDS_REASON, NO_REASK_REASON, NO_RIGHTS, NO_RULES_YET, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, type NewFieldSpec, type NewTableSpec, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OpenRecordsAsk, type OrganizationMember, PAGE_VIEWS, PAGE_VIEW_LABEL, PARITY_LABEL, PARITY_MADE_OF, PROPOSED_CHANGE_ACT_LABEL, PROPOSED_CHANGE_ACT_VALUES, type PageView, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, PipelineBoard, type PipelineBoardProps, type PlainFieldType, type PlainRefusal, type PortalAnswer, PortalBuilder, type PortalBuilderProps, PortalCardView, type PortalCardViewProps, PortalShell, type PortalShellProps, PortalsPanel, type PortalsPanelProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, type ProposedChangeAct, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, ROLLUP_AGG_LABEL, ROLLUP_AGG_VALUES, type ReaskContext, RecordChat, type RecordChatContext, type RecordChatEntry, type RecordChatProps, type RecordChatWithheld, RecordChip, RecordForm, type RecordFormProps, RecordLabelProvider, RecordValue, RecordsMount, type RecordsMountProps, type RecordsUiHost, RecordsUiProvider, ReferenceBuilder, type ReferenceBuilderProps, type ReferenceChoice, RefusalLine, RefusalNotice, type RelationFieldType, RelationPicker, type RelationPickerProps, type ResolveName, type RollupAgg, SAVED_VIEWS_UNAVAILABLE, SAY_WHAT_YOU_ARE_WAITING_FOR_AFTER_MS, SERIES_COLORS, SOMEBODY, STAGE_RULE_ON_FAIL_LABEL, STORE_ANSWERS_THESE, STORE_DECIDES_REASON, SUBSCRIPTION_CADENCES, SUBSCRIPTION_CADENCE_LABEL, SUBSCRIPTION_CHANNEL_LABEL, SUBSCRIPTION_CHANNEL_VALUES, type SavedDashboard, type SavedForm, type SavedView, type SavedViewSpec, ShareControl, type ShareControlProps, type ShareSubject, SignBlock, type SignBlockProps, StageRulesSection, type StageRulesSectionProps, StepRow, type SubscriptionChannel, SubscriptionsPanel, type SubscriptionsPanelProps, type Surface, type SurfacePress, type SystemFieldSpec, type SystemTableSpec, TABLE_LANES, TABLE_NOT_REACHABLE, THE_SYSTEM, type TableLane, TablePage, type TablePageProps, type TableRights, TableSettings, type TableSettingsProps, TablesHome, type TablesHomeProps, type TrackedVersion, type UseSystemTableState, VIEW_LAYOUTS, VIEW_NOT_SAVED_YET, VIEW_TABLE, ViewBar, type ViewBarProps, type ViewLayout, type ViewSort, ViewSwitcher, type ViewSwitcherProps, WITHHELD_RECORD_LABEL, WORK_DUE_STATES, WORK_INBOX_KINDS, WORK_INBOX_KIND_LABEL, type WhatYouMayDo, type WhoChanged, WhoChangedSource, actorBadge, actorWords, addFields, askableFields, blockFromSpec, bodyForReading, bodyFromKeys, cellState, chooseSurface, colorFromTheValue, columnForField, conditionInWords, conditionIsDrawable, conditionIsSimple, conditionValue, controlFor, currencyCodeFor, dashboardDeclareArgs, dashboardFromSummary, declareTable, editorKindFor, ensureSystemTable, envelopeFor, fieldDeclarationFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, formDeclareArgs, formFromSummary, formPresentation, formatForField, groupLabel, hintForAPerson, hintIsMachineIdentity, humanize, idsOf, isId, isMachineIdentity, isPlainFieldType, isRelationFieldType, isSignatureField, keyFor, laneFor, lastChangeSentence, looksLikeId, machineIdentityIn, memberName, nextInWords, openingRail, openingView, pageViewFromParam, parityTypesWithNoExplanation, parseGridPresentation, personActor, personRecordForMember, pointsAtRecords, presentationDocument, presentationIsEmpty, previewLine, previewWords, publiclyAnswerable, recordName, recordNameIn, recordsDataSource, refusalForAPerson, refusalLineForAPerson, renderValue, revokeConsequence, rowName, rowNameIn, scalarText, shareUnavailableReason, specFromBlock, storeDecidesRights, submissionStamp, surfaceChosen, tableName, tableRightsAt, tokenFor, unknownViewLine, useCanShare, useEmbedHandshake, useEnrichCells, useGridEditing, useLabelWait, useMeasuredWidth, useMyChecklistSteps, useRecordLabels, useRecordRights, useRecordsUi, useRowRights, useSystemTable, useTableRights, useViewRecords, useWhoChanged, viewDocument, viewFromRecord, viewPatchDocument, whatIsMissing, whatYouMayDo, whatYouMayDoWithTable, whenWords, whyNotAskable };
3215
+ export { ABSENCE_WORD_LABEL, ABSENCE_WORD_VALUES, ACTION_KINDS, type AbsenceWord, ActionInbox, type ActionInboxProps, type ActionKind, type AgentBuildAsk, BOOKING_PAGE_STATE_LABEL, BOOKING_PAGE_STATE_VALUES, BookingBuilder, type BookingBuilderProps, type BookingPageState, BookingSlots, type BookingSlotsProps, BuildOrAsk, type BuildOrAskProps, type BuildableKind, CAPTURE_MODES, CHART_KINDS, CHART_KIND_LABEL, CHART_NEEDS, CHECKLIST_REQUIREMENT_KINDS, CHECKLIST_REQUIREMENT_LABEL, CONDITION_OPS, CONTEXT_POLICY_LABEL, type Capability, type CaptureMode, type CaptureQueuePort, CaptureRun, type CaptureRunProps, CaptureSheet, type CaptureSheetProps, type CellAddress, type CellRefusal, type CellState, ChartBlock, type ChartBlockProps, type ChartConfig, ChartFrame, type ChartKind, ChartLegendContent, type ChartSpec, ChartTooltipContent, ChecklistRunner, type ChecklistRunnerProps, ChecklistTemplateEditor, ChecklistsPanel, type ChecklistsPanelProps, CommentThread, type CommentThreadProps, type ConditionField, ConditionGroup, type ConditionGroupProps, ConditionRow, type ConditionRowProps, CustomFieldsSection, type CustomFieldsSectionProps, DEFAULT_FIELDS, DEFAULT_VIEW_NAME, DUE_STATE_LABEL, DashboardCanvas, type DashboardCanvasProps, type DeclareResult, DigestScheduler, type DigestSchedulerProps, DocRender, type DocRenderProps, DocTemplate, type DocTemplateProps, type DocTemplateSpec, EMPTY_PRESENTATION, ENGINEER_TEXT, type EditorKind, EmbedFrame, type EmbedFrameProps, type EnrichAsk, EnrichBadge, type EnrichBadgeProps, type EnrichOutcome, EnrichPanel, type EnrichPanelProps, ExportMenu, type ExportMenuProps, FIELD_RULE_KIND_LABEL, FIELD_RULE_KIND_VALUES, FIELD_SENSITIVITY_LABEL, FIELD_TYPE_CHOICES, FIELD_TYPE_GROUPS, FORMULA_OP_JOINS, FORMULA_OP_LABEL, FORMULA_OP_VALUES, FORM_FLOWS, FROZEN_COLUMN_WIDTH, FieldControl, FieldEditor, type FieldEditorControlProps, type FieldEditorProps, FieldHistoryPanel, type FieldHistoryPanelProps, FieldLabel, type FieldProposalRow, type FieldRuleKindValue, type FieldTypeChoice, FormBuilder, type FormBuilderProps, type FormFlow, type FormQuestionSpec, FormRunner, type FormRunnerProps, type FormSpec, type FormSubmitOutcome, type FormTheme, FormsPanel, type FormsPanelProps, type FormulaOp, Grid, GridCell, type GridEditing, type GridGrouping, type GridPresentation, type GridProps, HistoryPanel, type HistoryPanelProps, IN_MEMORY_QUEUE_REASON, ImportWizard, type ImportWizardProps, KERNEL_REASON, LANE_EMPTY, LANE_TITLE, LAYOUT_FIELD_KIND, LAYOUT_LABEL, LAYOUT_NEEDS, LAYOUT_NO_FIELD, LEVEL_WORD, type LabelLookup, MACHINE_IDENTITY, MAX_ROW_HEIGHT, MIN_ROW_HEIGHT, type MainView, MyChecklistSteps, NEEDS_A_SENTENCE, NOT_ANSWERED_YET, NOT_DRAWN_HERE, NO_AGENT_PORT, NO_CHAT_REASON, NO_COLUMNS_WHY, NO_COLUMNS_YET, NO_ENRICH_REASON, NO_MEMBERS_REASON, NO_OPEN_RECORDS_REASON, NO_REASK_REASON, NO_RIGHTS, NO_RULES_YET, NO_SAVED_VIEWS_REASON, NO_SHARE_REASON, NO_UPLOAD_REASON, type NewFieldSpec, type NewTableSpec, NotifyRuleEditor, type NotifyRuleEditorProps, type NotifyRuleSpec, type OpenRecordsAsk, type OrganizationMember, PAGE_VIEWS, PAGE_VIEW_LABEL, PARITY_LABEL, PARITY_MADE_OF, PROPOSED_CHANGE_ACT_LABEL, PROPOSED_CHANGE_ACT_VALUES, type PageView, Peek, type PeekProps, type PendingCapture, PersonPicker, type PersonPickerProps, type PickableFieldType, PipelineBoard, type PipelineBoardProps, type PlainFieldType, type PlainRefusal, type PortalAnswer, PortalBuilder, type PortalBuilderProps, PortalCardView, type PortalCardViewProps, PortalShell, type PortalShellProps, PortalsPanel, type PortalsPanelProps, type ProposalOutcome, ProposalRow, type ProposalRowProps, type ProposedChange, type ProposedChangeAct, ProvenanceBadge, PublicViewPage, type PublicViewPageProps, ROLLUP_AGG_LABEL, ROLLUP_AGG_VALUES, type ReaskContext, RecordChat, type RecordChatContext, type RecordChatEntry, type RecordChatProps, type RecordChatWithheld, RecordChip, RecordForm, type RecordFormProps, RecordLabelProvider, RecordValue, RecordsMount, type RecordsMountProps, type RecordsUiHost, RecordsUiProvider, ReferenceBuilder, type ReferenceBuilderProps, type ReferenceChoice, RefusalLine, RefusalNotice, type RelationFieldType, RelationPicker, type RelationPickerProps, type ResolveName, type RollupAgg, SAVED_VIEWS_UNAVAILABLE, SAY_WHAT_YOU_ARE_WAITING_FOR_AFTER_MS, SERIES_COLORS, SOMEBODY, STAGE_RULE_ON_FAIL_LABEL, STORE_ANSWERS_THESE, STORE_DECIDES_REASON, SUBSCRIPTION_CADENCES, SUBSCRIPTION_CADENCE_LABEL, SUBSCRIPTION_CHANNEL_LABEL, SUBSCRIPTION_CHANNEL_VALUES, type SavedDashboard, type SavedForm, type SavedView, type SavedViewSpec, ShareControl, type ShareControlProps, type ShareSubject, SignBlock, type SignBlockProps, StageRulesSection, type StageRulesSectionProps, StepRow, type SubscriptionChannel, SubscriptionsPanel, type SubscriptionsPanelProps, type Surface, type SurfacePress, type SystemFieldSpec, type SystemTableSpec, TABLE_LANES, TABLE_NOT_REACHABLE, THE_SYSTEM, type TableLane, TablePage, type TablePageProps, type TableRights, TableSettings, type TableSettingsProps, TablesHome, type TablesHomeProps, type TrackedVersion, type UseSystemTableState, VIEW_LAYOUTS, VIEW_NOT_SAVED_YET, VIEW_TABLE, ViewBar, type ViewBarProps, type ViewLayout, type ViewSort, ViewSwitcher, type ViewSwitcherProps, WITHHELD_RECORD_LABEL, WORK_DUE_STATES, WORK_INBOX_KINDS, WORK_INBOX_KIND_LABEL, type WhatYouMayDo, type WhoChanged, WhoChangedSource, actorBadge, actorWords, addFields, askableFields, blockFromSpec, bodyForReading, bodyFromKeys, cameFromLine, cellState, chooseSurface, colorFromTheValue, columnForField, conditionInWords, conditionIsDrawable, conditionIsSimple, conditionValue, controlFor, currencyCodeFor, dashboardDeclareArgs, dashboardFromSummary, declareTable, editorKindFor, ensureSystemTable, envelopeFor, fieldDeclarationFor, fieldIsEditable, fieldName, fieldToken, fieldTypeChoice, fieldTypeLabel, formDeclareArgs, formFromSummary, formPresentation, formatForField, groupLabel, hintForAPerson, hintIsMachineIdentity, humanize, idsOf, isEngineerText, isId, isMachineIdentity, isPlainFieldType, isRelationFieldType, isSignatureField, keyFor, laneFor, lastChangeSentence, looksLikeId, machineIdentityIn, memberName, nextInWords, openingRail, openingView, pageViewFromParam, parityTypesWithNoExplanation, parseGridPresentation, personActor, personRecordForMember, pointsAtRecords, presentationDocument, presentationIsEmpty, previewLine, previewWords, publiclyAnswerable, recordName, recordNameIn, recordsDataSource, refusalForAPerson, refusalLineForAPerson, renderValue, revokeConsequence, rowName, rowNameIn, scalarText, shareUnavailableReason, specFromBlock, storeDecidesRights, submissionStamp, surfaceChosen, tableName, tableRightsAt, tokenFor, unknownViewLine, useCanShare, useEmbedHandshake, useEnrichCells, useGridEditing, useLabelWait, useMeasuredWidth, useMyChecklistSteps, useRecordLabels, useRecordRights, useRecordsUi, useRowRights, useSystemTable, useTableRights, useViewRecords, useWhoChanged, viewDocument, viewFromRecord, viewPatchDocument, whatIsMissing, whatYouMayDo, whatYouMayDoWithTable, whenWords, whyNotAskable };
package/dist/index.js CHANGED
@@ -80,12 +80,12 @@ var NO_RIGHTS = tableRights(NOT_ANSWERED_YET);
80
80
  function tableRightsAt(level) {
81
81
  return tableRights(whatYouMayDo(level, true));
82
82
  }
83
- var NO_SAVED_VIEWS_REASON = "No saved-view port is bound, so there is nothing here to subscribe to. A subscription points at a `platform.saved_view`, which the record store has no door onto \u2014 bind `savedViews` on <RecordsUiProvider> with your host's own list and the picker appears.";
84
- var NO_MEMBERS_REASON = "No membership port is bound, so this question cannot offer anybody. A person field points at the kernel Person Table, and who is in this organization is the platform's answer rather than the record store's \u2014 bind `members` on <RecordsUiProvider> with your host's own roster and the picker appears.";
85
- var NO_SHARE_REASON = "No share dialog is bound, so this screen offers no Share button rather than one that opens nothing. Bind `share` on <RecordsUiProvider> with the app's own sharing dialog \u2014 AI Matrx has exactly one (features/sharing), and this package deliberately does not ship a second.";
86
- var NO_OPEN_RECORDS_REASON = "These numbers do not click through yet. Every one of them is a count of real records, and where this app puts its grid is the host's routing rather than this package's \u2014 bind `openRecords` on <RecordsUiProvider> and a bar, a slice or a row opens the records it counted.";
87
- var NO_REASK_REASON = "Asking for a change in words needs an agent, and this package deliberately reaches one through the host rather than calling a model itself. Bind `onReask` on <RecordsUiProvider> \u2014 it drives `dashboard_propose` on the server's `records` tool with this dashboard's id \u2014 and this box works.";
88
- var NO_UPLOAD_REASON = "No file store is bound, so this question cannot take a file. Bind `upload` on <RecordsUiProvider> with your host's file service and the chooser appears.";
83
+ var NO_SAVED_VIEWS_REASON = "There are no saved views here yet, so there is nothing to be told about. Save a view of this table first and it will be offered here.";
84
+ var NO_MEMBERS_REASON = "This app cannot offer the people in your organization on this screen yet, so there is nobody to pick. Type the person's name into a text field for now, and tell us \u2014 it is on our list, not yours.";
85
+ var NO_SHARE_REASON = "Sharing is not available on this screen, so there is no Share button here rather than one that opens nothing. Share this table from the tables list instead.";
86
+ var NO_OPEN_RECORDS_REASON = "These numbers do not click through yet. Every one of them is a count of real records \u2014 open the records view and group it by the same field to see them. It is on our list, not yours.";
87
+ var NO_REASK_REASON = "Changing this dashboard by describing it is not switched on here yet, so this box is off rather than one that goes nowhere. Add and remove the blocks by hand above. It is on our list, not yours.";
88
+ var NO_UPLOAD_REASON = "This screen cannot take a file yet, so there is no chooser here rather than one that loses what you pick. Put a link to the file in a text field for now. It is on our list, not yours.";
89
89
  var HostContext = createContext(null);
90
90
  function RecordsUiProvider({ value, children }) {
91
91
  const bound = useMemo(() => value, [value]);
@@ -160,6 +160,10 @@ var TITLE = {
160
160
  not_supported: "That cannot be done here",
161
161
  store_limit: "This has got as big as it can",
162
162
  store_not_served: "This organization does not keep its data here",
163
+ unreachable: "We could not reach your data",
164
+ needs_approval: "This is waiting on someone's approval",
165
+ stale_read: "Your view of this is a moment behind",
166
+ timed_out: "That took too long to answer",
163
167
  internal: "Something went wrong at our end"
164
168
  };
165
169
  var REMEDY = {
@@ -174,8 +178,35 @@ var REMEDY = {
174
178
  not_supported: "There is another way to do this \u2014 ask, and we will point you at it.",
175
179
  store_limit: "Split it up, or ask us to raise the ceiling for your organization.",
176
180
  store_not_served: "An administrator of this organization turns the record store on from the data settings screen.",
181
+ // 🚨 NOTHING WAS WRITTEN AND NOTHING WAS REFUSED (lane TAILS-6). The call
182
+ // never arrived, so "try again" is the honest instruction rather than a
183
+ // consolation — and saying nothing changed is the half a person actually
184
+ // worries about.
185
+ unreachable: "Nothing was changed. Check your connection and open this again.",
186
+ needs_approval: "Nothing was changed yet. The people who can approve it have been asked.",
187
+ stale_read: "Open this again in a moment and it will be up to date.",
188
+ timed_out: "Nothing was changed. Try a smaller page, or try again in a moment.",
177
189
  internal: "Nothing you did caused this. Try again, and tell us if it keeps happening."
178
190
  };
191
+ var ENGINEER_TEXT = [
192
+ /@ai-matrx\//,
193
+ /\bSQLSTATE\b/i,
194
+ /\bPostgREST\b/i,
195
+ /\bIndexedDB\b/i,
196
+ // `<RecordsUiProvider>` — a component, on a screen.
197
+ /<\/?[A-Z][A-Za-z0-9]*\s*\/?>/,
198
+ // `savedViews`, `openRecords`, `onReask` — an identifier, however it is
199
+ // quoted. English does not write camelCase; code does.
200
+ /\b[a-z][a-z0-9]*[A-Z][A-Za-z0-9]*\b/,
201
+ // A backticked token is a thing you type into an editor, not a thing you do.
202
+ /`[A-Za-z_][A-Za-z0-9_.]*`/,
203
+ // "bind X on Y", "pass X", "import X" — an instruction to whoever maintains
204
+ // the app, arriving on the screen of somebody who cannot act on it.
205
+ /\bbind\s+[`'"A-Za-z]/i
206
+ ];
207
+ function isEngineerText(text) {
208
+ return ENGINEER_TEXT.some((shape) => shape.test(text));
209
+ }
179
210
  function withoutMachineClauses(sentence2) {
180
211
  const dropped = [];
181
212
  const footnotes = [];
@@ -213,11 +244,17 @@ function refusalForAPerson(error) {
213
244
  const message = plainSentence(String(error.message ?? ""));
214
245
  const hint = plainSentence(String(error.hint ?? ""));
215
246
  const title = TITLE[code] ?? "The store refused this";
216
- const remedy = hint.kept ?? REMEDY[code] ?? REMEDY["internal"];
217
- const said = (message.kept ?? "").trim();
247
+ const hintIsForEngineers = isEngineerText(String(error.hint ?? ""));
248
+ const remedy = (hintIsForEngineers ? null : hint.kept) ?? REMEDY[code] ?? REMEDY["internal"];
249
+ const messageIsForEngineers = isEngineerText(String(error.message ?? ""));
250
+ const said = (messageIsForEngineers ? "" : message.kept ?? "").trim();
218
251
  const forEngineers = [
219
252
  error.sqlstate ? `SQLSTATE ${error.sqlstate}.` : null,
220
- error.hint && hint.kept !== error.hint ? `Hint: ${error.hint}` : null,
253
+ // The client's own note about a class it did not recognise, or a call that
254
+ // never reached the store. It is rendered out of sight, never as a sentence.
255
+ error.diagnostic ? error.diagnostic : null,
256
+ messageIsForEngineers ? `Message: ${error.message}` : null,
257
+ error.hint && (hintIsForEngineers || hint.kept !== error.hint) ? `Hint: ${error.hint}` : null,
221
258
  message.dropped.length > 0 || hint.dropped.length > 0 ? `Dropped from the person's view: ${[...message.dropped, ...hint.dropped].join(" | ")}` : null
222
259
  ].filter(Boolean).join(" ");
223
260
  return {
@@ -2482,7 +2519,7 @@ import {
2482
2519
  cn as cn8
2483
2520
  } from "@ai-matrx/design-system";
2484
2521
  import { Fragment as Fragment4, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
2485
- var NO_ENRICH_REASON = "No enrich port is bound, so this panel does not offer to fill a column it cannot fill. The value has to be written by the SERVER with actor `agent` on behalf of you \u2014 a browser that stamped itself `agent` would be a browser claiming to be one \u2014 so bind `enrich` on <RecordsUiProvider> with a call to the server's own `records` tool (action `enrich_propose`). Everything else on this panel works without it.";
2522
+ var NO_ENRICH_REASON = "Having an agent fill this column is not switched on here yet, so this panel does not offer it rather than offering something that cannot happen. Everything else on this panel works. It is on our list, not yours.";
2486
2523
  function cellState(cell) {
2487
2524
  if (!cell || !cell.agent_owned) return "none";
2488
2525
  if (cell.pinned) return "yours";
@@ -5816,7 +5853,7 @@ import { useEffect as useEffect9, useMemo as useMemo14, useState as useState18 }
5816
5853
  import { useRecordsClient as useRecordsClient12 } from "@ai-matrx/records/react";
5817
5854
  import { Skeleton as Skeleton4, cn as cn16 } from "@ai-matrx/design-system";
5818
5855
  import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
5819
- var NO_CHAT_REASON = "No chat port is bound, so this panel is absent rather than showing a composer that goes nowhere. Bind `chat` on <RecordsUiProvider> with your host's own chat surface \u2014 in AI Matrx that is `AgentConversationColumn`, launched through a Mandate \u2014 and this panel becomes that surface with this record as its context. This package deliberately ships no second chat UI.";
5856
+ var NO_CHAT_REASON = "Chatting about this record is not switched on here yet, so this panel is empty rather than showing a box that goes nowhere. It is on our list, not yours.";
5820
5857
  function RecordChat({ tableId, recordId, className }) {
5821
5858
  const client = useRecordsClient12();
5822
5859
  const host = useRecordsUi();
@@ -13810,7 +13847,7 @@ function CaptureRun({ sheetId, face: given, className }) {
13810
13847
  // src/CaptureSheet.tsx
13811
13848
  import { Fragment as Fragment25, jsx as jsx52, jsxs as jsxs48 } from "react/jsx-runtime";
13812
13849
  var CAPTURE_MODES = ["reading", "photo", "voice"];
13813
- var IN_MEMORY_QUEUE_REASON = "No capture queue is bound, so anything that cannot be sent right now is held in this page's memory and is lost if the page closes. Bind `captureQueue` on <RecordsUiProvider> with your host's own durable store (IndexedDB in a browser) and a queued capture survives the tab, the reload and the flight. It is said here rather than discovered later.";
13850
+ var IN_MEMORY_QUEUE_REASON = "Anything you capture while offline is held only in this page until it can be sent, and it is lost if you close the tab. Keep this page open until you are back on a connection. It is said here rather than discovered later.";
13814
13851
  function mintClientKey() {
13815
13852
  const c = globalThis.crypto;
13816
13853
  if (typeof c?.randomUUID === "function") return `capture:${c.randomUUID()}`;
@@ -14686,6 +14723,10 @@ import { useCallback as useCallback37, useEffect as useEffect41, useState as use
14686
14723
  import { useRecordsClient as useRecordsClient43, useTable as useTable22 } from "@ai-matrx/records/react";
14687
14724
  import { Button as Button48, Separator as Separator12, Skeleton as Skeleton34, cn as cn51 } from "@ai-matrx/design-system";
14688
14725
  import { Fragment as Fragment28, jsx as jsx58, jsxs as jsxs53 } from "react/jsx-runtime";
14726
+ function cameFromLine(label, groupField) {
14727
+ const grouped = groupField ? `grouped into the same columns the chart used` : `for this table`;
14728
+ return `You came here from \u201C${label}\u201D. This is every record ${grouped} \u2014 not only the ones that number counted \u2014 so the column you clicked is here with the rest beside it.`;
14729
+ }
14689
14730
  var TABLE_NOT_REACHABLE = "This table is not in the organization you are working in, so there is nothing here to show. Switch to the organization that owns it and open it again \u2014 or it may have been deleted.";
14690
14731
  var DEFAULT_VIEW_NAME = "All records";
14691
14732
  var VIEW_NOT_SAVED_YET = "This table has no saved view yet, so the layout you pick here is not being kept. Save one from the bar above and it is remembered.";
@@ -14729,6 +14770,8 @@ function TablePage({
14729
14770
  activeRecordId,
14730
14771
  activeView,
14731
14772
  onViewChanged,
14773
+ activeGroupField,
14774
+ cameFrom,
14732
14775
  className
14733
14776
  }) {
14734
14777
  const client = useRecordsClient43();
@@ -14922,10 +14965,24 @@ function TablePage({
14922
14965
  ] }),
14923
14966
  main === "dashboards" ? /* @__PURE__ */ jsx58(DashboardCanvas, { tableId, activeDashboardId: activeDashboardId ?? null }) : /* @__PURE__ */ jsxs53(Fragment28, { children: [
14924
14967
  opened.unknown ? /* @__PURE__ */ jsx58("p", { className: "rounded-md border border-amber-600/40 bg-amber-500/5 px-3 py-2 text-xs leading-relaxed text-amber-700 dark:border-amber-400/40 dark:text-amber-300", children: unknownViewLine(opened.unknown) }) : null,
14968
+ cameFrom ? /* @__PURE__ */ jsx58(
14969
+ "p",
14970
+ {
14971
+ "data-testid": "came-from-a-number",
14972
+ className: "rounded-md border px-3 py-2 text-xs leading-relaxed text-muted-foreground",
14973
+ children: cameFromLine(cameFrom, activeGroupField ?? null)
14974
+ }
14975
+ ) : null,
14925
14976
  /* @__PURE__ */ jsx58(
14926
14977
  ViewSwitcher,
14927
14978
  {
14928
- view: { ...view ?? defaultView(tableId), layout: shownLayout },
14979
+ view: {
14980
+ ...view ?? defaultView(tableId),
14981
+ layout: shownLayout,
14982
+ // The address's field wins for this visit; silence keeps the
14983
+ // saved view's own choice, exactly as it always did.
14984
+ ...activeGroupField ? { groupField: activeGroupField } : {}
14985
+ },
14929
14986
  pageSize,
14930
14987
  onLayoutChange: (layout) => {
14931
14988
  setLayoutFromLink(layout);
@@ -15065,6 +15122,7 @@ export {
15065
15122
  DocRender,
15066
15123
  DocTemplate,
15067
15124
  EMPTY_PRESENTATION,
15125
+ ENGINEER_TEXT,
15068
15126
  EmbedFrame,
15069
15127
  EnrichBadge,
15070
15128
  EnrichPanel,
@@ -15188,6 +15246,7 @@ export {
15188
15246
  blockFromSpec,
15189
15247
  bodyForReading,
15190
15248
  bodyFromKeys,
15249
+ cameFromLine,
15191
15250
  cellState,
15192
15251
  chooseSurface,
15193
15252
  colorFromTheValue,
@@ -15219,6 +15278,7 @@ export {
15219
15278
  hintIsMachineIdentity,
15220
15279
  humanize,
15221
15280
  idsOf,
15281
+ isEngineerText,
15222
15282
  isId,
15223
15283
  isMachineIdentity,
15224
15284
  isPlainFieldType,