pi-apexlang 0.2.2 → 0.4.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/README.md +22 -5
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/UPSTREAM.json +2 -2
- package/docs/assets/overview.en.png +0 -0
- package/docs/assets/overview.en.svg +89 -0
- package/docs/assets/overview.uk.png +0 -0
- package/docs/assets/overview.uk.svg +89 -0
- package/docs/en/README.md +41 -0
- package/docs/en/architecture.md +73 -0
- package/docs/en/getting-started.md +77 -0
- package/docs/en/maintenance.md +83 -0
- package/docs/en/tool-reference.md +85 -0
- package/docs/uk/README.md +41 -0
- package/docs/uk/architecture.md +73 -0
- package/docs/uk/getting-started.md +77 -0
- package/docs/uk/maintenance.md +83 -0
- package/docs/uk/tool-reference.md +85 -0
- package/extensions/apexlang/index.ts +19 -10
- package/extensions/lib/apexlang-cli.d.mts +1 -2
- package/extensions/lib/apexlang-cli.mjs +18 -13
- package/extensions/lib/apexlang-local-validate.mjs +83 -0
- package/extensions/lib/apexlang-local-validator.py +116 -0
- package/extensions/lib/apexlang-runtime-validate.mjs +76 -0
- package/package.json +2 -1
- package/skills/apexlang/APEXlang Skills and Workflows.md +325 -0
- package/skills/apexlang/README.md +6 -6
- package/skills/apexlang/RELEASE-NOTES.md +2 -2
- package/skills/apexlang/SKILL.md +24 -19
- package/skills/apexlang/agents/openai.yaml +4 -3
- package/skills/apexlang/assets/apex-generation/components.registry.json +1001 -16
- package/skills/apexlang/assets/apexlang/domains-catalog.json +6 -1
- package/skills/apexlang/assets/component-attributes.json +1924 -180
- package/skills/apexlang/assets/component-policies.json +19 -10
- package/skills/apexlang/assets/contracts/grammar-semantic-rules.json +134 -0
- package/skills/apexlang/assets/contracts/package-layers.json +56 -0
- package/skills/apexlang/assets/contracts/page-construction-packs.json +154 -0
- package/skills/apexlang/assets/contracts/page-patterns.json +119 -0
- package/skills/apexlang/assets/grammar/apexlang.ebnf +11743 -0
- package/skills/apexlang/assets/indexes/font-apex-icon-index.json +1699 -0
- package/skills/apexlang/assets/routing-catalog-main.json +11 -10
- package/skills/apexlang/assets/routing-load-policy.json +35 -9
- package/skills/apexlang/assets/rules-mapping.json +110 -2
- package/skills/apexlang/assets/rules.catalog.json +1298 -0
- package/skills/apexlang/assets/validator-fix-recipes.json +372 -17
- package/skills/apexlang/assets/workspace-intelligence.json +7 -10
- package/skills/apexlang/manifest.json +268 -12
- package/skills/apexlang/references/domains/README.md +1 -1
- package/skills/apexlang/references/domains/page-components/buttons.md +2 -2
- package/skills/apexlang/references/domains/page-components/page-items.md +3 -3
- package/skills/apexlang/references/domains/page-components/regions/region-display-selector/workflow-region-display-selector.md +69 -0
- package/skills/apexlang/references/domains/page-components/regions.md +1 -0
- package/skills/apexlang/references/domains/template-components/comments.md +61 -0
- package/skills/apexlang/references/domains/template-components/registry.md +2 -0
- package/skills/apexlang/references/domains/template-components/templates.md +47 -0
- package/skills/apexlang/references/domains/template-components/timeline.md +51 -0
- package/skills/apexlang/references/ops/one-message-router-contract.md +2 -2
- package/skills/apexlang/references/ops/runtime-gates/01-direct-sqlcl-import.md +1 -1
- package/skills/apexlang/references/ops/runtime-gates/02-direct-sqlcl-validate-gate.md +1 -1
- package/skills/apexlang/references/ops/runtime-gates.md +17 -16
- package/skills/apexlang/references/ops/sqlcl-agents/00-connection-gate.md +7 -7
- package/skills/apexlang/references/ops/sqlcl.md +7 -8
- package/skills/apexlang/references/policies/compiler-prop-map.md +6 -4
- package/skills/apexlang/references/policies/governance/00-governance.md +2 -2
- package/skills/apexlang/references/policies/memory-bank/00-guard/ai.guard.md +126 -922
- package/skills/apexlang/references/policies/memory-bank/20-data/apex.logic.md +3 -3
- package/skills/apexlang/references/policies/memory-bank/20-data/db.connection.md +9 -11
- package/skills/apexlang/references/policies/memory-bank/30-pages/apex.cards-page.md +95 -0
- package/skills/apexlang/references/policies/memory-bank/30-pages/apex.page.md +2 -2
- package/skills/apexlang/references/policies/memory-bank/30-pages/apex.smart-filter-search.md +145 -74
- package/skills/apexlang/references/policies/memory-bank/40-components/apex.region-interactions.md +9 -2
- package/skills/apexlang/references/policies/memory-bank/40-components/apex.region-media.md +6 -5
- package/skills/apexlang/references/policies/memory-bank/systemPatterns.md +9 -1
- package/skills/apexlang/references/workflows/apex-generation/agents/20-agent-draft.md +51 -232
- package/skills/apexlang/references/workflows/apex-generation/agents/30-agent-critique.md +49 -449
- package/skills/apexlang/references/workflows/apex-generation/agents/40-agent-revision.md +38 -238
- package/skills/apexlang/references/workflows/apex-generation/nlu/nlu-routing-test-matrix.md +8 -2
- package/skills/apexlang/references/workflows/apex-generation/nlu/nlu-routing-validation-notes.md +19 -3
- package/skills/apexlang/references/workflows/apex-generation/registry.md +15 -1
- package/skills/apexlang/references/workflows/apex-generation/templates.md +1 -1
- package/skills/apexlang/references/workflows/apex-generation.md +1 -1
- package/skills/apexlang/references/workflows/apexlang/apexlang-execution-model.md +5 -5
- package/skills/apexlang/references/workflows/apexlang/prompt-contracts.md +81 -10
- package/skills/apexlang/references/workflows/apexlang/workflow-create-app-from-fr-and-model.md +18 -7
- package/skills/apexlang/release-notes.json +156 -0
- package/skills/apexlang/runtime/grammar_contract.mjs +1166 -0
- package/skills/apexlang/runtime/internal/python/format_apexlang.py +210 -0
- package/skills/apexlang/runtime/internal/python/validate_apexlang.py +14142 -5843
- package/skills/apexlang/runtime/internal/python/validator_common.py +2 -0
- package/skills/apexlang/runtime/lib/catalogs.mjs +1026 -0
- package/skills/apexlang/runtime/lib/common.mjs +35 -0
- package/skills/apexlang/runtime/runtime.bundle.mjs +457 -57
- package/skills/apexlang/templates/items/combobox/combobox.explicit-defaults.md +1 -1
- package/skills/apexlang/templates/items/date-picker/date-picker._common.md +1 -1
- package/skills/apexlang/templates/items/date-picker/date-picker.explicit-defaults.md +1 -1
- package/skills/apexlang/templates/items/file-upload/file-upload._common.md +30 -24
- package/skills/apexlang/templates/items/file-upload/file-upload.compact-template.md +6 -0
- package/skills/apexlang/templates/items/file-upload/file-upload.explicit-defaults.md +23 -8
- package/skills/apexlang/templates/items/file-upload/file-upload.minimal.md +6 -0
- package/skills/apexlang/templates/items/hidden-item/hidden-item._common.md +1 -1
- package/skills/apexlang/templates/items/hidden-item/hidden-item.explicit-defaults.md +1 -1
- package/skills/apexlang/templates/items/items._common.md +3 -2
- package/skills/apexlang/templates/items/list-manager/list-manager.explicit-defaults.md +1 -1
- package/skills/apexlang/templates/items/markdown-editor/markdown-editor._common.md +1 -1
- package/skills/apexlang/templates/items/markdown-editor/markdown-editor.explicit-defaults.md +1 -1
- package/skills/apexlang/templates/items/number-field/number-field._common.md +8 -6
- package/skills/apexlang/templates/items/number-field/number-field.explicit-defaults.md +12 -2
- package/skills/apexlang/templates/items/popup-lov/popup-lov.explicit-defaults.md +1 -1
- package/skills/apexlang/templates/items/rich-text-editor/rich-text-editor._common.md +1 -1
- package/skills/apexlang/templates/items/rich-text-editor/rich-text-editor.explicit-defaults.md +1 -1
- package/skills/apexlang/templates/items/select-many/standard.md +1 -1
- package/skills/apexlang/templates/items/shuttle/shuttle.explicit-defaults.md +1 -1
- package/skills/apexlang/templates/items/switch/switch._common.md +8 -8
- package/skills/apexlang/templates/items/switch/switch.explicit-defaults.md +1 -1
- package/skills/apexlang/templates/items/text-area/text-area._common.md +2 -3
- package/skills/apexlang/templates/items/text-area/text-area.explicit-defaults.md +1 -1
- package/skills/apexlang/templates/items/text-area/text-area.required-length.md +1 -3
- package/skills/apexlang/templates/items/text-autocomplete/text-autocomplete.explicit-defaults.md +1 -1
- package/skills/apexlang/templates/items/text-autocomplete/text-autocomplete.required-length.md +1 -3
- package/skills/apexlang/templates/items/text-field/text-field._common.md +2 -3
- package/skills/apexlang/templates/items/text-field/text-field.explicit-defaults.md +1 -1
- package/skills/apexlang/templates/items/text-field/text-field.required-length.md +1 -3
- package/skills/apexlang/templates/page-examples/faceted-search/faceted-search.example.md +0 -5
- package/skills/apexlang/templates/page-examples/form-page/form-page.example.md +0 -9
- package/skills/apexlang/templates/page-examples/interactive-report-page/interactive-report-page.example.md +2 -2
- package/skills/apexlang/templates/page-examples/login-page/login-page.example.md +0 -8
- package/skills/apexlang/templates/page-examples/task-definition-initiated-tasks-page/task-definition-initiated-tasks-page.example.md +7 -17
- package/skills/apexlang/templates/page-examples/task-definition-my-tasks-page/task-definition-my-tasks-page.example.md +7 -65
- package/skills/apexlang/templates/page-examples/task-definition-task-details/task-definition-task-details.example.md +38 -201
- package/skills/apexlang/templates/region-components/calendar/calendar.custom-styling.md +3 -1
- package/skills/apexlang/templates/region-components/calendar/calendar.faceted-search.md +3 -2
- package/skills/apexlang/templates/region-components/cards/README.md +12 -4
- package/skills/apexlang/templates/region-components/cards/cards._common.md +176 -37
- package/skills/apexlang/templates/region-components/cards/cards._index.md +2 -1
- package/skills/apexlang/templates/region-components/cards/cards.refresh-after-dialog.md +46 -0
- package/skills/apexlang/templates/region-components/cards/cards.refresh-on-change.md +58 -0
- package/skills/apexlang/templates/region-components/cards/cards.rest-source.md +54 -18
- package/skills/apexlang/templates/region-components/cards/cards.standard.md +37 -21
- package/skills/apexlang/templates/region-components/chart/chart._series._common.md +1 -4
- package/skills/apexlang/templates/region-components/chart/chart.pie.md +6 -2
- package/skills/apexlang/templates/region-components/chart/chart.status-meter-gauge.md +1 -1
- package/skills/apexlang/templates/region-components/chart/chart.stock.md +2 -0
- package/skills/apexlang/templates/region-components/chart/features/chart.feature-chart-links.md +9 -7
- package/skills/apexlang/templates/region-components/faceted-search/faceted-search._common.md +1 -14
- package/skills/apexlang/templates/region-components/form/form._items._common.md +1 -5
- package/skills/apexlang/templates/region-components/interactive-report/interactive-report._columns._common.md +2 -6
- package/skills/apexlang/templates/region-components/interactive-report/interactive-report.page-header-actions.md +1 -7
- package/skills/apexlang/templates/region-components/list/README.md +1 -1
- package/skills/apexlang/templates/region-components/list/list._common.md +1 -1
- package/skills/apexlang/templates/region-components/map/map.backgrounds.md +12 -10
- package/skills/apexlang/templates/region-components/map/map.layer.extruded-polygons.md +16 -12
- package/skills/apexlang/templates/region-components/map/map.layer.heat-map.md +10 -7
- package/skills/apexlang/templates/region-components/map/map.layer.lines.md +10 -8
- package/skills/apexlang/templates/region-components/map/map.layer.polygons.md +21 -18
- package/skills/apexlang/templates/region-components/map/map.region.background-custom.md +25 -19
- package/skills/apexlang/templates/region-components/map/map.region.background-shared.md +19 -13
- package/skills/apexlang/templates/region-components/map/map.region.bbox-sql.md +13 -13
- package/skills/apexlang/templates/region-components/map/map.region.bbox-static.md +2 -2
- package/skills/apexlang/templates/region-components/map/map.region.browser-location.md +3 -7
- package/skills/apexlang/templates/region-components/map/map.region.init-position-sql.md +7 -7
- package/skills/apexlang/templates/region-components/region-display-selector/README.md +5 -2
- package/skills/apexlang/templates/region-components/region-display-selector/region-display-selector._common.md +60 -7
- package/skills/apexlang/templates/region-components/region-display-selector/region-display-selector._index.md +4 -1
- package/skills/apexlang/templates/region-components/region-display-selector/region-display-selector.permutations.md +55 -0
- package/skills/apexlang/templates/region-components/region-display-selector/region-display-selector.standard.md +91 -5
- package/skills/apexlang/templates/region-components/smart-filter-search/README.md +6 -2
- package/skills/apexlang/templates/region-components/smart-filter-search/smart-filter-search._common.md +107 -46
- package/skills/apexlang/templates/region-components/smart-filter-search/smart-filter-search._index.md +4 -3
- package/skills/apexlang/templates/region-components/smart-filter-search/smart-filter-search.standard.md +33 -17
- package/skills/apexlang/templates/shared-components/component-settings/component-settings._common.md +1 -0
- package/skills/apexlang/templates/shared-components/component-settings.example.md +1 -0
- package/skills/apexlang/templates/shared-components/email-templates.example.md +1 -1
- package/skills/apexlang/templates/shared-components/rest-data-sources/example_rest_data_source.example.md +40 -46
- package/skills/apexlang/templates/shared-components/task-definitions/action-task.example.md +2 -30
- package/skills/apexlang/templates/shared-components/task-definitions/approve-request.example.md +3 -31
- package/skills/apexlang/templates/template-components/README.md +27 -15
- package/skills/apexlang/templates/template-components/avatar/README.md +56 -0
- package/skills/apexlang/templates/template-components/avatar/avatar._common.md +149 -0
- package/skills/apexlang/templates/template-components/avatar/avatar._index.md +42 -0
- package/skills/apexlang/templates/template-components/{avatar._template_options.md → avatar/avatar._template_options.md} +1 -1
- package/skills/apexlang/templates/template-components/avatar/avatar.report-icon.md +48 -0
- package/skills/apexlang/templates/template-components/avatar/avatar.report-image-url-column.md +62 -0
- package/skills/apexlang/templates/template-components/avatar/avatar.report-initials.md +54 -0
- package/skills/apexlang/templates/template-components/badge/README.md +38 -0
- package/skills/apexlang/templates/template-components/badge/badge._common.md +183 -0
- package/skills/apexlang/templates/template-components/badge/badge._index.md +20 -0
- package/skills/apexlang/templates/template-components/badge/badge.report-link.md +66 -0
- package/skills/apexlang/templates/template-components/badge/badge.report-minimal.md +76 -0
- package/skills/apexlang/templates/template-components/comments/README.md +20 -0
- package/skills/apexlang/templates/template-components/comments/comments._common.md +43 -0
- package/skills/apexlang/templates/template-components/comments/comments._index.md +25 -0
- package/skills/apexlang/templates/template-components/{comments._template_options.md → comments/comments._template_options.md} +2 -1
- package/skills/apexlang/templates/template-components/comments/comments.apex-task-comments.md +77 -0
- package/skills/apexlang/templates/template-components/comments/comments.partial-column.md +120 -0
- package/skills/apexlang/templates/template-components/comments/comments.permutations.md +425 -0
- package/skills/apexlang/templates/template-components/content-row/README.md +1 -1
- package/skills/apexlang/templates/template-components/content-row/content-row._common.md +1 -1
- package/skills/apexlang/templates/template-components/content-row/content-row._index.md +1 -1
- package/skills/apexlang/templates/template-components/content-row/content-row._template_options.md +1 -1
- package/skills/apexlang/templates/template-components/flexbox-container/README.md +9 -0
- package/skills/apexlang/templates/template-components/flexbox-container/flexbox-container._index.md +13 -0
- package/skills/apexlang/templates/template-components/media-list/README.md +100 -0
- package/skills/apexlang/templates/template-components/media-list/media-list._common.md +174 -0
- package/skills/apexlang/templates/template-components/media-list/media-list._index.md +50 -0
- package/skills/apexlang/templates/template-components/{media-list._template_options.md → media-list/media-list._template_options.md} +8 -2
- package/skills/apexlang/templates/template-components/media-list/media-list.partial.md +50 -0
- package/skills/apexlang/templates/template-components/media-list/media-list.report-avatar-badge.md +76 -0
- package/skills/apexlang/templates/template-components/media-list/media-list.report-base.md +71 -0
- package/skills/apexlang/templates/template-components/media-list/media-list.report-grouped.md +40 -0
- package/skills/apexlang/templates/template-components/media-list/media-list.report-layouts.md +50 -0
- package/skills/apexlang/templates/template-components/media-list/media-list.report-link.md +53 -0
- package/skills/apexlang/templates/template-components/metric-card/README.md +19 -4
- package/skills/apexlang/templates/template-components/metric-card/metric-card._common.md +122 -29
- package/skills/apexlang/templates/template-components/metric-card/metric-card._index.md +6 -0
- package/skills/apexlang/templates/template-components/metric-card/metric-card._template_options.md +47 -2
- package/skills/apexlang/templates/template-components/metric-card/metric-card.partial-minimal.md +51 -0
- package/skills/apexlang/templates/template-components/metric-card/metric-card.permutations.md +56 -0
- package/skills/apexlang/templates/template-components/metric-card/metric-card.report-avatar-badge.md +98 -0
- package/skills/apexlang/templates/template-components/metric-card/metric-card.report-grouping-selection.md +131 -0
- package/skills/apexlang/templates/template-components/metric-card/metric-card.report-link.md +66 -0
- package/skills/apexlang/templates/template-components/metric-card/metric-card.report-minimal.md +97 -0
- package/skills/apexlang/templates/template-components/template-components.registry.json +90 -1
- package/skills/apexlang/templates/template-components/timeline/README.md +19 -0
- package/skills/apexlang/templates/template-components/timeline/timeline._common.md +43 -0
- package/skills/apexlang/templates/template-components/timeline/timeline._index.md +24 -0
- package/skills/apexlang/templates/template-components/{timeline._template_options.md → timeline/timeline._template_options.md} +2 -1
- package/skills/apexlang/templates/template-components/timeline/timeline.permutations.md +399 -0
- package/skills/apexlang/templates/template-components/timeline/timeline.report-sample-data.md +168 -0
- package/skills/apexlang/templates/workspace-components/credentials/credentials-for-open-ai.example.md +1 -1
- package/skills/apexlang/templates/workspace-components/generative-ai-services/open-ai.example.md +8 -6
- package/skills/apexlang/tools/apexctl.mjs +167 -4
- package/skills/apexlang/tools/compiler-truth-audit.mjs +95 -63
- package/skills/apexlang/tools/query-valid-props-context.mjs +30 -0
- package/skills/apexlang/tools/query-valid-props-normalize.mjs +1 -0
- package/skills/apexlang/tools/query-valid-props-runtime.mjs +13 -8
- package/skills/apexlang/tools/query-valid-props-semantics.mjs +391 -0
- package/skills/apexlang/tools/query-valid-props-template-components.mjs +15 -1
- package/skills/apexlang/tools/query-valid-props.mjs +198 -216
- /package/skills/apexlang/templates/template-components/{badge._template_options.md → badge/badge._template_options.md} +0 -0
- /package/skills/apexlang/templates/template-components/{flexbox-container._template_options.md → flexbox-container/flexbox-container._template_options.md} +0 -0
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
- Dynamic actions `DA_<purpose>`
|
|
43
43
|
- SQL and PL/SQL must use named notation, and appear inside fenced blocks. Process-type policy split: page processes default to `invokeApi`, appProcess remains `executeCode`-only, and a thin page-level `executeCode` wrapper is allowed only for page-coupled loaders or branch-gated flows when direct page-item assignment is the reliable runtime-safe choice.
|
|
44
44
|
- Prefer declarative shapes over PL/SQL when the workflow can be expressed through supported native APEX DSL/process constructs.
|
|
45
|
-
-
|
|
46
|
-
-
|
|
45
|
+
- Hard limit: a PL/SQL text block longer than 4000 raw characters violates `PLSQL_INLINE_BLOCK_001`; extract it into a package API (`app_process_api` default) plus page-process `invokeApi` or a justified thin wrapper exception (`appProcess` stays `executeCode`). This finding blocks final output.
|
|
46
|
+
- Hard limit: an inline SQL block longer than 4000 raw characters violates `SQL_INLINE_BLOCK_001`; extract it into a secure view that the page artifact references instead of embedding the full query inline. This finding blocks final output.
|
|
47
47
|
|
|
48
48
|
## 3. Processes
|
|
49
49
|
- **Execution points:**
|
|
@@ -112,7 +112,7 @@ validation [validationStaticId] (
|
|
|
112
112
|
- Server execution: `da-execute-server-side-code.apx`, `da-delete-with-notification.apx`
|
|
113
113
|
- Alert/Confirm: `da-alert-confirm-cancel.apx`
|
|
114
114
|
- Timer, slider, debounce/throttle, plugin styling: see dedicated templates
|
|
115
|
-
- Server-side work should be packaged and referenced via `invokeApi` by default; use a thin page-level `executeCode` wrapper only when the page must assign items directly in a runtime-safe loader or branch flow, and keep inline business logic out of that wrapper. Critique must
|
|
115
|
+
- Server-side work should be packaged and referenced via `invokeApi` by default; use a thin page-level `executeCode` wrapper only when the page must assign items directly in a runtime-safe loader or branch flow, and keep inline business logic out of that wrapper. Critique must hard-fail inline PL/SQL over 4000 raw characters under `PLSQL_INLINE_BLOCK_001`.
|
|
116
116
|
- Use specific `itemsToSubmit`; avoid broad lists.
|
|
117
117
|
- AI assistant settings note:
|
|
118
118
|
- Prefer `genAI { agent: @AGENT }` referencing an existing AI agent alias (for example `@home`).
|
|
@@ -12,17 +12,15 @@ Startup and precedence
|
|
|
12
12
|
- `40-components/`
|
|
13
13
|
|
|
14
14
|
Connection contract
|
|
15
|
-
- Use `db_connection_name` as the canonical saved SQLcl connection input
|
|
15
|
+
- Use `db_connection_name` as the canonical saved SQLcl connection input. Resolve workspace identity from the active runtime for existing apps; require an exact destination workspace name before new-app materialization.
|
|
16
16
|
- For DB-backed workflows, resolve prerequisite metadata source first:
|
|
17
17
|
- inspect `assets/workspace-intelligence.json`
|
|
18
18
|
- auto-select a single eligible schema dictionary
|
|
19
19
|
- prompt the user to choose when multiple eligible schema dictionaries exist
|
|
20
20
|
- scan saved SQLcl connections before any DB-mode prompt
|
|
21
|
-
-
|
|
22
|
-
- use discovered saved connections as candidates, not as automatic approval for live work
|
|
21
|
+
- auto-bind exactly one deterministic saved connection for live work
|
|
23
22
|
- prompt the user to choose when multiple saved SQLcl connections exist
|
|
24
|
-
-
|
|
25
|
-
- require the user to specify `db_connection_name` and the corresponding APEX workspace name before live metadata validation, `apex validate`, `apex import`, runtime diagnostics, or new-app materialization
|
|
23
|
+
- request manual `db_connection_name` only when saved-connection discovery cannot resolve one; require an exact workspace name only for new-app materialization or after runtime-reported ambiguity
|
|
26
24
|
- treat `offline` as an explicit override when the user asks for offline-only behavior
|
|
27
25
|
- Record one machine-readable prerequisite state:
|
|
28
26
|
- `prereq_source: schema_doc`
|
|
@@ -34,10 +32,10 @@ Connection contract
|
|
|
34
32
|
- `connection_source: user_prompt`
|
|
35
33
|
- `connection_source: unresolved`
|
|
36
34
|
- Resolve `db_mode` after deterministic discovery for interactive DB-backed runs:
|
|
37
|
-
- `db_mode: online` requires `db_connection_name`
|
|
35
|
+
- `db_mode: online` requires a resolved `db_connection_name`
|
|
38
36
|
- `db_mode: offline` is explicit and blocks live metadata/runtime work
|
|
39
37
|
- Do not infer offline mode.
|
|
40
|
-
- Treat `prereq_source: schema_doc` as sufficient for offline metadata reasoning only; live runtime/import still requires `db_connection_name
|
|
38
|
+
- Treat `prereq_source: schema_doc` as sufficient for offline metadata reasoning only; live runtime/import still requires a resolved `db_connection_name`.
|
|
41
39
|
- Allow `prereq_source: schema_doc` and `connection_source: saved_connection` to coexist when offline schema metadata is preferred for evidence and a deterministic live connection was also discovered.
|
|
42
40
|
|
|
43
41
|
How to use SQLcl
|
|
@@ -66,7 +64,7 @@ Canonical roundtrip commands
|
|
|
66
64
|
- `apex export -applicationid <application_id> -exptype APEXLANG -split -dir <absolute_export_dir>`
|
|
67
65
|
- Allow validate/import only when the capability probe confirms the required commands exist in the selected runtime path.
|
|
68
66
|
- Do not add `-workspaceid` to the validate/import happy path. Only add it after the active SQLcl session explicitly reports multiple-workspace ambiguity and blocks the command without a workspace override. When that happens, resolve the workspace id automatically for the active `db_connection_name` and rerun immediately.
|
|
69
|
-
- When workspace-id resolution is in progress, send the user this exact short status sentence before continuing: `Identifying workspace ID for DB connection, please
|
|
67
|
+
- When workspace-id resolution is in progress, send the user this exact short status sentence before continuing: `Identifying workspace ID for the DB connection, please bear with me...`
|
|
70
68
|
- Treat standalone bridge or wrapper execution as diagnostic only; the real SQLcl session is the source of truth when they disagree.
|
|
71
69
|
- Do not count sandbox-only build-root filesystem/setup failures as real validate attempts for the live retry budget; only real SQLcl/compiler outcomes should feed the fix loop.
|
|
72
70
|
|
|
@@ -75,7 +73,7 @@ Same-session requirement
|
|
|
75
73
|
- If the session changes between validate and import, STOP and re-run validation before import.
|
|
76
74
|
|
|
77
75
|
Policy and quality gates
|
|
78
|
-
- Never perform live DB work if `db_connection_name`
|
|
76
|
+
- Never perform live DB work if `db_connection_name` is unresolved. Require workspace input only for new-app materialization or when runtime ambiguity cannot be resolved deterministically.
|
|
79
77
|
- Never run live metadata validation, `apex validate`, or `apex import` in offline mode.
|
|
80
78
|
- Never treat APEX build-root inference or SQLcl version alone as sufficient proof that live validate/import can run.
|
|
81
79
|
- Ask for an environment-specific APEX build path only when automatic build-root resolution fails and the user still wants build-root runtime or diagnostics.
|
|
@@ -85,9 +83,9 @@ Policy and quality gates
|
|
|
85
83
|
Prompt pattern
|
|
86
84
|
- For interactive DB-backed workflows:
|
|
87
85
|
- first run deterministic discovery: inspect offline schema dictionaries and scan saved SQLcl connections
|
|
88
|
-
- if exactly one saved SQLcl connection exists,
|
|
86
|
+
- if exactly one saved SQLcl connection exists, auto-bind it
|
|
89
87
|
- if multiple saved SQLcl connections exist, present them as selectable options
|
|
90
|
-
- use `Provide db_connection_name
|
|
88
|
+
- use `Provide db_connection_name for this workflow.` when live DB context is still unresolved after discovery
|
|
91
89
|
- accept `offline` only when the user explicitly asks for offline-only execution
|
|
92
90
|
|
|
93
91
|
Tags: db, connection, sqlcl, oracle, connect, schema, validate, apex, roundtrip
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# APEX Visual Summary Cards Page
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Defines the deterministic page pattern for visual summaries of people, products, statuses, or other entities rendered with one native APEX Cards region. This pattern owns Cards composition only; it does not orchestrate filtering or search.
|
|
6
|
+
|
|
7
|
+
## Pattern Selection
|
|
8
|
+
|
|
9
|
+
- Select this pattern for people cards, product cards, status tiles, entity cards, or an explicit native Cards region.
|
|
10
|
+
- Use a Metric Card template-component region instead for aggregate KPIs or a normalized metric strip unless the request explicitly requires native Cards.
|
|
11
|
+
- Use a report pattern instead when dense comparison, sorting, or tabular scanning is the primary task.
|
|
12
|
+
- Do not add Faceted Search, Smart Filters, search items, facets, or filter dynamic actions under this pattern. Route a separate filtering/search request to its owning pattern.
|
|
13
|
+
|
|
14
|
+
Rule ID: `CARDS_VISUAL_SUMMARY_PATTERN_REQUIRED_001`.
|
|
15
|
+
|
|
16
|
+
## Source-to-Attribute Plan
|
|
17
|
+
|
|
18
|
+
Before rendering APEXlang, record one mapping row for every requested Cards role:
|
|
19
|
+
|
|
20
|
+
| Cards role | Required evidence | Native mapping |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| Title | SQL projection alias or REST data-profile column | `title.column`, or `title.htmlExpression` with `advancedFormatting: true` |
|
|
23
|
+
| Subtitle | SQL projection alias or REST data-profile column | `subtitle.column` or advanced formatting |
|
|
24
|
+
| Body | SQL projection alias or REST data-profile column | `body.column` or advanced formatting |
|
|
25
|
+
| Secondary body | SQL projection alias or REST data-profile column | `secondaryBody.column` or advanced formatting |
|
|
26
|
+
| Row identity | Proven primary-key or stable REST identity field | `card.primaryKeyColumn1` and optional `primaryKeyColumn2` when the source has a composite identity or BLOB media requires it |
|
|
27
|
+
| Icon | Pinned Font APEX token, projected icon-class column, or projected initials | `iconAndBadge` |
|
|
28
|
+
| Image | Raw BLOB alias, projected URL alias, or explicit direct URL | `media`, plus `blobAttributes` only for BLOB media |
|
|
29
|
+
| Badge | Projected metric or status alias | `iconAndBadge.badgeColumn` with optional label/classes |
|
|
30
|
+
| Link | Proven target page and target-item/source-column mapping | Native Cards `action` with declarative `behavior.target` |
|
|
31
|
+
| Conditional style | Projected, allowlisted semantic class token | The narrowest compiler-proven `cssClasses` property; never raw user-authored CSS |
|
|
32
|
+
|
|
33
|
+
- SQL-backed Cards use exactly `location: localDatabase`, `type: sqlQuery`, and a fenced `sqlQuery`; they must not also declare `restSource`. Every mapped alias must be present in the query projection and every referenced object/column must have DB object evidence.
|
|
34
|
+
- REST-backed Cards use exactly `location: restSource` plus `restSource: @alias`; they omit SQL `type` and `sqlQuery`. They require an existing REST Data Source plus an authoritative data profile. Map the profile's actual column names; do not infer JSON paths or aliases.
|
|
35
|
+
- A requested role with no proven source field is `unresolved`. Omit an optional unresolved role or stop with `Missing Inputs` when it is required by the request.
|
|
36
|
+
- Prefer direct `column` mapping with `advancedFormatting: false`. Use `htmlExpression` only for a requested composition that cannot be represented by one native column, set `advancedFormatting: true`, and escape text substitutions with `!HTML`.
|
|
37
|
+
|
|
38
|
+
Rule ID: `CARDS_SOURCE_MAPPING_REQUIRED_001`.
|
|
39
|
+
|
|
40
|
+
## Icons, Badges, and Conditional Styles
|
|
41
|
+
|
|
42
|
+
- Prefer `iconSource: iconClassColumn` for row-dependent icons and `iconSource: initials` for people cards with initials. A fixed icon must come from the pinned Font APEX catalog.
|
|
43
|
+
- Prefer `badgeColumn` for row-dependent status or metric text. Keep the badge label concise and omit it when the value is self-explanatory.
|
|
44
|
+
- For conditional styling, project only `u-normal`, `u-hot`, `u-info`, `u-success`, `u-warning`, `u-danger`, or `NULL`. Map the proven alias to `card.cssClasses`; do not accept a raw class column. For REST profiles, record the exact finite set in the mapped profile column's `comments.comments` as `authoritative-profile-enum: [...]`; absence of that evidence blocks conditional styling.
|
|
45
|
+
- Do not concatenate arbitrary CSS, accept CSS tokens from untrusted end-user input, invent Universal Theme classes, or use HTML badge markup when native badge mapping is sufficient.
|
|
46
|
+
- If compiler truth for the active build does not expose a safe property for the requested conditional style, preserve the status as text/badge content and stop before inventing a styling workaround.
|
|
47
|
+
|
|
48
|
+
## Interactivity
|
|
49
|
+
|
|
50
|
+
- Clickable cards use a native Cards action with `type: fullCard`, `layout.sequence`, `behavior.type: redirectThisApp`, and a declarative same-app target. Every source substitution used by the target must be projected by the Cards source.
|
|
51
|
+
- Other supported action presentations are `title`, `subtitle`, `media`, and `button`. Only `button` requires a concise `label` and `layout.position: primary | secondary`; non-button actions omit both fields.
|
|
52
|
+
- Button actions may use `appearance.displayType: text | icon | textWithIcon`, with `appearance.icon` required for icon presentations, plus `hot` and `cssClasses`. Any action may carry `advanced.staticId` and a compiler-backed `serverSideCondition`.
|
|
53
|
+
- `behavior.type: triggerAction` omits `behavior.target` and `behavior.targetUrl` and requires a nested `triggerAction` child with its supported UI action reference. Redirect actions use only their matching target shape.
|
|
54
|
+
- If full-card navigation and a decision button compete for the same card, document the intended precedence and evidence-backed conditions in the UX contract. Do not infer mutually exclusive business conditions from the presence of both actions.
|
|
55
|
+
- Dynamic refresh must name both the trigger and the Cards region static ID. Use the supported dynamic-action Refresh capability and target only that Cards region.
|
|
56
|
+
- When refreshed SQL depends on page items, list those items in `source.pageItemsToSubmit`. Do not rely on stale browser or session state.
|
|
57
|
+
- A refresh after a modal create/edit closes is required when the changed row should appear in or disappear from the Cards result set.
|
|
58
|
+
- Use Cards-owned `cards.refresh-on-change.md` for item-change refresh and `cards.refresh-after-dialog.md` for dialog-close refresh. Do not modify or synthesize behavior from shared Dynamic Action templates.
|
|
59
|
+
|
|
60
|
+
## Security
|
|
61
|
+
|
|
62
|
+
- Cards pages inherit the authenticated-page and session-protection baseline. Add an existing region authorization scheme when the Cards source is more restricted than the page, and authorize target pages/processes independently.
|
|
63
|
+
- Prefer native text mappings. Every database or REST value inserted into an advanced HTML expression must use `&COLUMN!HTML.`; never use unescaped `&COLUMN.` for untrusted text.
|
|
64
|
+
- Prefer declarative same-app targets. A literal external target must use HTTPS. Reject HTTP, dynamic target substitutions, `javascript:`, `data:`, protocol-relative, credential-bearing, or path-traversal URLs unless a future application-specific allowlist contract proves them.
|
|
65
|
+
- SQL-backed media URL columns must be statically proven by literal or `CASE` projection results. REST media URL columns must declare `authoritative-profile-url-prefixes: [...]` in the mapped profile column's `comments.comments`; use `application-static-relative` for a relative-path-only field or list exact HTTPS prefixes.
|
|
66
|
+
- REST-backed Cards reference a declared shared REST Data Source, HTTPS REST Data Source Server, and APEX Web Credential. Credentials stay in the shared credential, and `advanced.validForUrls` must include the exact resolved server plus source-path prefix.
|
|
67
|
+
|
|
68
|
+
Rule ID: `CARDS_SECURITY_REQUIRED_001`.
|
|
69
|
+
|
|
70
|
+
## Responsive Universal Theme Layout
|
|
71
|
+
|
|
72
|
+
- Emit `componentAppearance.layout: grid` for the standard responsive layout, `float` when cards should wrap to available width, or `horizontal` when cards should stack. Choose from explicit layout intent.
|
|
73
|
+
- Emit `componentAppearance.gridColumns` only with `layout: grid` and an explicit fixed count of `2`, `3`, `4`, or `5`.
|
|
74
|
+
- Use `componentAppearance.cssClasses` only for a proven Cards-container class. Do not use custom CSS, row spans, or invented breakpoints to force responsiveness.
|
|
75
|
+
- Use `appearance.template: @/cards-container` and exact build-pinned template option values.
|
|
76
|
+
|
|
77
|
+
## Interaction Boundary
|
|
78
|
+
|
|
79
|
+
- This pattern may emit a card link/action, a Cards-region refresh dynamic action, and the page items required by that refresh.
|
|
80
|
+
- This pattern must not emit Faceted Search, Smart Filters, search fields, facets, filter blocks, results-region orchestration, or filter-specific dynamic actions.
|
|
81
|
+
- If the request combines Cards with filtering/search, route to the Faceted Search or Smart Filters page pattern and treat Cards only as that pattern's results region. In an application UX contract, declare that filtering pattern as the page owner rather than leaving `visual-summary-cards` as the sole pattern.
|
|
82
|
+
- Routing precedence: generic Cards filtering or `cards search` -> Faceted Search; direct Smart Filter Search wording -> Smart Filter Search; never co-own both.
|
|
83
|
+
|
|
84
|
+
Rule ID: `CARDS_INTERACTION_BOUNDARY_REQUIRED_001`.
|
|
85
|
+
|
|
86
|
+
## Verification Checklist
|
|
87
|
+
|
|
88
|
+
1. The normalized intent selects `visual-summary-cards`, not Dashboard, Metric Card, or Interactive Grid by synonym alone.
|
|
89
|
+
2. Source mode is exactly SQL query or REST Data Source and every requested mapping has evidence.
|
|
90
|
+
3. Native title/subtitle/body, media, icon, badge, and action blocks are used before HTML fallbacks.
|
|
91
|
+
4. Conditional style values are proven to return only the six allowed Universal Theme semantic tokens or `NULL` and are mapped only through `card.cssClasses`.
|
|
92
|
+
5. Refresh wiring names the trigger, region static ID, and any page items to submit.
|
|
93
|
+
6. Automatic responsive layout is the default; fixed columns are explicit and within `2` through `5`.
|
|
94
|
+
7. No filtering/search components are emitted by this pattern.
|
|
95
|
+
8. Page, region/action, target, HTML escaping, URL, and REST credential controls match the Cards security boundary.
|
|
@@ -161,8 +161,8 @@ Critique Gate — Navigation & Grouping (non-modal)
|
|
|
161
161
|
- Allow a thin `type: executeCode` wrapper for packaged routines only when the block is a small named-notation package call plus direct page-item assignment required for a page-coupled loader or before-header branch-gated flow.
|
|
162
162
|
- DO NOT use `type: executeCode` to re-embed business logic that belongs in the package; non-compliant wrappers must be flagged by critique (see 00-guard and 20-data/apex.logic.md).
|
|
163
163
|
- This section governs page processes only. Application processes (`appProcess`) must use `type: executeCode` per 00-guard and 10-global policies.
|
|
164
|
-
-
|
|
165
|
-
-
|
|
164
|
+
- Hard limit: if an inline PL/SQL body in a page-level artifact exceeds 4000 raw characters, critique must hard-fail `PLSQL_INLINE_BLOCK_001` and require extraction into `app_process_api` (or a justified alternative). For processes, the preferred target shape is `type: invokeApi`, with the thin-wrapper exception used only when justified by runtime-safe page-item orchestration.
|
|
165
|
+
- Hard limit: if an inline SQL body in a page-level artifact exceeds 4000 raw characters, critique must hard-fail `SQL_INLINE_BLOCK_001` and require extraction into a secure view referenced by the page artifact.
|
|
166
166
|
- Dynamic Content regions may use plsqlFunctionBody for rendering HTML/CLOB; they must not perform DML or manage transactions.
|
|
167
167
|
|
|
168
168
|
## Linking Patterns
|
package/skills/apexlang/references/policies/memory-bank/30-pages/apex.smart-filter-search.md
CHANGED
|
@@ -1,107 +1,178 @@
|
|
|
1
|
-
## Smart Filter
|
|
1
|
+
## Smart Filter Search Page Standards
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Canonical rules for a non-modal Oracle APEX page built around one Smart Filters region and one authoritative results region.
|
|
4
4
|
|
|
5
|
-
Keywords: smart filter, smart filters, smart search,
|
|
5
|
+
Keywords: smart filter, smart filters, smart filter search, searchable attributes, suggestion chips, refinements
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
## Purpose and
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
9
|
+
## Purpose and Authority
|
|
10
|
+
|
|
11
|
+
- Use the `smart-filter-search` pattern and construction pack before loading this page standard or its template family.
|
|
12
|
+
- Use compiler metadata for APEXlang legality. Ticket fields are requirements, not proof that a same-named DSL property exists.
|
|
13
|
+
- Use the exact Smart Filter family contract at `templates/region-components/smart-filter-search/smart-filter-search._common.md` after the structured pack is selected.
|
|
14
|
+
|
|
15
|
+
### Deterministic routing precedence
|
|
16
|
+
|
|
17
|
+
- `Smart Filter Search` or `Smart Filters region` -> `smart-filter-search`; exclude `faceted-search`.
|
|
18
|
+
- `Faceted Search`, `facets`, or generic filtering -> `faceted-search`.
|
|
19
|
+
- `Cards` + generic filtering or `cards search` -> `faceted-search`; Cards are results only.
|
|
20
|
+
- `Cards` + direct Smart Filter Search wording -> `smart-filter-search`; no co-ownership.
|
|
21
|
+
|
|
22
|
+
These precedence rules are routing behavior and are covered by resolver tests; they do not authorize mixing Faceted Search and Smart Filters on one page.
|
|
13
23
|
|
|
14
24
|
---
|
|
15
25
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
## Required Generation Plan
|
|
27
|
+
|
|
28
|
+
Do not generate until the plan records all of the following:
|
|
29
|
+
|
|
30
|
+
| Decision | Required evidence |
|
|
31
|
+
|----------|-------------------|
|
|
32
|
+
| `base_region_static_id` | One exact, page-unique results-region static id. |
|
|
33
|
+
| `base_source` | Secured view or canonical SQL plus `object_evidence_source: schema_doc | live_db | user_asserted`. |
|
|
34
|
+
| `searchable_attributes` | Explicit non-empty allowlist proven in the base projection. |
|
|
35
|
+
| `match_semantics` | One of `contains`, `starts`, or `exact`, plus supported per-attribute overrides if any. |
|
|
36
|
+
| `min_chars` / `max_len` | Positive integers with `max_len >= min_chars`. |
|
|
37
|
+
| `tokenization_policy` | Frozen trimming, whitespace, punctuation, case/accent, and token-order behavior. |
|
|
38
|
+
| `settings_contract` | Requested values and property-level compiler evidence for the target build. |
|
|
39
|
+
| `security_scope` | Effective authorization and server-side condition for the Smart Filters region, base region, suggestions, and refinements. |
|
|
40
|
+
| `performance_readiness` | Index/search strategy, statistics status, and expected cardinality. |
|
|
41
|
+
|
|
42
|
+
Stop with Missing Inputs while any required decision or evidence source is unresolved.
|
|
43
|
+
|
|
44
|
+
Persist the structured plan as JSON beside the app (for auto-discovery) or pass it through the generation gate. Keep ordinary `apexlang validate --app-path <path>` flag-free; use `--require-smart-filter-generation-plan` only at a mandatory generation gate. A plan may contain one direct page object or a `pages` array keyed by page number.
|
|
45
|
+
|
|
46
|
+
Validation layers:
|
|
47
|
+
|
|
48
|
+
- `artifact`: topology, target type/order, source mode/projection, wildcard rejection, allowlist order, scope inheritance, refinement shape, compiler-supported settings.
|
|
49
|
+
- `plan`: object evidence, `no_rewrite`, match/length/tokenization/compiler evidence, index strategy, statistics, cardinality.
|
|
50
|
+
- `runtime`: focus/announcement behavior, no-reload refresh, filtered exports under active scope.
|
|
51
|
+
|
|
52
|
+
Templates and ticket prose are not evidence for `plan` or `runtime`.
|
|
23
53
|
|
|
24
54
|
---
|
|
25
55
|
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
56
|
+
## Page Composition
|
|
57
|
+
|
|
58
|
+
1. Use the Standard page template unless a higher-precedence page contract proves another layout.
|
|
59
|
+
2. Place page-level navigation and create actions in the breadcrumb/title-bar region when present.
|
|
60
|
+
3. Declare exactly one Smart Filters region before exactly one authoritative base results region.
|
|
61
|
+
4. Bind `source.filteredRegion` to `@<base_region_static_id>` and to no other region.
|
|
62
|
+
5. Keep optional maps/charts as sibling visualizations; they are not additional Smart Filter base regions.
|
|
63
|
+
6. Keep keyboard order from page guidance to Smart Filters to results.
|
|
31
64
|
|
|
32
|
-
|
|
65
|
+
The APEX 24.2 base-region allowlist is Classic Report, Cards, Map, and Calendar. Interactive Report, Interactive Grid, and Content Row are not supported by this pinned contract. See [Oracle APEX 24.2 Smart Filters](https://docs.oracle.com/en/database/oracle/apex/24.2/htmdb/creating-smart-filters-page-manually.html). Target the Map region static id, not a layer; this single-dataset contract requires exactly one Map layer with a provable source. Additional visualizations may remain siblings. Preserved Markdown syntax examples from other compiler releases are not APEX 24.2 compatibility evidence; the pinned allowlist is enforced on generated `.apx` artifacts.
|
|
33
66
|
|
|
34
67
|
---
|
|
35
68
|
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
- **LOV Source** – For demo/sample data, distinct values are acceptable; for production, use curated LOVs or SQL views to control display order.
|
|
69
|
+
## Base Region and Source Contract
|
|
70
|
+
|
|
71
|
+
- The page has exactly one base region for search, suggestions, refinements, and result count semantics.
|
|
72
|
+
- `base_region_static_id` is mandatory and must resolve to that region's exact static id.
|
|
73
|
+
- The base source is a secured view or supplied canonical SQL. Prove all objects and projected columns before generation.
|
|
74
|
+
- Record named `base_source.object_evidence` entries with `object` and `source` (`schema_doc`, `live_db`, or `user_asserted`) matching every emitted source object. Booleans, bare evidence labels, and unrelated object names do not qualify.
|
|
75
|
+
- For `secured_view`, the entry matching `tableName` must additionally declare `object_type: view` and `secured: true`; a `tableView` source or a column dictionary alone does not prove a secured view.
|
|
76
|
+
- For `canonical_sql`, store the supplied SQL in `base_source.canonical_sql`. Validation compares it to the emitted SQL unchanged, apart from outer whitespace. The local object-scope checker supports simple SELECTs, joins, subqueries, and named function calls; CTEs, database links, and opaque table functions stop with Missing Inputs until their object scope can be proven.
|
|
77
|
+
- Do not auto-modify, widen, wrap, or inject predicates into canonical SQL to satisfy Smart Filter requirements.
|
|
78
|
+
- Do not use `select *`; keep the projection explicit so searchable and display columns can be proven.
|
|
79
|
+
- Preserve bind variables and the security predicates owned by the supplied source.
|
|
80
|
+
- Results-region pagination, download, no-data messaging, and column presentation remain owned by the selected exact results-region contract.
|
|
81
|
+
- `SMART_FILTER_BASE_SOURCE_CONTRACT_REQUIRED_001` blocks generation unless the source mode, object evidence, explicit projection, and no-rewrite decision are recorded.
|
|
50
82
|
|
|
51
83
|
---
|
|
52
84
|
|
|
53
|
-
##
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
5. When exports are required, enable them via the region’s Download attributes instead of custom buttons; respect security guardrails for file generation.
|
|
62
|
-
|
|
63
|
-
### Alternative Result Types
|
|
64
|
-
- Cards: follow card policies from `apex.dashboard.md` and the Cards policy section.
|
|
65
|
-
- Interactive Report/Grid: ensure all controlling filters are listed in `pageItemsToSubmit` and the IR/IG configuration follows its respective memory-bank rule.
|
|
66
|
-
- Content Row / Metric Card: allowed only when the page still has one authoritative row-based results region with compatible filterable source columns.
|
|
67
|
-
|
|
68
|
-
### Map + Filter Pages
|
|
69
|
-
- Smart Filters must target an authoritative report/cards region on map pages.
|
|
70
|
-
- Keep sibling maps synchronized with explicit refresh behavior after Smart Filter changes. Do not target the map directly and do not add unsupported map-layer `source.pageItemsToSubmit` to force the filter state into the layer.
|
|
85
|
+
## Searchable Attributes and Filter Children
|
|
86
|
+
|
|
87
|
+
- Emit at least one `type: search` child using `source.dbColumns`.
|
|
88
|
+
- Populate `source.dbColumns` only from the ordered `searchable_attributes` allowlist. Never infer the allowlist from every projected column.
|
|
89
|
+
- Every allowlisted attribute must exist in the security-trimmed base projection. Hidden, sensitive, tenant-key, and authorization-control columns are not searchable unless explicitly approved.
|
|
90
|
+
- Order the primary search child before categorical and range refinements.
|
|
91
|
+
- Use page-scoped filter tokens such as `P{page}_F_SEARCH`; avoid generic or colliding names.
|
|
92
|
+
- Categorical/range LOVs and values must be subsets of the same base dataset and must follow the compiler-valid child shape.
|
|
71
93
|
|
|
72
94
|
---
|
|
73
95
|
|
|
74
|
-
##
|
|
75
|
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
96
|
+
## Search Semantics and Tokenization
|
|
97
|
+
|
|
98
|
+
- Record one default semantic: `contains`, `starts`, or `exact`. Do not leave matching behavior implicit.
|
|
99
|
+
- `contains` matches a normalized token within a value; `starts` matches when the normalized value starts with the token; `exact` matches the complete normalized value.
|
|
100
|
+
- Do not execute searches or suggestions below `min_chars`.
|
|
101
|
+
- Reject input above `max_len` predictably; do not silently mutate it in SQL.
|
|
102
|
+
- Apply the same frozen tokenization policy to search, suggestions, and refinements. Define trimming, repeated whitespace, punctuation boundaries, case normalization, accent normalization, duplicate tokens, and token order.
|
|
103
|
+
- Use bind values for user input. Never concatenate search text into SQL.
|
|
104
|
+
- `SMART_FILTER_SEARCH_BEHAVIOR_CONTRACT_REQUIRED_001` blocks generation unless exactly one semantic, positive integer bounds with `max_len >= min_chars`, every tokenization decision, and property-level compiler evidence are recorded.
|
|
105
|
+
- If the active compiler cannot represent a required behavior, stop with Missing Inputs instead of inventing a property or rewriting the base source.
|
|
78
106
|
|
|
79
107
|
---
|
|
80
108
|
|
|
81
|
-
##
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
109
|
+
## Compiler-Gated UI Settings
|
|
110
|
+
|
|
111
|
+
The required UI contract is:
|
|
112
|
+
|
|
113
|
+
- `maxSuggestionChips: 100`
|
|
114
|
+
- `moreFiltersSuggestionChip: true`
|
|
115
|
+
- `compactNosThreshold: 10000`
|
|
116
|
+
- `showTotalRowCount`: explicitly `true` or `false`
|
|
117
|
+
- `totalRowCountLabel: Results` when `showTotalRowCount` is `true`; omit it when false
|
|
118
|
+
|
|
119
|
+
For each property, record the target compiler build and active-property evidence. Emit only properties exposed by that compiler. `SMART_FILTER_SETTINGS_VALUE_REQUIRED_001` enforces the values above for every supported property, including the conditional count label. Missing evidence raises `SMART_FILTER_SETTINGS_COMPILER_EVIDENCE_REQUIRED_001`; unsupported properties raise `SMART_FILTER_SETTINGS_UNSUPPORTED_001` and remain unresolved until the target build or an approved alternative satisfies the requirement. Never silently discard requested values.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Security and Data-Leakage Contract
|
|
124
|
+
|
|
125
|
+
- The Smart Filters and base regions must share the same effective authorization scheme and server-side condition.
|
|
126
|
+
- Apply the same checks recursively to `filterGroup` containers and their `checkbox` children. Groups inherit scope from their parent, and children inherit from the group. Validate group suggestion sources even when the group has no source column; validate every child column against the base projection.
|
|
127
|
+
- Both may omit authorization/condition only when the page contract explicitly permits the same public scope for both.
|
|
128
|
+
- Suggestion chips, suggestions, refinement values, counts, and result rows must derive from the same security-trimmed base dataset.
|
|
129
|
+
- Do not query a broader table for convenience, bypass a secured view, or omit tenant/row-level predicates in suggestion/refinement sources.
|
|
130
|
+
- Treat a suggestion value or count visible outside the base security scope as a data leak and a merge blocker.
|
|
85
131
|
|
|
86
132
|
---
|
|
87
133
|
|
|
88
|
-
##
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
134
|
+
## Performance Readiness
|
|
135
|
+
|
|
136
|
+
- Record expected base cardinality and the data-volume assumption used for UX and query decisions.
|
|
137
|
+
- Confirm optimizer statistics status for the base objects and relevant indexes.
|
|
138
|
+
- Record an index/search strategy for every searchable attribute and selected semantic.
|
|
139
|
+
- Do not claim that a normal B-tree index optimizes substring `contains` behavior. Prove a compatible text/function-based strategy or record the accepted scan cost.
|
|
140
|
+
- `SMART_FILTER_PERFORMANCE_READINESS_REQUIRED_001` blocks readiness while index strategy, statistics status, or expected-cardinality evidence is missing.
|
|
141
|
+
- Avoid applying functions to indexed searchable columns unless matching function-based index evidence exists.
|
|
142
|
+
- Do not mark the implementation ready while index strategy, statistics status, or expected cardinality is unresolved.
|
|
143
|
+
- The validator rejects duplicate `source.dbColumns` entries and, when a Generation Plan is supplied, requires the emitted order to equal the declared ordered allowlist.
|
|
92
144
|
|
|
93
145
|
---
|
|
94
146
|
|
|
95
|
-
##
|
|
96
|
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
147
|
+
## Accessibility and UX
|
|
148
|
+
|
|
149
|
+
- Give every search/refinement child a concise visible label and useful help when behavior is not self-evident.
|
|
150
|
+
- Use the search landmark when compiler truth supports the selected Smart Filters accessibility shape.
|
|
151
|
+
- Keep total-count labeling consistent: `Results` only when total row count is shown.
|
|
152
|
+
- Preserve visible focus order and announce result changes through supported native region behavior.
|
|
153
|
+
- Add help/comments to every search and refinement child. Record compiler-supported landmark/focus behavior in the plan; do not invent accessibility properties.
|
|
100
154
|
|
|
101
155
|
---
|
|
102
156
|
|
|
103
|
-
##
|
|
104
|
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
157
|
+
## Validation Checklist
|
|
158
|
+
|
|
159
|
+
- Exactly one Smart Filters region targets exactly one existing base region and appears before it.
|
|
160
|
+
- `base_region_static_id` matches the target static id.
|
|
161
|
+
- Base source and every searchable attribute have accepted object evidence.
|
|
162
|
+
- `source.dbColumns` equals the explicit allowlist and contains no extra column.
|
|
163
|
+
- Match semantics, `min_chars`, `max_len`, and tokenization are explicit and consistent.
|
|
164
|
+
- Every requested setting has property-level compiler evidence and the required value.
|
|
165
|
+
- Authorization, server-side conditions, suggestions, refinements, counts, and results share one effective security scope.
|
|
166
|
+
- Index strategy, statistics status, and expected cardinality are recorded.
|
|
167
|
+
- Search refreshes results without page reload and exports honor the active filters.
|
|
168
|
+
- Runtime acceptance records both result refresh without page reload and filtered export behavior.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## References
|
|
173
|
+
|
|
174
|
+
- Structured contracts: `assets/contracts/page-patterns.json`, `assets/contracts/page-construction-packs.json`
|
|
175
|
+
- Template family: `templates/region-components/smart-filter-search/`
|
|
176
|
+
- Cross-region constraints: `references/policies/memory-bank/40-components/apex.region-interactions.md`
|
|
177
|
+
- SQL and evidence rules: `references/policies/memory-bank/20-data/apex.sql.md`, `references/policies/memory-bank/00-guard/ai.guard.md`
|
|
178
|
+
- Alternative filtering pattern: `references/policies/memory-bank/30-pages/apex.faceted-search.md`
|
package/skills/apexlang/references/policies/memory-bank/40-components/apex.region-interactions.md
CHANGED
|
@@ -4,9 +4,13 @@
|
|
|
4
4
|
Defines reusable APEXlang region interaction contracts for links, actions, filters, contextual regions, parent-child layout, and comments.
|
|
5
5
|
|
|
6
6
|
## Interaction and Action Constraints
|
|
7
|
-
-
|
|
7
|
+
- Chart regions do not own links or actions; use adjacent cards, reports, buttons, or list entries for navigation.
|
|
8
|
+
- Metric Card supports one row-level action position, `link`. Use a declarative behavior target, deterministic action sequence, projected row mappings, and no action template or label.
|
|
9
|
+
- Metric Card `redirectThisApp` and `redirectOtherApp` link behaviors require `target`; `redirectUrl` requires a reviewed safe `targetUrl`; `triggerAction` emits neither target property and requires a matching event consumer. Reject dangerous URL schemes, protocol-relative or wholly dynamic destinations, substitutions outside query parameters, inline handlers, URL overrides in `linkAttributes`, and unsafe new-window attributes. The URL scheme, host, path, and fragment must remain static.
|
|
10
|
+
- Metric Card grouping requires grouped child-column metadata plus deterministic static ordering; native single/multiple selection requires correctly typed same-page selection items and a primary-key child column.
|
|
8
11
|
- Cards `fullCard` links must not emit a label; Cards `button` links must emit a concise label.
|
|
9
|
-
- Native Cards actions are row navigation actions using `label`
|
|
12
|
+
- Native Cards actions are row navigation or decision actions using explicit `layout.sequence`; `button` actions use `label`, `layout.position`, and optional native `appearance`, while full-card/title/subtitle/media actions omit button-only fields. Use declarative `behavior.target` for redirects, and use a nested `triggerAction` child only with `behavior.type: triggerAction`, omitting navigation targets.
|
|
13
|
+
- When full-card navigation and a decision button coexist, document the intended precedence and evidence-backed conditions in the UX contract. Do not infer mutually exclusive business conditions from the action set.
|
|
10
14
|
- List regions are navigation-only; they bind to shared list entries and must not emit data sources, filters, hidden page items, columns, links, or actions.
|
|
11
15
|
- Management and launcher hub shared list entries should include `icon.imageIconCssClasses` with a conservative `fa-*` token and `userDefinedAttributes { 1: ... }` description text so media-list hubs render as scannable launch cards.
|
|
12
16
|
- Report drilldown should be modeled as report/column links or region-level links, not as unsupported report actions.
|
|
@@ -16,6 +20,9 @@ Defines reusable APEXlang region interaction contracts for links, actions, filte
|
|
|
16
20
|
- Filter item names are page item tokens, not labels. Derive them from page number and database column: `P{page}_F_{UPPER_DB_COLUMN}`.
|
|
17
21
|
- Range filters use the same single canonical filter name as the database column; do not create `_FROM` and `_TO` item pairs for one range filter.
|
|
18
22
|
- Smart Filters search item token defaults to `P{page}_F_SEARCH`; avoid legacy `P{page}_SEARCH` for generated search items.
|
|
23
|
+
- A Smart Filters region must bind to exactly one APEX 24.2 Classic Report, Cards, Map, or Calendar base region through its explicit static id; sibling visualizations are not additional filter targets.
|
|
24
|
+
- Smart Filter search, suggestion, refinement, and count behavior must stay within the base region's effective authorization, server-side condition, and security-trimmed dataset.
|
|
25
|
+
- Treat `source.dbColumns` as an explicit searchable-attribute allowlist, not as permission to expose every base projection column.
|
|
19
26
|
- Filter item names must not collide with same-page hidden items or form page item names; suffix deterministically only when there is a real collision.
|
|
20
27
|
|
|
21
28
|
## Contextual and Parent-Child Layout
|
|
@@ -11,12 +11,13 @@ Defines reusable APEXlang BLOB, file/image, storage companion, and visual-token
|
|
|
11
11
|
- SQL-backed Classic Report and Interactive Report BLOB display aliases must project `dbms_lob.getlength(<blob_expr>)`; Cards and Content Row must project the raw BLOB expression for display-image aliases.
|
|
12
12
|
- Raw LOB projection is display-only. Do not sort, group, distinct, join, analytically partition/order, or compare raw LOB aliases; follow `SQL_PLSQL_LOB_COMPARISON_KEY_FORBIDDEN_001` in `20-data/apex.sql.md`.
|
|
13
13
|
- Cards image display uses the native Cards media block, not report-style child columns.
|
|
14
|
-
- Cards BLOB display uses `media { source: blobColumn blobColumn: <BLOB_COLUMN_ALIAS> }`.
|
|
15
|
-
- Cards URL-column display uses `media { source: urlColumn urlColumn: <URL_COLUMN_ALIAS> }`.
|
|
16
|
-
- Cards direct URL display uses `media { source: imageUrl url: <STATIC_IMAGE_URL_OR_COLUMN_SUBSTITUTION> }`; `url` may be a static URL or an APEX substitution such as `&IMAGE_URL_COLUMN.`.
|
|
14
|
+
- Cards BLOB display uses `media { advancedFormatting: false source: blobColumn blobColumn: <BLOB_COLUMN_ALIAS> position: first sizing: cover }`.
|
|
15
|
+
- Cards URL-column display uses `media { advancedFormatting: false source: urlColumn urlColumn: <URL_COLUMN_ALIAS> position: first sizing: cover }`.
|
|
16
|
+
- Cards direct URL display uses `media { advancedFormatting: false source: imageUrl url: <STATIC_IMAGE_URL_OR_COLUMN_SUBSTITUTION> position: first sizing: cover }`; `url` may be a static URL or an APEX substitution such as `&IMAGE_URL_COLUMN.`.
|
|
17
17
|
- Cards BLOB metadata uses `blobAttributes { mimeTypeColumn: <MIME_TYPE_ALIAS> lastUpdatedColumn: <LAST_UPDATED_ALIAS> }`, and that block is valid only when `media.source: blobColumn` is present.
|
|
18
|
-
- Cards media
|
|
19
|
-
-
|
|
18
|
+
- Native Cards media requires `advancedFormatting`, `position`, and, when `source` is set, `sizing`. Use deterministic defaults `advancedFormatting: false`, `position: first`, and `sizing: cover`.
|
|
19
|
+
- Supported presentation values are `position: first | body | background`, optional `appearance: square | widescreen`, and `sizing: fit | cover`.
|
|
20
|
+
- Map accessible image text with `media.imageDescription`; `accessibleDescription` is not a Cards media property in the APEX 26.1 grammar.
|
|
20
21
|
- Cards regions with BLOB media must define `card.primaryKeyColumn1` and keep companion image metadata columns projected in SQL when available, but must not invent additional `media` or `blobAttributes` properties.
|
|
21
22
|
- `Storage -> File Types` is Form-only for upload render roles and must be a comma-separated MIME-type list; `File Name Column` must be normalized to `Filename Column`.
|
|
22
23
|
- `Alt Text Column` applies only to image upload/display flows and must not be used for plain file upload.
|
|
@@ -27,7 +27,13 @@
|
|
|
27
27
|
- `skills/`
|
|
28
28
|
- Direct-entrypoint skills, domain skills, agents, references, and assets.
|
|
29
29
|
- `templates/`
|
|
30
|
-
- Canonical
|
|
30
|
+
- Canonical exact-match example families and renderer reference docs. Templates are not the primary syntax oracle.
|
|
31
|
+
- APEXlang grammar asset
|
|
32
|
+
- Syntax oracle for generated DSL shape.
|
|
33
|
+
- Compiler prop-map tools
|
|
34
|
+
- Compiler-backed semantic oracle for property, enum, slot, template-option, and component-variant legality.
|
|
35
|
+
- APEXlang structured contracts
|
|
36
|
+
- Compact pattern, IR, and package-layer contracts used before broad Markdown loading.
|
|
31
37
|
- `applications/app_###/`
|
|
32
38
|
- Final output root for generated application artifacts.
|
|
33
39
|
- `artifacts/`
|
|
@@ -42,8 +48,10 @@
|
|
|
42
48
|
|
|
43
49
|
## Deterministic Routing
|
|
44
50
|
- Natural-language routing relies on:
|
|
51
|
+
- `assets/rules.catalog.json`
|
|
45
52
|
- `assets/apex-generation/components.registry.json`
|
|
46
53
|
- `assets/rules-mapping.json`
|
|
54
|
+
- Non-trivial routing should produce a compact trace from normalized intent to rule/contract, grammar/compiler evidence, and exact template path only when needed.
|
|
47
55
|
- Direct-entrypoint skills that support one-message invocation should expose a `Router Contract` section in `SKILL.md`.
|
|
48
56
|
- Secondary reference docs must not redefine router behavior; they should point back to the owning skill.
|
|
49
57
|
|