@genesislcap/ai-assistant 15.71.0-FUI-2650.1 → 15.71.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/ai-assistant.api.json +0 -97
- package/dist/ai-assistant.d.ts +0 -65
- package/dist/chat-driver.cjs +0 -18031
- package/dist/chat-driver.cjs.map +4 -4
- package/dist/chat-driver.mjs +0 -18024
- package/dist/chat-driver.mjs.map +4 -4
- package/dist/custom-elements.json +6856 -9696
- package/dist/dts/chat-driver-node.d.ts +0 -2
- package/dist/dts/chat-driver-node.d.ts.map +1 -1
- package/dist/dts/index.d.ts +0 -1
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/react.d.ts +0 -10
- package/dist/esm/chat-driver-node.js +0 -6
- package/dist/esm/index.js +0 -3
- package/dist/react.cjs +0 -7
- package/dist/react.mjs +0 -6
- package/package.json +17 -24
- package/scripts/smoke-chat-driver-node.mjs +0 -15
- package/dist/dts/code-review/code-review.types.d.ts +0 -76
- package/dist/dts/code-review/code-review.types.d.ts.map +0 -1
- package/dist/dts/code-review/code-reviewer.agent.d.ts +0 -77
- package/dist/dts/code-review/code-reviewer.agent.d.ts.map +0 -1
- package/dist/dts/code-review/code-reviewer.prompt.d.ts +0 -23
- package/dist/dts/code-review/code-reviewer.prompt.d.ts.map +0 -1
- package/dist/dts/code-review/gate.d.ts +0 -44
- package/dist/dts/code-review/gate.d.ts.map +0 -1
- package/dist/dts/code-review/index.d.ts +0 -27
- package/dist/dts/code-review/index.d.ts.map +0 -1
- package/dist/dts/code-review/review-changes.d.ts +0 -70
- package/dist/dts/code-review/review-changes.d.ts.map +0 -1
- package/dist/dts/code-review/rules/context-trigger-map.d.ts +0 -6
- package/dist/dts/code-review/rules/context-trigger-map.d.ts.map +0 -1
- package/dist/dts/code-review/rules/context.registry.d.ts +0 -123
- package/dist/dts/code-review/rules/context.registry.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-ai-extensions.d.ts +0 -13
- package/dist/dts/code-review/rules/fui-ai-extensions.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-blotter.d.ts +0 -16
- package/dist/dts/code-review/rules/fui-blotter.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-chart.d.ts +0 -20
- package/dist/dts/code-review/rules/fui-chart.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-column-defs.d.ts +0 -21
- package/dist/dts/code-review/rules/fui-column-defs.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-components.d.ts +0 -9
- package/dist/dts/code-review/rules/fui-components.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-criteria.d.ts +0 -32
- package/dist/dts/code-review/rules/fui-criteria.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-custom-renderer.d.ts +0 -15
- package/dist/dts/code-review/rules/fui-custom-renderer.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-dashboard.d.ts +0 -19
- package/dist/dts/code-review/rules/fui-dashboard.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-dialogs.d.ts +0 -19
- package/dist/dts/code-review/rules/fui-dialogs.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-entity-management.d.ts +0 -19
- package/dist/dts/code-review/rules/fui-entity-management.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-error-boundary.d.ts +0 -9
- package/dist/dts/code-review/rules/fui-error-boundary.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-eventing.d.ts +0 -8
- package/dist/dts/code-review/rules/fui-eventing.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-flexlayout.d.ts +0 -17
- package/dist/dts/code-review/rules/fui-flexlayout.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-flyout-panel.d.ts +0 -10
- package/dist/dts/code-review/rules/fui-flyout-panel.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-form-component.d.ts +0 -9
- package/dist/dts/code-review/rules/fui-form-component.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-formatters.d.ts +0 -12
- package/dist/dts/code-review/rules/fui-formatters.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-foundation-comms.d.ts +0 -10
- package/dist/dts/code-review/rules/fui-foundation-comms.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-global-filters.d.ts +0 -33
- package/dist/dts/code-review/rules/fui-global-filters.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-import-surface.d.ts +0 -37
- package/dist/dts/code-review/rules/fui-import-surface.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-inline-editing.d.ts +0 -10
- package/dist/dts/code-review/rules/fui-inline-editing.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-layout.d.ts +0 -7
- package/dist/dts/code-review/rules/fui-layout.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-notifications.d.ts +0 -12
- package/dist/dts/code-review/rules/fui-notifications.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-primitives.d.ts +0 -26
- package/dist/dts/code-review/rules/fui-primitives.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-rapid-grid-pro.d.ts +0 -18
- package/dist/dts/code-review/rules/fui-rapid-grid-pro.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-redux-store.d.ts +0 -8
- package/dist/dts/code-review/rules/fui-redux-store.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-reporting.d.ts +0 -19
- package/dist/dts/code-review/rules/fui-reporting.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-styling.d.ts +0 -15
- package/dist/dts/code-review/rules/fui-styling.d.ts.map +0 -1
- package/dist/dts/code-review/rules/fui-trade-form.d.ts +0 -13
- package/dist/dts/code-review/rules/fui-trade-form.d.ts.map +0 -1
- package/dist/dts/code-review/submit-code-review.tool.d.ts +0 -12
- package/dist/dts/code-review/submit-code-review.tool.d.ts.map +0 -1
- package/dist/dts/code-review/unified-diff.d.ts +0 -7
- package/dist/dts/code-review/unified-diff.d.ts.map +0 -1
- package/dist/dts/code-review/verdict.d.ts +0 -23
- package/dist/dts/code-review/verdict.d.ts.map +0 -1
- package/dist/dts/components/code-review-result/code-review-result.d.ts +0 -26
- package/dist/dts/components/code-review-result/code-review-result.d.ts.map +0 -1
- package/dist/esm/code-review/code-review.types.js +0 -6
- package/dist/esm/code-review/code-reviewer.agent.js +0 -167
- package/dist/esm/code-review/code-reviewer.prompt.js +0 -103
- package/dist/esm/code-review/gate.js +0 -93
- package/dist/esm/code-review/index.js +0 -28
- package/dist/esm/code-review/review-changes.js +0 -123
- package/dist/esm/code-review/rules/context-trigger-map.js +0 -20
- package/dist/esm/code-review/rules/context.registry.js +0 -772
- package/dist/esm/code-review/rules/fui-ai-extensions.js +0 -306
- package/dist/esm/code-review/rules/fui-blotter.js +0 -596
- package/dist/esm/code-review/rules/fui-chart.js +0 -669
- package/dist/esm/code-review/rules/fui-column-defs.js +0 -862
- package/dist/esm/code-review/rules/fui-components.js +0 -245
- package/dist/esm/code-review/rules/fui-criteria.js +0 -538
- package/dist/esm/code-review/rules/fui-custom-renderer.js +0 -612
- package/dist/esm/code-review/rules/fui-dashboard.js +0 -604
- package/dist/esm/code-review/rules/fui-dialogs.js +0 -588
- package/dist/esm/code-review/rules/fui-entity-management.js +0 -1014
- package/dist/esm/code-review/rules/fui-error-boundary.js +0 -244
- package/dist/esm/code-review/rules/fui-eventing.js +0 -628
- package/dist/esm/code-review/rules/fui-flexlayout.js +0 -860
- package/dist/esm/code-review/rules/fui-flyout-panel.js +0 -432
- package/dist/esm/code-review/rules/fui-form-component.js +0 -898
- package/dist/esm/code-review/rules/fui-formatters.js +0 -415
- package/dist/esm/code-review/rules/fui-foundation-comms.js +0 -518
- package/dist/esm/code-review/rules/fui-global-filters.js +0 -778
- package/dist/esm/code-review/rules/fui-import-surface.js +0 -452
- package/dist/esm/code-review/rules/fui-inline-editing.js +0 -445
- package/dist/esm/code-review/rules/fui-layout.js +0 -431
- package/dist/esm/code-review/rules/fui-notifications.js +0 -439
- package/dist/esm/code-review/rules/fui-primitives.js +0 -1216
- package/dist/esm/code-review/rules/fui-rapid-grid-pro.js +0 -650
- package/dist/esm/code-review/rules/fui-redux-store.js +0 -522
- package/dist/esm/code-review/rules/fui-reporting.js +0 -506
- package/dist/esm/code-review/rules/fui-styling.js +0 -1229
- package/dist/esm/code-review/rules/fui-trade-form.js +0 -618
- package/dist/esm/code-review/submit-code-review.tool.js +0 -43
- package/dist/esm/code-review/unified-diff.js +0 -96
- package/dist/esm/code-review/verdict.js +0 -24
- package/dist/esm/components/code-review-result/code-review-result.js +0 -89
- package/docs/code-review.md +0 -137
|
@@ -1,772 +0,0 @@
|
|
|
1
|
-
import { __awaiter, __rest } from "tslib";
|
|
2
|
-
import { FUI_AI_EXTENSIONS_CONTEXT, FUI_AI_EXTENSIONS_DEPS, FUI_AI_EXTENSIONS_TAGS, } from './fui-ai-extensions';
|
|
3
|
-
import { FUI_BLOTTER_CONTEXT, FUI_BLOTTER_TAGS, FUI_BLOTTER_DEPS } from './fui-blotter';
|
|
4
|
-
import { FUI_CHART_CONTEXT, FUI_CHART_TAGS, FUI_CHART_DEPS } from './fui-chart';
|
|
5
|
-
import { FUI_COLUMN_DEFS_CONTEXT, FUI_COLUMN_DEFS_TAGS, FUI_COLUMN_DEFS_DEPS, } from './fui-column-defs';
|
|
6
|
-
import { FUI_COMPONENTS_CONTEXT, FUI_COMPONENTS_TAGS, FUI_COMPONENTS_DEPS } from './fui-components';
|
|
7
|
-
import { FUI_IMPORT_SURFACE_CONTEXT, FUI_IMPORT_SURFACE_TAGS } from './fui-import-surface';
|
|
8
|
-
import { FUI_EVENTING_CONTEXT, FUI_EVENTING_TAGS } from './fui-eventing';
|
|
9
|
-
import { FUI_GLOBAL_FILTERS_CONTEXT, FUI_GLOBAL_FILTERS_TAGS, FUI_GLOBAL_FILTERS_DEPS, } from './fui-global-filters';
|
|
10
|
-
import { FUI_LAYOUT_CONTEXT, FUI_LAYOUT_TAGS } from './fui-layout';
|
|
11
|
-
import { FUI_FOUNDATION_COMMS_CONTEXT, FUI_FOUNDATION_COMMS_TAGS } from './fui-foundation-comms';
|
|
12
|
-
import { FUI_INLINE_EDITING_CONTEXT, FUI_INLINE_EDITING_TAGS, FUI_INLINE_EDITING_DEPS, } from './fui-inline-editing';
|
|
13
|
-
import { FUI_ERROR_BOUNDARY_CONTEXT, FUI_ERROR_BOUNDARY_TAGS } from './fui-error-boundary';
|
|
14
|
-
import { FUI_RAPID_GRID_PRO_CONTEXT, FUI_RAPID_GRID_PRO_TAGS, FUI_RAPID_GRID_PRO_DEPS, } from './fui-rapid-grid-pro';
|
|
15
|
-
import { FUI_REPORTING_CONTEXT, FUI_REPORTING_TAGS, FUI_REPORTING_DEPS } from './fui-reporting';
|
|
16
|
-
import { FUI_STYLING_CONTEXT, FUI_STYLING_TAGS } from './fui-styling';
|
|
17
|
-
import { FUI_DASHBOARD_CONTEXT, FUI_DASHBOARD_TAGS, FUI_DASHBOARD_DEPS } from './fui-dashboard';
|
|
18
|
-
import { FUI_TRADE_FORM_CONTEXT, FUI_TRADE_FORM_TAGS, FUI_TRADE_FORM_DEPS } from './fui-trade-form';
|
|
19
|
-
import { FUI_FLYOUT_PANEL_CONTEXT, FUI_FLYOUT_PANEL_TAGS, FUI_FLYOUT_PANEL_DEPS, } from './fui-flyout-panel';
|
|
20
|
-
import { FUI_CUSTOM_RENDERER_CONTEXT, FUI_CUSTOM_RENDERER_TAGS, FUI_CUSTOM_RENDERER_DEPS, } from './fui-custom-renderer';
|
|
21
|
-
import { FUI_ENTITY_MANAGEMENT_CONTEXT, FUI_ENTITY_MANAGEMENT_TAGS, FUI_ENTITY_MANAGEMENT_DEPS, } from './fui-entity-management';
|
|
22
|
-
import { FUI_FORM_COMPONENT_CONTEXT, FUI_FORM_COMPONENT_TAGS, FUI_FORM_COMPONENT_DEPS, } from './fui-form-component';
|
|
23
|
-
import { FUI_DIALOGS_CONTEXT, FUI_DIALOGS_TAGS, FUI_DIALOGS_DEPS } from './fui-dialogs';
|
|
24
|
-
import { FUI_PRIMITIVES_CONTEXT, FUI_PRIMITIVES_TAGS, FUI_PRIMITIVES_DEPS } from './fui-primitives';
|
|
25
|
-
import { FUI_FORMATTERS_CONTEXT, FUI_FORMATTERS_TAGS, FUI_FORMATTERS_DEPS } from './fui-formatters';
|
|
26
|
-
import { FUI_FLEXLAYOUT_CONTEXT, FUI_FLEXLAYOUT_TAGS } from './fui-flexlayout';
|
|
27
|
-
import { FUI_NOTIFICATIONS_CONTEXT, FUI_NOTIFICATIONS_TAGS } from './fui-notifications';
|
|
28
|
-
import { FUI_REDUX_STORE_CONTEXT, FUI_REDUX_STORE_TAGS } from './fui-redux-store';
|
|
29
|
-
import { FUI_CRITERIA_CONTEXT, FUI_CRITERIA_TAGS, FUI_CRITERIA_DEPS } from './fui-criteria';
|
|
30
|
-
const CONTEXT_REGISTRY = {
|
|
31
|
-
'fui-import-surface': {
|
|
32
|
-
title: 'Import Surface — all valid @genesislcap package paths',
|
|
33
|
-
description: 'Definitive import path reference: which components come from which /react subpath, which types come from the base package root, subpath rules, and packages to avoid. The architecture planner is told to load this by name every run — read it whenever an import path is uncertain.',
|
|
34
|
-
whenToUse: [
|
|
35
|
-
'Looking up which package to import a component or type from',
|
|
36
|
-
'Checking whether to use the /react subpath or the base package root',
|
|
37
|
-
'Verifying that an import path is valid before writing code',
|
|
38
|
-
'Understanding subpath rules for @genesislcap packages',
|
|
39
|
-
],
|
|
40
|
-
relatedContexts: ['fui-components'],
|
|
41
|
-
content: FUI_IMPORT_SURFACE_CONTEXT,
|
|
42
|
-
tags: FUI_IMPORT_SURFACE_TAGS,
|
|
43
|
-
},
|
|
44
|
-
'fui-components': {
|
|
45
|
-
title: 'FUI Component Overview (navigation + import rules)',
|
|
46
|
-
description: 'Import path rules, react.d.ts / types.d.ts VFS key table, Genesis docs URLs, page-level layout patterns, and key rules that apply to all components. Load this when you need the navigation guide for which module to load next, or when no more specific module applies.',
|
|
47
|
-
whenToUse: [
|
|
48
|
-
'Looking up which VFS key to pass to vfs_read for react.d.ts or types.d.ts',
|
|
49
|
-
'Checking which package to import a component from (overview only)',
|
|
50
|
-
'Page-level layout pattern (genx-generated route vs showcase/custom page)',
|
|
51
|
-
],
|
|
52
|
-
relatedContexts: [
|
|
53
|
-
'fui-entity-management',
|
|
54
|
-
'fui-rapid-grid-pro',
|
|
55
|
-
'fui-chart',
|
|
56
|
-
'fui-form-component',
|
|
57
|
-
'fui-dialogs',
|
|
58
|
-
'fui-primitives',
|
|
59
|
-
],
|
|
60
|
-
dependsOn: FUI_COMPONENTS_DEPS,
|
|
61
|
-
content: FUI_COMPONENTS_CONTEXT,
|
|
62
|
-
tags: FUI_COMPONENTS_TAGS,
|
|
63
|
-
},
|
|
64
|
-
'fui-entity-management': {
|
|
65
|
-
title: 'EntityManagement — Full CRUD Grid',
|
|
66
|
-
description: 'Complete EntityManagement usage: import path, all props (resourceName, createEvent, updateEvent, deleteEvent, columns, formUiSchemas, customActions, entityLabel, modalPosition), key rules, CustomAction type, and type import summary.',
|
|
67
|
-
whenToUse: [
|
|
68
|
-
'Using EntityManagement for a CRUD grid with add/edit/delete modals',
|
|
69
|
-
'Configuring createEvent, updateEvent, deleteEvent on EntityManagement',
|
|
70
|
-
'Adding customActions (callback or event-based) to EntityManagement',
|
|
71
|
-
'Adding a button or toolbar action above an EntityManagement grid (e.g. an "Add X", Export or Refresh button) — use customActions with position: CrudMenuPosition.Top, never a hand-rolled <Button> in a wrapper div',
|
|
72
|
-
'Resolving TS2322 prop type errors on EntityManagement',
|
|
73
|
-
'Looking up which resourceName (Query) to use on EntityManagement',
|
|
74
|
-
],
|
|
75
|
-
relatedContexts: ['fui-column-defs', 'fui-form-component', 'fui-inline-editing'],
|
|
76
|
-
dependsOn: FUI_ENTITY_MANAGEMENT_DEPS,
|
|
77
|
-
content: FUI_ENTITY_MANAGEMENT_CONTEXT,
|
|
78
|
-
tags: FUI_ENTITY_MANAGEMENT_TAGS,
|
|
79
|
-
},
|
|
80
|
-
'fui-rapid-grid-pro': {
|
|
81
|
-
title: 'RapidGridPro — Read-Only / Server-Side Grid',
|
|
82
|
-
description: 'RapidGridPro with GridProGenesisDatasource: import paths, deferredGridOptions placement (on datasource, NOT on RapidGridPro), resourceName camelCase rule, column definition wiring via GridProColumn, and type import summary.',
|
|
83
|
-
whenToUse: [
|
|
84
|
-
'Using RapidGridPro for a read-only or server-side-scrolling grid',
|
|
85
|
-
'Configuring GridProGenesisDatasource with resourceName and deferredGridOptions',
|
|
86
|
-
'Wiring GridProColumn with ColDef definitions',
|
|
87
|
-
'Diagnosing a RapidGridPro that ignores gridOptions (deferredGridOptions placement error)',
|
|
88
|
-
],
|
|
89
|
-
relatedContexts: ['fui-column-defs', 'fui-inline-editing'],
|
|
90
|
-
dependsOn: FUI_RAPID_GRID_PRO_DEPS,
|
|
91
|
-
content: FUI_RAPID_GRID_PRO_CONTEXT,
|
|
92
|
-
tags: FUI_RAPID_GRID_PRO_TAGS,
|
|
93
|
-
},
|
|
94
|
-
'fui-chart': {
|
|
95
|
-
title: 'G2PlotChart / ChartDatasource',
|
|
96
|
-
description: 'G2PlotChart and ChartDatasource: all supported chart types, serverFields/chartFields mapping rules, config field names per chart type (xField, yField, colorField, angleField, seriesField), sizing rules (definite height / autoFit grow loop), legend and Rapid palette defaults, BIGDECIMAL/numeric field handling, and complete examples for line, pie, scatter, and multi-series column charts.',
|
|
97
|
-
whenToUse: [
|
|
98
|
-
'Using G2PlotChart with ChartDatasource for any chart type',
|
|
99
|
-
'Configuring serverFields and chartFields on ChartDatasource',
|
|
100
|
-
'Building a line, bar, column, pie, donut, scatter, or multi-series chart',
|
|
101
|
-
'Adding advanced G2Plot config (animations, label formatters, axes, tooltips, legend)',
|
|
102
|
-
'Chart sizing issues: 0px height, infinite grow/resize, canvas overlaying the page',
|
|
103
|
-
'Charting numeric server fields (INT/LONG/DOUBLE/BIGDECIMAL) or criteria-filtered data',
|
|
104
|
-
],
|
|
105
|
-
relatedContexts: ['fui-dashboard'],
|
|
106
|
-
dependsOn: FUI_CHART_DEPS,
|
|
107
|
-
content: FUI_CHART_CONTEXT,
|
|
108
|
-
tags: FUI_CHART_TAGS,
|
|
109
|
-
},
|
|
110
|
-
'fui-form-component': {
|
|
111
|
-
title: 'Form Component + UiSchema Renderer Catalog',
|
|
112
|
-
description: 'THE module for any data-entry form — a modal, pop-up or page where the user fills in fields and submits. Form React component props (prefix, resourceName, uischema), full UiSchema renderer/layout type catalog, critical childElements placement rule (on element.options, never on root options), Categorization/Stepper/Group examples with correct nesting, and all element-level options.',
|
|
113
|
-
whenToUse: [
|
|
114
|
-
'ANY screen or modal where the user fills in fields and submits them — create, edit, amend, book, respond with values',
|
|
115
|
-
'Deciding between a platform Form and hand-wiring inputs with your own commitEvent submit',
|
|
116
|
-
'A pop-up / dialog / modal that collects user input before sending it to the server',
|
|
117
|
-
'Pre-filling inputs from a selected grid row, or hiding a field that must still be submitted',
|
|
118
|
-
'Using the Form component from @genesislcap/foundation-forms/react',
|
|
119
|
-
'Building a UiSchema for VerticalLayout, HorizontalLayout, Categorization, Stepper, or Group',
|
|
120
|
-
'Diagnosing incorrect childElements placement (TS error or blank form section)',
|
|
121
|
-
'Checking available element-level options (readonly, hidden, tooltip, connected lookup, etc.)',
|
|
122
|
-
'Understanding the correct scope path pattern (#/properties/FIELD)',
|
|
123
|
-
],
|
|
124
|
-
relatedContexts: [
|
|
125
|
-
'fui-column-defs',
|
|
126
|
-
'fui-entity-management',
|
|
127
|
-
'fui-custom-renderer',
|
|
128
|
-
'fui-dialogs',
|
|
129
|
-
],
|
|
130
|
-
dependsOn: FUI_FORM_COMPONENT_DEPS,
|
|
131
|
-
content: FUI_FORM_COMPONENT_CONTEXT,
|
|
132
|
-
tags: FUI_FORM_COMPONENT_TAGS,
|
|
133
|
-
},
|
|
134
|
-
'fui-dialogs': {
|
|
135
|
-
title: 'Dialog / Modal / Flyout (Imperative Ref API)',
|
|
136
|
-
description: 'Dialog, Modal, and Flyout components: imperative ref API (show/close/hide), ref type imports (DialogRef, ModalRef, FlyoutRef), props (position, showCloseIcon, draggable, onClose), and the critical anti-pattern: open prop is a read-only @volatile getter — never pass it as a JSX prop.',
|
|
137
|
-
whenToUse: [
|
|
138
|
-
'Using Dialog, Modal, or Flyout from rapid-design-system',
|
|
139
|
-
'Opening or closing a dialog/modal programmatically via a ref',
|
|
140
|
-
'Diagnosing a dialog that never appears (open prop silent no-op)',
|
|
141
|
-
'Choosing between Dialog (non-blocking) vs Modal (locks background)',
|
|
142
|
-
'Deciding what goes inside a modal that collects user input (see fui-form-component)',
|
|
143
|
-
],
|
|
144
|
-
relatedContexts: ['fui-flyout-panel', 'fui-form-component'],
|
|
145
|
-
dependsOn: FUI_DIALOGS_DEPS,
|
|
146
|
-
content: FUI_DIALOGS_CONTEXT,
|
|
147
|
-
tags: FUI_DIALOGS_TAGS,
|
|
148
|
-
},
|
|
149
|
-
'fui-primitives': {
|
|
150
|
-
title: 'Rapid Design-System Primitives + WC Interop',
|
|
151
|
-
description: 'All rapid-design-system React wrappers except Dialog/Modal/Flyout: Button (valid appearance values), TextField/TextArea/NumberField, Select+ListboxOption, Checkbox/Switch/Radio, Tabs/Tab/TabPanel (sibling rule), Stepper, DatePicker, Multiselect, FileUpload, Icon, Snackbar, etc. Also covers populating a Select/Combobox/Multiselect dropdown or filter with options loaded from a Genesis resource/server data via OptionsDatasource/MultiselectDatasource (server-backed options, static data, async + infinite scroll, auto-formatted DATE/DATETIME labels) instead of a hand-rolled getConnect/snapshot/stream fetch. Plus WC/React interop boundary rules and dangerous patterns DP-2 (onChange Event type), DP-3 (bare package import), DP-4 (option vs ListboxOption), DP-5 (TabPanel nesting), DP-6 (deprecated ControlWrapper), DP-11..DP-15 (datasource wiring).',
|
|
152
|
-
whenToUse: [
|
|
153
|
-
'Using Button, TextField, Select, Checkbox, Tabs, DatePicker, or any other rapid-design-system primitive — NOT for a button placed above or inside an EntityManagement grid (toolbar or row action): see fui-entity-management customActions + CrudMenuPosition.Top instead',
|
|
154
|
-
'Populating a Select, Combobox, or Multiselect dropdown/filter with options loaded from server data (options-datasource / multiselect-datasource)',
|
|
155
|
-
'Building a dropdown or filter whose choices come from a Genesis resource — distinct values, dates, or reference data',
|
|
156
|
-
'Avoiding a hand-rolled getConnect()/snapshot/streamState fetch (or manual ListboxOption mapping) to fill a dropdown — the cause of an empty dropdown',
|
|
157
|
-
'Diagnosing TS2322 on Button appearance prop (secondary/primary are invalid)',
|
|
158
|
-
'Diagnosing a onChange handler type error on TextField, Select, or NumberField',
|
|
159
|
-
'Building a tab layout with Tabs/Tab/TabPanel',
|
|
160
|
-
'Checking the correct import path for a rapid-design-system component (/react subpath)',
|
|
161
|
-
],
|
|
162
|
-
relatedContexts: [
|
|
163
|
-
'fui-dialogs',
|
|
164
|
-
'fui-components',
|
|
165
|
-
'fui-foundation-comms',
|
|
166
|
-
'fui-entity-management',
|
|
167
|
-
],
|
|
168
|
-
dependsOn: FUI_PRIMITIVES_DEPS,
|
|
169
|
-
content: FUI_PRIMITIVES_CONTEXT,
|
|
170
|
-
tags: FUI_PRIMITIVES_TAGS,
|
|
171
|
-
},
|
|
172
|
-
'fui-eventing': {
|
|
173
|
-
title: 'Inter-Tile Eventing',
|
|
174
|
-
description: 'Redux-based pub-sub patterns for cross-tile row-selection events, filtering cascades, master-detail setups, and custom Redux slice creation. Covers both built-in tile publishEventName / listener config and custom eventing.slice.ts patterns.',
|
|
175
|
-
whenToUse: [
|
|
176
|
-
'Implementing cross-tile filtering — clicking a row in one grid filters another',
|
|
177
|
-
'Row-selection in one tile should update a detail panel or another tile',
|
|
178
|
-
'Master-detail patterns where selecting a trade/position drives a sub-grid',
|
|
179
|
-
'Creating a custom Redux slice to share state between tiles',
|
|
180
|
-
'Adding publishEventName or listener config to a tile',
|
|
181
|
-
],
|
|
182
|
-
relatedContexts: ['fui-global-filters', 'fui-layout'],
|
|
183
|
-
dependsOn: ['fui-layout'],
|
|
184
|
-
content: FUI_EVENTING_CONTEXT,
|
|
185
|
-
tags: FUI_EVENTING_TAGS,
|
|
186
|
-
},
|
|
187
|
-
'fui-global-filters': {
|
|
188
|
-
title: 'Shared Filtering (Filters component + Global Filter Bar)',
|
|
189
|
-
description: 'Two approaches to shared filtering: (A) the built-in Filters component from @genesislcap/foundation-forms/react — server-driven, auto-generates filter UI from resourceName schema, outputs a criteria string via onChange — used when a dedicated filter tile should drive all other tiles on a route; (B) the custom Global Filters Redux pattern — hand-written filter UI, CriteriaBuilder slice, GlobalFilters component injected into DefaultLayout — used when a compact filter bar must be always-visible in the app header across all routes.',
|
|
190
|
-
whenToUse: [
|
|
191
|
-
'Adding a Filters component from foundation-forms in a dedicated layout tile',
|
|
192
|
-
'User asks for server-driven filter UI (resourceName, schema from view)',
|
|
193
|
-
'Filter placed in a new layout item that should drive all other tiles on the page',
|
|
194
|
-
'Adding a filter bar that is shared across multiple tiles on a page',
|
|
195
|
-
'Implementing a GlobalFilters component using CriteriaBuilder',
|
|
196
|
-
'Connecting filter state from Redux to a grid or form datasource criteria prop',
|
|
197
|
-
'Global filter bar in the app header visible across all routes',
|
|
198
|
-
],
|
|
199
|
-
relatedContexts: ['fui-eventing', 'fui-components', 'fui-criteria'],
|
|
200
|
-
dependsOn: FUI_GLOBAL_FILTERS_DEPS,
|
|
201
|
-
content: FUI_GLOBAL_FILTERS_CONTEXT,
|
|
202
|
-
tags: FUI_GLOBAL_FILTERS_TAGS,
|
|
203
|
-
},
|
|
204
|
-
'fui-column-defs': {
|
|
205
|
-
title: 'Column Definitions & Form Schemas',
|
|
206
|
-
description: 'ag-Grid ColDef structure, all available cellRenderer types (GridProRendererTypes), cellRendererParams shapes, and foundation-forms UISchema patterns including Categorization, Stepper, and Group layouts.',
|
|
207
|
-
whenToUse: [
|
|
208
|
-
'Writing ColDef arrays for a RapidGridPro or EntityManagement grid',
|
|
209
|
-
'Adding a cellRenderer such as statusPill, boolean, or actionsMenu',
|
|
210
|
-
'Building a form UISchema with Categorization, Stepper, or Group layout',
|
|
211
|
-
'Configuring column visibility, pinning, width, or sorting',
|
|
212
|
-
],
|
|
213
|
-
relatedContexts: [
|
|
214
|
-
'fui-entity-management',
|
|
215
|
-
'fui-rapid-grid-pro',
|
|
216
|
-
'fui-inline-editing',
|
|
217
|
-
'fui-formatters',
|
|
218
|
-
'fui-custom-renderer',
|
|
219
|
-
],
|
|
220
|
-
dependsOn: FUI_COLUMN_DEFS_DEPS,
|
|
221
|
-
content: FUI_COLUMN_DEFS_CONTEXT,
|
|
222
|
-
tags: FUI_COLUMN_DEFS_TAGS,
|
|
223
|
-
},
|
|
224
|
-
'fui-layout': {
|
|
225
|
-
title: 'FlexLayout Route Architecture',
|
|
226
|
-
description: 'Full flexlayout-react route pattern: Model/Layout/TabNode wiring, three layout variants (horizontal, grid, tabs), component naming conventions, CSS height requirements, tile componentMap, and factory function structure.',
|
|
227
|
-
whenToUse: [
|
|
228
|
-
'Creating or editing a route page that uses FlexLayout (multi-panel/tabbed layout)',
|
|
229
|
-
'Adding a new tile to an existing FlexLayout route',
|
|
230
|
-
'Changing the default panel layout (split, grid, tabbed)',
|
|
231
|
-
'Diagnosing a grid or EntityManager that appears empty due to missing height',
|
|
232
|
-
],
|
|
233
|
-
relatedContexts: ['fui-eventing', 'fui-components'],
|
|
234
|
-
content: FUI_LAYOUT_CONTEXT,
|
|
235
|
-
tags: FUI_LAYOUT_TAGS,
|
|
236
|
-
},
|
|
237
|
-
'fui-foundation-comms': {
|
|
238
|
-
title: 'Direct Server Communication',
|
|
239
|
-
description: 'Using the Connect service directly for snapshot, request, commitEvent, and stream calls. Covers DI container pattern, ROW vs REPLY message shapes, DataserverParams, RequestParams, CommitParams, and hook-based usage.',
|
|
240
|
-
whenToUse: [
|
|
241
|
-
'Importing Connect from @genesislcap/foundation-comms for direct server calls',
|
|
242
|
-
'Using snapshot(), request(), commitEvent(), or stream() methods',
|
|
243
|
-
'Understanding ROW vs REPLY message response shapes',
|
|
244
|
-
'Building a custom hook that fetches data outside of a grid datasource',
|
|
245
|
-
],
|
|
246
|
-
relatedContexts: ['fui-components'],
|
|
247
|
-
content: FUI_FOUNDATION_COMMS_CONTEXT,
|
|
248
|
-
tags: FUI_FOUNDATION_COMMS_TAGS,
|
|
249
|
-
},
|
|
250
|
-
'fui-ai-extensions': {
|
|
251
|
-
title: "AI Chat Extensions — the app's own tools, chat widgets and writes (ai/extensions/)",
|
|
252
|
-
description: "The generated app's own AI chat additions in ai/extensions/: the tool shape (a definition and a handler under one name, never req_*/event_*, and the shape faults that block the whole chat), reads through Connect with BigInt-safe results, chat widgets through requestInteraction (the interaction-completed contract, one at a time, timeout and Stop), writes that show a review first by default and re-read the row before committing, the write traps (a NACK resolves, VALIDATE commits, epoch millis, field sizes), and systemPrompt rules. No secrets and no AI vendor calls.",
|
|
253
|
-
whenToUse: [
|
|
254
|
-
"Adding a tool, a chat widget or a system prompt rule to the app's AI chat (ai/extensions/)",
|
|
255
|
-
'Writing a chat tool that changes data, or one that shows a review before it writes',
|
|
256
|
-
'Showing a custom element or a grid inside the AI chat with requestInteraction',
|
|
257
|
-
],
|
|
258
|
-
relatedContexts: ['fui-foundation-comms', 'fui-rapid-grid-pro'],
|
|
259
|
-
dependsOn: FUI_AI_EXTENSIONS_DEPS,
|
|
260
|
-
content: FUI_AI_EXTENSIONS_CONTEXT,
|
|
261
|
-
tags: FUI_AI_EXTENSIONS_TAGS,
|
|
262
|
-
},
|
|
263
|
-
'fui-inline-editing': {
|
|
264
|
-
title: 'Inline Cell Editing',
|
|
265
|
-
description: 'Enabling editable cells in EntityManagement and standalone RapidGridPro: editable ColDef properties, cellEditor types, cellEditorParams shapes, enum vs FK reference handling, and auto-commit internals.',
|
|
266
|
-
whenToUse: [
|
|
267
|
-
'Enabling cell editing inside a grid (EntityManagement or RapidGridPro)',
|
|
268
|
-
'Configuring editable: true on a ColDef with a cellEditor',
|
|
269
|
-
'Setting up enum or foreign-key dropdown editors in a cell',
|
|
270
|
-
'Wiring auto-commit or manual commit on cell value change',
|
|
271
|
-
],
|
|
272
|
-
relatedContexts: ['fui-column-defs', 'fui-entity-management', 'fui-rapid-grid-pro'],
|
|
273
|
-
dependsOn: FUI_INLINE_EDITING_DEPS,
|
|
274
|
-
content: FUI_INLINE_EDITING_CONTEXT,
|
|
275
|
-
tags: FUI_INLINE_EDITING_TAGS,
|
|
276
|
-
},
|
|
277
|
-
'fui-error-boundary': {
|
|
278
|
-
title: 'Error Boundaries',
|
|
279
|
-
description: 'TileErrorBoundary and withTileErrorBoundary HOC: when to apply them (standalone components NOT already in componentMap), when to skip (route tiles wrapped by factory), import depth rules, and recovery patterns.',
|
|
280
|
-
whenToUse: [
|
|
281
|
-
'Wrapping a new standalone custom component in TileErrorBoundary',
|
|
282
|
-
'Using withTileErrorBoundary HOC on a component rendered outside the route factory',
|
|
283
|
-
'Determining whether a tile component needs its own error boundary',
|
|
284
|
-
],
|
|
285
|
-
relatedContexts: ['fui-components', 'fui-layout'],
|
|
286
|
-
content: FUI_ERROR_BOUNDARY_CONTEXT,
|
|
287
|
-
tags: FUI_ERROR_BOUNDARY_TAGS,
|
|
288
|
-
},
|
|
289
|
-
'fui-styling': {
|
|
290
|
-
title: 'CSS & Styling (incl. z-index / stacking-context layering)',
|
|
291
|
-
description: 'Design-system CSS custom properties (color, spacing, elevation tokens), safe CSS additions, what NOT to override (card background, box-shadow, border), and calc() / --design-unit usage rules. Also the LAYERING rules: why a Select/DatePicker/Multiselect popup renders behind a neighbouring strip or gets clipped, what silently creates a stacking context (position: sticky always does), the app z-index ladder (flyout 2000+, foundation-header 999, FlexLayout 100, page shell 200), and the one-z-index-per-page-shell rule.',
|
|
292
|
-
whenToUse: [
|
|
293
|
-
'Writing CSS for a component or route page',
|
|
294
|
-
'Using design tokens for color, spacing, or elevation (--design-unit, --neutral-fill-rest, etc.)',
|
|
295
|
-
'Applying theming-safe styles that work in both dark and light mode',
|
|
296
|
-
'Diagnosing a CSS property that appears to have no effect',
|
|
297
|
-
'Writing page-shell CSS that stacks a filter row, KPI strip, banner or toolbar above a FlexLayout container',
|
|
298
|
-
'Adding position or z-index to any container that holds a Select, DatePicker, Multiselect or Combobox',
|
|
299
|
-
'A dropdown, calendar or popup renders behind another element, is cut off, or its options are not clickable',
|
|
300
|
-
],
|
|
301
|
-
relatedContexts: [
|
|
302
|
-
'fui-components',
|
|
303
|
-
'fui-dashboard',
|
|
304
|
-
'fui-global-filters',
|
|
305
|
-
'fui-flexlayout',
|
|
306
|
-
'fui-layout',
|
|
307
|
-
],
|
|
308
|
-
content: FUI_STYLING_CONTEXT,
|
|
309
|
-
tags: FUI_STYLING_TAGS,
|
|
310
|
-
},
|
|
311
|
-
'fui-blotter': {
|
|
312
|
-
title: 'Trade Blotter / Order Management',
|
|
313
|
-
description: 'Architecture patterns for trade blotter and order management pages: two-tile master-detail layout (trades + positions/fills), standard column checklist with correct renderers (statusPill for SIDE/STATUS), inline editing guidance, criteria pre-filtering, cross-tile eventing setup, and standard column widths.',
|
|
314
|
-
whenToUse: [
|
|
315
|
-
'Building a trade blotter, order management, or order book page',
|
|
316
|
-
'Two-tile layout where selecting a trade/order drives a positions or fills grid',
|
|
317
|
-
'Standard trade columns: TRADE_ID, SIDE, QUANTITY, PRICE, STATUS, TRADE_DATE',
|
|
318
|
-
"Pre-filtering a grid by user's book or desk using a criteria string",
|
|
319
|
-
'Trade capture or order entry screens with master-detail grids',
|
|
320
|
-
],
|
|
321
|
-
relatedContexts: ['fui-column-defs', 'fui-eventing', 'fui-layout', 'fui-inline-editing'],
|
|
322
|
-
dependsOn: FUI_BLOTTER_DEPS,
|
|
323
|
-
content: FUI_BLOTTER_CONTEXT,
|
|
324
|
-
tags: FUI_BLOTTER_TAGS,
|
|
325
|
-
},
|
|
326
|
-
'fui-reporting': {
|
|
327
|
-
title: 'Read-Only Reporting Grids',
|
|
328
|
-
description: 'Patterns for read-only reporting grids: snapshot datasource config, hiding all edit actions, date-range criteria filtering, export column setup, aggregation / totals rows, and the key differences from a live blotter grid.',
|
|
329
|
-
whenToUse: [
|
|
330
|
-
'Building a read-only report, audit log, or historical data view',
|
|
331
|
-
'Grid where users should NOT be able to edit or delete rows',
|
|
332
|
-
'Adding CSV/Excel export to a grid without edit actions',
|
|
333
|
-
'Date-range filtering for historical trade or position data',
|
|
334
|
-
'Adding a totals or aggregation row at the bottom of a grid',
|
|
335
|
-
],
|
|
336
|
-
relatedContexts: ['fui-column-defs', 'fui-layout', 'fui-global-filters', 'fui-rapid-grid-pro'],
|
|
337
|
-
dependsOn: FUI_REPORTING_DEPS,
|
|
338
|
-
content: FUI_REPORTING_CONTEXT,
|
|
339
|
-
tags: FUI_REPORTING_TAGS,
|
|
340
|
-
},
|
|
341
|
-
'fui-dashboard': {
|
|
342
|
-
title: 'Dashboard / Overview Pages',
|
|
343
|
-
description: 'Multi-tile dashboard layout patterns: KPI card component with design-token CSS, G2PlotChart tile setup, KPI strip above FlexLayout CSS fix (flex column + min-height: 0), Connect request for KPI data, and layout shape guidance for 2–4 tile dashboards.',
|
|
344
|
-
whenToUse: [
|
|
345
|
-
'Building a dashboard, overview, or summary page',
|
|
346
|
-
'KPI cards / metric cards showing aggregated values',
|
|
347
|
-
'Chart tiles using G2PlotChart (Line, Bar, Column, Pie, etc.)',
|
|
348
|
-
'Mixed layout with both charts and a summary grid',
|
|
349
|
-
'Landing or home page with a summary strip above a panel layout',
|
|
350
|
-
],
|
|
351
|
-
relatedContexts: [
|
|
352
|
-
'fui-layout',
|
|
353
|
-
'fui-flexlayout',
|
|
354
|
-
'fui-styling',
|
|
355
|
-
'fui-foundation-comms',
|
|
356
|
-
'fui-reporting',
|
|
357
|
-
],
|
|
358
|
-
dependsOn: FUI_DASHBOARD_DEPS,
|
|
359
|
-
content: FUI_DASHBOARD_CONTEXT,
|
|
360
|
-
tags: FUI_DASHBOARD_TAGS,
|
|
361
|
-
},
|
|
362
|
-
'fui-trade-form': {
|
|
363
|
-
title: 'FoundationForm with Change Handler Map (Trade Entry Pattern)',
|
|
364
|
-
description: 'Complex FoundationForm pattern where each field change triggers dependent field updates: onDataChange event → handler map lookup → async patch → deepMerge. Covers flat and nested form data (MAIN/FLOAT/FIXED sections), dynamic UI schema swapping based on field value, multi-tab Categorization layout, and server commitEvent on submit.',
|
|
365
|
-
whenToUse: [
|
|
366
|
-
'Building a form where changing one field must update others (e.g., NOTIONAL ↔ PREMIUM_AMOUNT)',
|
|
367
|
-
'Trade entry forms, RFQ forms, order entry forms with field interdependencies',
|
|
368
|
-
'Forms with async server calls triggered by field changes (e.g., date calculation, template fetch)',
|
|
369
|
-
'Multi-section nested forms (MAIN, FLOAT, FIXED leg data)',
|
|
370
|
-
'Dynamic UI schema that swaps based on a field value (e.g., instrument type)',
|
|
371
|
-
'Multi-tab form using Categorization UISchema',
|
|
372
|
-
],
|
|
373
|
-
relatedContexts: [
|
|
374
|
-
'fui-form-component',
|
|
375
|
-
'fui-foundation-comms',
|
|
376
|
-
'fui-flyout-panel',
|
|
377
|
-
'fui-custom-renderer',
|
|
378
|
-
],
|
|
379
|
-
dependsOn: FUI_TRADE_FORM_DEPS,
|
|
380
|
-
content: FUI_TRADE_FORM_CONTEXT,
|
|
381
|
-
tags: FUI_TRADE_FORM_TAGS,
|
|
382
|
-
},
|
|
383
|
-
'fui-flyout-panel': {
|
|
384
|
-
title: 'Flyout Panel with Multi-Step Form Navigation',
|
|
385
|
-
description: 'Flyout (slide-in side panel) containing a multi-step form workflow: Step 1 (quick entry) → Step 2 (full ticket) → back. Covers Flyout component usage, cross-form data mapping (submit Step 1 → fetch composite → pre-fill Step 2), restoring Step 1 state on back navigation, and mounting flyout always-on at layout level.',
|
|
386
|
-
whenToUse: [
|
|
387
|
-
'Building a slide-in panel or drawer containing a form',
|
|
388
|
-
'Multi-step form where Step 1 submits and Step 2 opens with server data',
|
|
389
|
-
'"Back to quick entry" navigation from a full form back to a simpler form',
|
|
390
|
-
'Right-side trading panel, RFQ entry panel, or order entry drawer',
|
|
391
|
-
'Multiple independent flyouts in the same layout (trading + desk panels)',
|
|
392
|
-
],
|
|
393
|
-
relatedContexts: [
|
|
394
|
-
'fui-trade-form',
|
|
395
|
-
'fui-dialogs',
|
|
396
|
-
'fui-form-component',
|
|
397
|
-
'fui-foundation-comms',
|
|
398
|
-
'fui-eventing',
|
|
399
|
-
],
|
|
400
|
-
dependsOn: FUI_FLYOUT_PANEL_DEPS,
|
|
401
|
-
content: FUI_FLYOUT_PANEL_CONTEXT,
|
|
402
|
-
tags: FUI_FLYOUT_PANEL_TAGS,
|
|
403
|
-
},
|
|
404
|
-
'fui-custom-renderer': {
|
|
405
|
-
title: 'Custom FoundationForm Renderer Entries',
|
|
406
|
-
description: 'Building a bespoke input control for FoundationForm: RendererEntry structure (renderer + tester + mapper), rankWith tester with options-flag detection, React ControlProps interface, handleChange(path, value) contract, and real examples (date+gap pair, currency+notional pair).',
|
|
407
|
-
whenToUse: [
|
|
408
|
-
'Adding a custom input widget to a FoundationForm field',
|
|
409
|
-
'A form field needs two linked inputs (e.g., tenor gap text + date picker)',
|
|
410
|
-
'A field requires a popup picker or non-standard control (e.g., counterparty selector)',
|
|
411
|
-
'Overriding how a specific field is rendered inside a FoundationForm',
|
|
412
|
-
'Writing a rendererEntry with rankWith tester',
|
|
413
|
-
],
|
|
414
|
-
relatedContexts: ['fui-trade-form', 'fui-form-component'],
|
|
415
|
-
dependsOn: FUI_CUSTOM_RENDERER_DEPS,
|
|
416
|
-
content: FUI_CUSTOM_RENDERER_CONTEXT,
|
|
417
|
-
tags: FUI_CUSTOM_RENDERER_TAGS,
|
|
418
|
-
},
|
|
419
|
-
'fui-formatters': {
|
|
420
|
-
title: 'Formatters, Parsers & Serializers (foundation-utils)',
|
|
421
|
-
description: 'Plain TypeScript number/date formatting and parsing utilities from @genesislcap/foundation-utils (no /react subpath): getNumberFormatter (numeral.js format strings, BIGDECIMAL-aware, usable as an ag-Grid valueFormatter), getDateFormatter, formatTimestamp / formatDateTimestamp / formatDateTimeTimestamp(WithMilliseconds), and NumberParser / customNumberParser for locale-aware parsing.',
|
|
422
|
-
whenToUse: [
|
|
423
|
-
'Adding a valueFormatter to a ColDef to display numbers, currency, percentages, or dates',
|
|
424
|
-
'Formatting a server BIGDECIMAL or numeric field for display',
|
|
425
|
-
'Converting a unix/epoch timestamp into a formatted date or date-time string',
|
|
426
|
-
'Parsing user-entered locale-formatted numbers back into raw numeric values',
|
|
427
|
-
'Choosing the correct numeral.js format string for a price, amount, or rate column',
|
|
428
|
-
],
|
|
429
|
-
relatedContexts: ['fui-column-defs', 'fui-chart', 'fui-form-component'],
|
|
430
|
-
dependsOn: FUI_FORMATTERS_DEPS,
|
|
431
|
-
content: FUI_FORMATTERS_CONTEXT,
|
|
432
|
-
tags: FUI_FORMATTERS_TAGS,
|
|
433
|
-
},
|
|
434
|
-
'fui-flexlayout': {
|
|
435
|
-
title: 'FlexLayout-React — Multi-Panel Layout',
|
|
436
|
-
description: 'flexlayout-react@0.8.19 multi-panel / dockable / resizable layout API (this app uses flexlayout-react, NOT foundation-layout): Model / Layout / TabNode / Actions / DockLocation, the factory function pattern, IJsonModel JSON structure, tabEnableRenderOnDemand (set false for tiles holding live WebSocket connections), onModelChange persistence, and theme stylesheet import.',
|
|
437
|
-
whenToUse: [
|
|
438
|
-
'Creating or editing a multi-panel, split, tabbed, or dockable layout',
|
|
439
|
-
'Wiring a flexlayout-react Model with a factory function mapping component strings to tiles',
|
|
440
|
-
'Adding, deleting, or rearranging panels via Actions / model.doAction',
|
|
441
|
-
'Persisting layout state with onModelChange / model.toJson()',
|
|
442
|
-
'Preventing tile mount/unmount on tab switch (tabEnableRenderOnDemand: false)',
|
|
443
|
-
],
|
|
444
|
-
relatedContexts: ['fui-layout', 'fui-dashboard', 'fui-eventing'],
|
|
445
|
-
content: FUI_FLEXLAYOUT_CONTEXT,
|
|
446
|
-
tags: FUI_FLEXLAYOUT_TAGS,
|
|
447
|
-
},
|
|
448
|
-
'fui-notifications': {
|
|
449
|
-
title: 'Notifications (toast / snackbar / banner / dialog / alert)',
|
|
450
|
-
description: 'foundation-notifications imperative API (no /react subpath, no JSX): showNotificationToast, showNotificationSnackbar, showNotificationBanner, showNotificationDialog, showNotificationAlert, showNotification, configureNotifications, and sortNotificationBySeverity. The design-system prefix ("rapid") is the second argument. Covers structure types, positioning, auto-close, severity, and action buttons.',
|
|
451
|
-
whenToUse: [
|
|
452
|
-
'Showing a toast, snackbar, banner, or alert message to the user',
|
|
453
|
-
'Displaying a success / error / warning / info notification from an event handler',
|
|
454
|
-
'Showing a confirmation dialog before an action',
|
|
455
|
-
'Configuring notification position, auto-close, or stacking via configureNotifications',
|
|
456
|
-
'Adding action buttons to a notification',
|
|
457
|
-
],
|
|
458
|
-
relatedContexts: ['fui-dialogs', 'fui-primitives'],
|
|
459
|
-
content: FUI_NOTIFICATIONS_CONTEXT,
|
|
460
|
-
tags: FUI_NOTIFICATIONS_TAGS,
|
|
461
|
-
},
|
|
462
|
-
'fui-redux-store': {
|
|
463
|
-
title: 'Redux Store (foundation-redux + foundation-store)',
|
|
464
|
-
description: 'The two complementary state systems in this app: foundation-redux (Redux Toolkit wrapper — createStore, createSlice, PayloadAction, pre-bound actions, selectors, subscribe/subscribeKey, react-redux Provider + useSelector) for shared/cross-tile state and eventing; and foundation-store (DI singleton service state with FAST Observable integration) for service/auth/connection status. Includes the critical never-useDispatch rule (actions are pre-bound).',
|
|
465
|
-
whenToUse: [
|
|
466
|
-
'Creating a Redux slice to share state across tiles',
|
|
467
|
-
'Wiring createStore and a react-redux Provider into a route or app',
|
|
468
|
-
'Reading shared state with useSelector and dispatching pre-bound actions',
|
|
469
|
-
'Choosing between foundation-redux (tile/shared state) and foundation-store (DI service state)',
|
|
470
|
-
'Subscribing to store changes via subscribe / subscribeKey',
|
|
471
|
-
],
|
|
472
|
-
relatedContexts: ['fui-eventing', 'fui-global-filters'],
|
|
473
|
-
content: FUI_REDUX_STORE_CONTEXT,
|
|
474
|
-
tags: FUI_REDUX_STORE_TAGS,
|
|
475
|
-
},
|
|
476
|
-
'fui-criteria': {
|
|
477
|
-
title: 'Criteria / Expression Builder',
|
|
478
|
-
description: 'foundation-criteria + foundation-ui criteria APIs (no /react subpath on foundation-criteria): CriteriaBuilder / ExpressionBuilder / Serialisers / Join for programmatically assembling criteria strings, getCriteriaBuilder / AvailableOption / INPUT_MIN_LENGTH for the EntityManagement search bar (enableSearchBar + searchBarConfig), and SegmentedControl / SegmentedItem (rapid-design-system/react) for React segmented filter UIs. Complements fui-global-filters (which provides the filter UI components).',
|
|
479
|
-
whenToUse: [
|
|
480
|
-
'Building a criteria string programmatically in a Redux selector or event handler',
|
|
481
|
-
'Wiring the EntityManagement search bar with enableSearchBar + searchBarConfig',
|
|
482
|
-
'Rendering a React segmented filter control (SegmentedControl / SegmentedItem)',
|
|
483
|
-
'Assembling SIDE/TRADE_DATE-style expressions to pass to a datasource criteria prop',
|
|
484
|
-
'Using getCriteriaBuilder / AvailableOption for quick entity search',
|
|
485
|
-
],
|
|
486
|
-
relatedContexts: ['fui-global-filters', 'fui-eventing', 'fui-entity-management'],
|
|
487
|
-
dependsOn: FUI_CRITERIA_DEPS,
|
|
488
|
-
content: FUI_CRITERIA_CONTEXT,
|
|
489
|
-
tags: FUI_CRITERIA_TAGS,
|
|
490
|
-
},
|
|
491
|
-
};
|
|
492
|
-
/**
|
|
493
|
-
* True if `name` is a real context module that read_context can load. Used to
|
|
494
|
-
* validate planner-supplied requiredContextModules before they reach the
|
|
495
|
-
* vfs_snapshot gate — an unknown name there can never be loaded, so the gate
|
|
496
|
-
* would reject the snapshot forever (snapshot↔read_context loop).
|
|
497
|
-
*/
|
|
498
|
-
export function isKnownContext(name) {
|
|
499
|
-
return name in CONTEXT_REGISTRY;
|
|
500
|
-
}
|
|
501
|
-
/**
|
|
502
|
-
* One module from the default pack, or `undefined` for an unknown name. For hosts and tests that
|
|
503
|
-
* need a module's text without going through `read_context`. One argument, so it is safe to pass
|
|
504
|
-
* point-free (`names.map(getContextModule)`).
|
|
505
|
-
* @beta
|
|
506
|
-
*/
|
|
507
|
-
export function getContextModule(name) {
|
|
508
|
-
return CONTEXT_REGISTRY[name];
|
|
509
|
-
}
|
|
510
|
-
/** The default Genesis web pack, plus a host's own modules (FUI-2650). */
|
|
511
|
-
function registryWith(extraModules) {
|
|
512
|
-
if (extraModules.length === 0)
|
|
513
|
-
return CONTEXT_REGISTRY;
|
|
514
|
-
return Object.assign(Object.assign({}, CONTEXT_REGISTRY), Object.fromEntries(extraModules.map((_a) => {
|
|
515
|
-
var { name } = _a, entry = __rest(_a, ["name"]);
|
|
516
|
-
return [name, entry];
|
|
517
|
-
})));
|
|
518
|
-
}
|
|
519
|
-
/**
|
|
520
|
-
* Names of every module in the default Genesis web pack.
|
|
521
|
-
* @beta
|
|
522
|
-
*/
|
|
523
|
-
export const GENESIS_WEB_RULE_MODULE_NAMES = Object.keys(CONTEXT_REGISTRY);
|
|
524
|
-
/**
|
|
525
|
-
* How many dependency modules one read_context response may carry, and the total
|
|
526
|
-
* dependency content it may carry. The widest dependsOn list is fui-dashboard's three
|
|
527
|
-
* (fui-styling + fui-chart + fui-flexlayout). fui-styling alone grew past 45k chars once
|
|
528
|
-
* GENC-1560's container-chrome/token rules landed in it — this cap was measured at ~93k
|
|
529
|
-
* for the same three modules before that, so it is raised here with real headroom rather
|
|
530
|
-
* than left to silently start dropping a dependency on the next content edit to any of the
|
|
531
|
-
* three (GENC-1560: this exact drop reproduced during that work — fui-styling, listed last
|
|
532
|
-
* in FUI_DASHBOARD_DEPS at the time, fell into `omitted` the moment the combined total
|
|
533
|
-
* crossed 100k). fui-styling is now ALSO ordered first in FUI_DASHBOARD_DEPS so that even
|
|
534
|
-
* if a future edit pushes the total back over budget, the module actually needed for
|
|
535
|
-
* styling correctness is never the one silently dropped — fui-chart / fui-flexlayout are
|
|
536
|
-
* large reference material that degrades gracefully if the model reads them itself instead.
|
|
537
|
-
* Over-budget dependencies are NAMED in the response rather than dropped silently, so the
|
|
538
|
-
* model can still read_context them itself.
|
|
539
|
-
*/
|
|
540
|
-
export const MAX_DEPENDENCY_CONTEXT_MODULES = 4;
|
|
541
|
-
export const MAX_DEPENDENCY_CONTEXT_CHARS = 150000;
|
|
542
|
-
/**
|
|
543
|
-
* GENC-1560 — the dependsOn edges, resolved to actual content.
|
|
544
|
-
*
|
|
545
|
-
* Until now `dependsOn` was inert: read_context returned only the module it was asked for
|
|
546
|
-
* and read_contextIndex merely listed the names, so a module could declare a dependency the
|
|
547
|
-
* agent never received. That is exactly how fui-styling stayed invisible to the agent that
|
|
548
|
-
* writes CSS: fui-dashboard has declared 'fui-styling' as a dependency all along (its
|
|
549
|
-
* layering rules are why the KPI-strip-over-FlexLayout shape works), and reading
|
|
550
|
-
* fui-dashboard delivered none of it.
|
|
551
|
-
*
|
|
552
|
-
* DEPTH 1 — direct dependencies only, never dependencies-of-dependencies. Depth 1 makes the
|
|
553
|
-
* payload trivially bounded and provably cycle-free (there is no recursion to loop): the
|
|
554
|
-
* declared graph already contains a cycle, fui-column-defs ⇄ fui-formatters, which any
|
|
555
|
-
* deeper walk would have to special-case. A depth-2 walk from fui-blotter would also pull
|
|
556
|
-
* eight modules / ~200k chars for one read — far past the point where attaching beats
|
|
557
|
-
* letting the model ask. Self-references and unknown names are skipped.
|
|
558
|
-
*
|
|
559
|
-
* The budget is a parameter so the overflow path can be exercised: with the real caps no
|
|
560
|
-
* declared dependsOn list comes close, yet that path is the whole point of the guard (the
|
|
561
|
-
* silent drop it replaces is the incident above), so it must be provable rather than assumed.
|
|
562
|
-
*/
|
|
563
|
-
export function resolveContextDependencies(name, budget = {}, registry = CONTEXT_REGISTRY) {
|
|
564
|
-
var _a, _b, _c, _d;
|
|
565
|
-
const maxModules = (_a = budget.maxModules) !== null && _a !== void 0 ? _a : MAX_DEPENDENCY_CONTEXT_MODULES;
|
|
566
|
-
const maxChars = (_b = budget.maxChars) !== null && _b !== void 0 ? _b : MAX_DEPENDENCY_CONTEXT_CHARS;
|
|
567
|
-
const declared = (_d = (_c = registry[name]) === null || _c === void 0 ? void 0 : _c.dependsOn) !== null && _d !== void 0 ? _d : [];
|
|
568
|
-
const dependencies = [];
|
|
569
|
-
const omitted = [];
|
|
570
|
-
const seen = new Set([name]);
|
|
571
|
-
let chars = 0;
|
|
572
|
-
for (const dep of declared) {
|
|
573
|
-
if (seen.has(dep))
|
|
574
|
-
continue;
|
|
575
|
-
seen.add(dep);
|
|
576
|
-
const entry = registry[dep];
|
|
577
|
-
if (!entry)
|
|
578
|
-
continue;
|
|
579
|
-
const overBudget = dependencies.length >= maxModules || chars + entry.content.length > maxChars;
|
|
580
|
-
if (overBudget) {
|
|
581
|
-
omitted.push(dep);
|
|
582
|
-
continue;
|
|
583
|
-
}
|
|
584
|
-
chars += entry.content.length;
|
|
585
|
-
dependencies.push({ name: dep, title: entry.title, content: entry.content });
|
|
586
|
-
}
|
|
587
|
-
return { dependencies, omitted };
|
|
588
|
-
}
|
|
589
|
-
/**
|
|
590
|
-
* P5-2: Semantic context search — ranks all modules by relevance to a free-text query.
|
|
591
|
-
* Scores each module by counting query-word matches across title (×3), tags (×4),
|
|
592
|
-
* description (×2), and whenToUse entries (×1). Returns modules above threshold sorted
|
|
593
|
-
* by descending score. Handles paraphrased / non-developer vocabulary better than a
|
|
594
|
-
* plain tag-exact-match scan.
|
|
595
|
-
*/
|
|
596
|
-
/** Per-word match weights for {@link searchContextModules}. */
|
|
597
|
-
const SEARCH_WEIGHT = { title: 3, tags: 4, description: 2, whenToUse: 1 };
|
|
598
|
-
export function searchContextModules(query) {
|
|
599
|
-
return searchRegistry(query, CONTEXT_REGISTRY);
|
|
600
|
-
}
|
|
601
|
-
/**
|
|
602
|
-
* Ranks the modules of one registry. Kept off the public one-argument functions on purpose:
|
|
603
|
-
* hosts pass those point-free (`names.filter(isKnownContext)`), so an optional second parameter
|
|
604
|
-
* would receive the array index.
|
|
605
|
-
*/
|
|
606
|
-
function searchRegistry(query, registry) {
|
|
607
|
-
const words = query
|
|
608
|
-
.toLowerCase()
|
|
609
|
-
.split(/\W+/)
|
|
610
|
-
.filter((w) => w.length > 2);
|
|
611
|
-
if (words.length === 0)
|
|
612
|
-
return [];
|
|
613
|
-
const results = [];
|
|
614
|
-
for (const [name, entry] of Object.entries(registry)) {
|
|
615
|
-
const titleLower = entry.title.toLowerCase();
|
|
616
|
-
const descLower = entry.description.toLowerCase();
|
|
617
|
-
const tagsLower = entry.tags.map((t) => t.toLowerCase());
|
|
618
|
-
const whenToUseLower = entry.whenToUse.map((w) => w.toLowerCase());
|
|
619
|
-
let score = 0;
|
|
620
|
-
for (const word of words) {
|
|
621
|
-
if (titleLower.includes(word))
|
|
622
|
-
score += SEARCH_WEIGHT.title;
|
|
623
|
-
if (tagsLower.some((t) => t.includes(word)))
|
|
624
|
-
score += SEARCH_WEIGHT.tags;
|
|
625
|
-
if (descLower.includes(word))
|
|
626
|
-
score += SEARCH_WEIGHT.description;
|
|
627
|
-
if (whenToUseLower.some((w) => w.includes(word)))
|
|
628
|
-
score += SEARCH_WEIGHT.whenToUse;
|
|
629
|
-
}
|
|
630
|
-
if (score > 0) {
|
|
631
|
-
results.push({ name, score, title: entry.title, description: entry.description });
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
return results.sort((a, b) => b.score - a.score);
|
|
635
|
-
}
|
|
636
|
-
/**
|
|
637
|
-
* The rule-pack tools: `search_context`, `read_contextIndex` and `read_context`. A host's own
|
|
638
|
-
* modules are named alongside the default pack in `read_context`'s valid-name list.
|
|
639
|
-
* @beta
|
|
640
|
-
*/
|
|
641
|
-
export function createContextToolDefinitions(extraModules = []) {
|
|
642
|
-
const extraNames = extraModules.map((m) => m.name).filter((n) => !(n in CONTEXT_REGISTRY));
|
|
643
|
-
const withExtras = (definitions) => extraNames.length === 0
|
|
644
|
-
? definitions
|
|
645
|
-
: definitions.map((d) => d.name === 'read_context'
|
|
646
|
-
? Object.assign(Object.assign({}, d), { description: `${d.description} Project modules: ${extraNames.join(', ')}.` }) : d);
|
|
647
|
-
return withExtras(CONTEXT_TOOL_DEFINITIONS);
|
|
648
|
-
}
|
|
649
|
-
const CONTEXT_TOOL_DEFINITIONS = [
|
|
650
|
-
{
|
|
651
|
-
name: 'search_context',
|
|
652
|
-
description: 'Semantically rank all context modules by relevance to a free-text query. ' +
|
|
653
|
-
'Use this instead of read_contextIndex when you have a user description and are unsure which context(s) to load — especially for paraphrased or non-developer phrasing. ' +
|
|
654
|
-
'Returns modules sorted by relevance score with title and description. ' +
|
|
655
|
-
'Then call read_context(name) for each relevant result. ' +
|
|
656
|
-
'Example: search_context("show a confirmation before deleting") → returns fui-dialogs (high), fui-primitives (medium).',
|
|
657
|
-
parameters: {
|
|
658
|
-
type: 'object',
|
|
659
|
-
required: ['query'],
|
|
660
|
-
properties: {
|
|
661
|
-
query: {
|
|
662
|
-
type: 'string',
|
|
663
|
-
description: 'Free-text description of the feature or component you are looking for. Can be paraphrased or non-technical.',
|
|
664
|
-
},
|
|
665
|
-
maxResults: {
|
|
666
|
-
type: 'number',
|
|
667
|
-
description: 'Maximum number of results to return (default: 5).',
|
|
668
|
-
},
|
|
669
|
-
},
|
|
670
|
-
},
|
|
671
|
-
},
|
|
672
|
-
{
|
|
673
|
-
name: 'read_contextIndex',
|
|
674
|
-
description: 'Returns a lightweight catalog of all available FUI context modules — name, title, description, whenToUse triggers, and relatedContexts for each. ' +
|
|
675
|
-
'Call this when you are unsure which context applies to your current task. ' +
|
|
676
|
-
'Then call read_context(name) with the exact context name to load the full reference material. ' +
|
|
677
|
-
'You do NOT need this call if you already know the context name from the lookup table in your system prompt.',
|
|
678
|
-
parameters: {
|
|
679
|
-
type: 'object',
|
|
680
|
-
properties: {},
|
|
681
|
-
required: [],
|
|
682
|
-
},
|
|
683
|
-
},
|
|
684
|
-
{
|
|
685
|
-
name: 'read_context',
|
|
686
|
-
description: 'Load the full reference material for a named FUI context module. ' +
|
|
687
|
-
'ALWAYS call this before writing any code that depends on the corresponding feature — do not rely on memory. ' +
|
|
688
|
-
'Valid context names: fui-import-surface, fui-components, fui-entity-management, fui-rapid-grid-pro, fui-chart, fui-form-component, fui-dialogs, fui-primitives, fui-eventing, fui-global-filters, fui-criteria, fui-column-defs, fui-formatters, fui-layout, fui-flexlayout, fui-foundation-comms, fui-redux-store, fui-notifications, fui-inline-editing, fui-error-boundary, fui-styling, fui-blotter, fui-reporting, fui-dashboard, fui-trade-form, fui-flyout-panel, fui-custom-renderer. ' +
|
|
689
|
-
'See the CONTEXT RETRIEVAL table in your system prompt for the trigger → name mapping, ' +
|
|
690
|
-
'or call read_contextIndex() for full descriptions when unsure.',
|
|
691
|
-
parameters: {
|
|
692
|
-
type: 'object',
|
|
693
|
-
required: ['name'],
|
|
694
|
-
properties: {
|
|
695
|
-
name: {
|
|
696
|
-
type: 'string',
|
|
697
|
-
description: 'The context name to load. One of: fui-import-surface | fui-components | fui-entity-management | fui-rapid-grid-pro | fui-chart | fui-form-component | fui-dialogs | fui-primitives | fui-eventing | fui-global-filters | fui-criteria | fui-column-defs | fui-formatters | fui-layout | fui-flexlayout | fui-foundation-comms | fui-redux-store | fui-notifications | fui-inline-editing | fui-error-boundary | fui-styling | fui-blotter | fui-reporting | fui-dashboard | fui-trade-form | fui-flyout-panel | fui-custom-renderer',
|
|
698
|
-
},
|
|
699
|
-
},
|
|
700
|
-
},
|
|
701
|
-
},
|
|
702
|
-
];
|
|
703
|
-
/**
|
|
704
|
-
* The default pack's rule-pack tool definitions.
|
|
705
|
-
* @beta
|
|
706
|
-
*/
|
|
707
|
-
export const contextToolDefinitions = createContextToolDefinitions();
|
|
708
|
-
/**
|
|
709
|
-
* Handlers for the rule-pack tools, over the default pack plus a host's own modules.
|
|
710
|
-
* @beta
|
|
711
|
-
*/
|
|
712
|
-
export const createContextToolHandlers = (extraModules = []) => {
|
|
713
|
-
const registry = registryWith(extraModules);
|
|
714
|
-
return {
|
|
715
|
-
search_context: (args) => __awaiter(void 0, void 0, void 0, function* () {
|
|
716
|
-
const { query, maxResults = 5 } = args;
|
|
717
|
-
const results = searchRegistry(query, registry).slice(0, maxResults);
|
|
718
|
-
if (results.length === 0) {
|
|
719
|
-
return {
|
|
720
|
-
results: [],
|
|
721
|
-
note: 'No relevant context modules found for this query. Try read_contextIndex() to browse all available modules.',
|
|
722
|
-
};
|
|
723
|
-
}
|
|
724
|
-
return {
|
|
725
|
-
results,
|
|
726
|
-
note: 'Call read_context(name) for each relevant result to load the full reference material.',
|
|
727
|
-
};
|
|
728
|
-
}),
|
|
729
|
-
read_contextIndex: (_args, context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
730
|
-
// GENC-1380 R18c: the index catalog duplicates the in-prompt module table and is idempotent,
|
|
731
|
-
// so collapse it to a pointer at `agentEnd` once the turn no longer needs the full listing.
|
|
732
|
-
context.condenseWhen({ on: { kind: 'agentEnd' }, response: 'pointer' });
|
|
733
|
-
return Object.fromEntries(Object.entries(registry).map(([name, entry]) => [
|
|
734
|
-
name,
|
|
735
|
-
{
|
|
736
|
-
title: entry.title,
|
|
737
|
-
description: entry.description,
|
|
738
|
-
whenToUse: entry.whenToUse,
|
|
739
|
-
relatedContexts: entry.relatedContexts,
|
|
740
|
-
dependsOn: entry.dependsOn,
|
|
741
|
-
},
|
|
742
|
-
]));
|
|
743
|
-
}),
|
|
744
|
-
read_context: (args, context) => __awaiter(void 0, void 0, void 0, function* () {
|
|
745
|
-
const { name } = args;
|
|
746
|
-
const entry = registry[name];
|
|
747
|
-
if (!entry) {
|
|
748
|
-
return {
|
|
749
|
-
error: `Unknown context: '${name}'. Call read_contextIndex to see all available context names.`,
|
|
750
|
-
};
|
|
751
|
-
}
|
|
752
|
-
// GENC-1369: context modules are large reference dumps. Earlier this used an `age`
|
|
753
|
-
// horizon (collapse N model-calls after the read), but a module's *use* is spread
|
|
754
|
-
// across the whole generation flow — the dependent file is often written many calls
|
|
755
|
-
// after the read, so age-collapse dropped the contract right when it was needed and
|
|
756
|
-
// the agent wrote from stale memory. Collapse instead at `agentEnd`: the content
|
|
757
|
-
// stays live for the entire pinned activation (a stuck mid-flow hand-back keeps it)
|
|
758
|
-
// and is reclaimed only when the flow completes and releases its pin (see saving.ts).
|
|
759
|
-
// GENC-1380 C2b: collapse at `agentEnd` ONLY — no `superseded` dedup, which would rewrite
|
|
760
|
-
// an earlier read mid-history and bust the prompt cache.
|
|
761
|
-
// NOTE: the `loadedContexts` ledger (the deterministic gate's record of what is
|
|
762
|
-
// loaded) MUST share this boundary — it is reset on the same release in saving.ts so
|
|
763
|
-
// it can never vouch for a module whose content has been condensed away.
|
|
764
|
-
context.condenseWhen({ on: { kind: 'agentEnd' }, response: 'pointer' });
|
|
765
|
-
// GENC-1560: `dependsOn` is load-bearing — a module's direct dependencies ride along with
|
|
766
|
-
// it (see resolveContextDependencies). Additive and backward-compatible: name/title/content
|
|
767
|
-
// are unchanged, and a module with no dependencies returns the exact shape it always did.
|
|
768
|
-
const { dependencies, omitted } = resolveContextDependencies(name, {}, registry);
|
|
769
|
-
return Object.assign(Object.assign({ name, title: entry.title, content: entry.content }, (dependencies.length > 0 ? { dependencies } : {})), (omitted.length > 0 ? { dependenciesOmitted: omitted } : {}));
|
|
770
|
-
}),
|
|
771
|
-
};
|
|
772
|
-
};
|