@shwfed/config 3.0.7 → 3.0.9
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/module.json +1 -1
- package/dist/runtime/components/actions/ai-l1.md +24 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.prototype/schema.d.ts +1 -0
- package/dist/runtime/components/actions/buttons/2026-04-18/com.shwfed.actions.button.prototype/schema.js +2 -1
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/prompt.md +8 -0
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.d.ts +6 -0
- package/dist/runtime/components/actions/buttons/2026-05-11/com.shwfed.actions.button.modal.layout/schema.js +4 -0
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/prompt.md +8 -0
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.d.ts +1 -0
- package/dist/runtime/components/actions/buttons/2026-05-15/com.shwfed.actions.button.event.dispatch/schema.js +2 -1
- package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/prompt.md +9 -0
- package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/schema.d.ts +1 -0
- package/dist/runtime/components/actions/buttons/2026-06-08/com.shwfed.actions.button.http.request.json.batch/schema.js +2 -1
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/prompt.md +8 -0
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/schema.d.ts +1 -0
- package/dist/runtime/components/actions/buttons/2026-07-13/com.shwfed.actions.button.state.write/schema.js +2 -1
- package/dist/runtime/components/actions/items/2026-05-21/com.shwfed.actions.item.markdown/schema.d.ts +1 -0
- package/dist/runtime/components/actions/items/2026-05-21/com.shwfed.actions.item.markdown/schema.js +2 -1
- package/dist/runtime/components/actions/utils/ai-button-tools.d.ts +29 -0
- package/dist/runtime/components/actions/utils/ai-button-tools.js +664 -0
- package/dist/runtime/components/actions/utils/resolve.d.ts +22 -0
- package/dist/runtime/components/actions/utils/resolve.js +23 -1
- package/dist/runtime/components/config/ai-generate.d.vue.ts +7 -0
- package/dist/runtime/components/config/ai-generate.system.md +40 -0
- package/dist/runtime/components/{table → config}/ai-generate.vue +55 -32
- package/dist/runtime/components/config/ai-generate.vue.d.ts +7 -0
- package/dist/runtime/components/config/ai-page-slot.l1.md +25 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.actions/schema.d.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.actions/schema.js +4 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.d.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.js +4 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/schema.d.ts +1 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.markdown/schema.js +1 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +58 -58
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +58 -58
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +58 -58
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +58 -58
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +35 -29
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.js +4 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.d.ts +7 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.js +4 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.xy/schema.d.ts +1 -0
- package/dist/runtime/components/config/blocks/2026-05-17/com.shwfed.block.chart.xy/schema.js +1 -0
- package/dist/runtime/components/config/blocks/2026-06-01/com.shwfed.block.animated.number/schema.d.ts +1 -0
- package/dist/runtime/components/config/blocks/2026-06-01/com.shwfed.block.animated.number/schema.js +1 -0
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/schema.d.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.card/schema.js +4 -0
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.icon/schema.d.ts +1 -0
- package/dist/runtime/components/config/blocks/2026-06-02/com.shwfed.block.icon/schema.js +1 -0
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/config.d.vue.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/config.vue.d.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/runtime.d.vue.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/runtime.vue.d.ts +18 -18
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/schema.d.ts +6 -0
- package/dist/runtime/components/config/blocks/2026-06-17/com.shwfed.block.tree.single/schema.js +4 -0
- package/dist/runtime/components/config/blocks/2026-06-25/com.shwfed.block.loop/schema.d.ts +7 -0
- package/dist/runtime/components/config/blocks/2026-06-25/com.shwfed.block.loop/schema.js +4 -0
- package/dist/runtime/components/config/config.vue +24 -3
- package/dist/runtime/components/config/use-editor.d.ts +1 -0
- package/dist/runtime/components/config/use-editor.js +18 -0
- package/dist/runtime/components/config/utils/ai-cursor.d.ts +21 -0
- package/dist/runtime/components/config/utils/ai-cursor.js +833 -0
- package/dist/runtime/components/config/utils/ai-host-manuals.d.ts +2 -0
- package/dist/runtime/components/config/utils/ai-host-manuals.js +19 -0
- package/dist/runtime/components/config/utils/linkage.d.ts +15 -6
- package/dist/runtime/components/config/utils/linkage.js +23 -7
- package/dist/runtime/components/config/utils/resolve.d.ts +19 -0
- package/dist/runtime/components/config/utils/resolve.js +25 -2
- package/dist/runtime/components/form/ai-l1.md +22 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.markdown/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.text/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-22/com.shwfed.form.field.textarea/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.d.ts +7 -0
- package/dist/runtime/components/form/fields/2026-04-24/com.shwfed.form.field.actions/schema.js +4 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.date/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetime/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.time/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.number/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.numberrange/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-04-28/com.shwfed.form.field.switch/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.combobox.single.remote/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/prompt.md +8 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +7 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.js +4 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/prompt.md +12 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.d.ts +6 -0
- package/dist/runtime/components/form/fields/2026-05-18/com.shwfed.form.field.table/schema.js +4 -0
- package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/schema.d.ts +6 -0
- package/dist/runtime/components/form/fields/2026-05-20/com.shwfed.form.field.collapsible/schema.js +4 -0
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.month/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/prompt.md +7 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/prompt.md +7 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/prompt.md +9 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +8 -8
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/prompt.md +11 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/prompt.md +12 -0
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-06-09/com.shwfed.form.field.upload/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/prompt.md +14 -0
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/prompt.md +19 -0
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/schema.js +1 -0
- package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/schema.d.ts +7 -0
- package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/schema.js +4 -0
- package/dist/runtime/components/form/fields/2026-07-13/com.shwfed.form.field.dynamic/prompt.md +14 -0
- package/dist/runtime/components/form/fields/2026-07-13/com.shwfed.form.field.dynamic/schema.d.ts +1 -0
- package/dist/runtime/components/form/fields/2026-07-13/com.shwfed.form.field.dynamic/schema.js +1 -0
- package/dist/runtime/components/form/utils/ai-field-tools.d.ts +2 -2
- package/dist/runtime/components/form/utils/ai-field-tools.js +47 -30
- package/dist/runtime/components/form/utils/resolve.d.ts +11 -0
- package/dist/runtime/components/form/utils/resolve.js +13 -1
- package/dist/runtime/components/operations/2026-06-09/com.shwfed.operation.alert/schema.d.ts +1 -0
- package/dist/runtime/components/operations/2026-06-09/com.shwfed.operation.alert/schema.js +2 -1
- package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/schema.d.ts +1 -0
- package/dist/runtime/components/operations/2026-06-11/com.shwfed.operation.http.request.json/schema.js +1 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.http.download/schema.d.ts +1 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.http.download/schema.js +2 -1
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.navigation/schema.d.ts +1 -0
- package/dist/runtime/components/operations/2026-06-15/com.shwfed.operation.navigation/schema.js +2 -1
- package/dist/runtime/components/operations/2026-07-06/com.shwfed.operation.table.add-row/schema.d.ts +1 -0
- package/dist/runtime/components/operations/2026-07-06/com.shwfed.operation.table.add-row/schema.js +2 -1
- package/dist/runtime/components/operations/utils/resolve.d.ts +17 -0
- package/dist/runtime/components/operations/utils/resolve.js +18 -1
- package/dist/runtime/components/table/ai-l1.md +38 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.actions/schema.d.ts +7 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.actions/schema.js +5 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.date/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.icon/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.markdown/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.number/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.text/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-13/com.shwfed.table.column.switch.remote/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.number-input/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.switch.local/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-20/com.shwfed.table.column.text-input/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-21/com.shwfed.table.column.drag-handle/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-05-21/com.shwfed.table.column.drag-handle/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/prompt.md +12 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-multi/schema.js +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/prompt.md +16 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.combobox-single/schema.js +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-multi/schema.js +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +8 -8
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-14/com.shwfed.table.column.tree-combobox-single/schema.js +1 -0
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-17/com.shwfed.table.column.date-input/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.d.ts +1 -0
- package/dist/runtime/components/table/columns/2026-06-22/com.shwfed.table.column.date-range-input/schema.js +2 -1
- package/dist/runtime/components/table/columns/2026-07-12/com.shwfed.table.column.dynamic/prompt.md +15 -0
- package/dist/runtime/components/table/config.d.vue.ts +3 -3
- package/dist/runtime/components/table/config.vue +1 -33
- package/dist/runtime/components/table/config.vue.d.ts +3 -3
- package/dist/runtime/components/table/row-provider.vue +7 -1
- package/dist/runtime/components/table/schema.d.ts +58 -58
- package/dist/runtime/components/table/utils/ai-tools.js +16 -7
- package/dist/runtime/components/table/utils/resolve.d.ts +5 -0
- package/dist/runtime/components/table/utils/resolve.js +12 -1
- package/dist/runtime/components/tabs/index.vue +10 -2
- package/dist/runtime/components/ui/chat/ChatMessages.vue +30 -6
- package/dist/runtime/components/ui/date-picker/DatePickerInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.d.vue.ts +2 -2
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue.d.ts +2 -2
- package/dist/runtime/share/define-registry.d.ts +66 -0
- package/dist/runtime/share/define-registry.js +37 -1
- package/dist/runtime/share/use-persisted-chat.d.ts +11 -9
- package/dist/runtime/share/use-persisted-chat.js +3 -3
- package/dist/runtime/utils/ai/index.d.ts +1 -1
- package/dist/runtime/utils/ai/index.js +18 -11
- package/dist/runtime/utils/cel-catalog.d.ts +1 -0
- package/dist/runtime/utils/cel-catalog.js +10 -0
- package/dist/runtime/utils/cel-catalog.md +42 -0
- package/dist/runtime/utils/cel-context.d.ts +15 -0
- package/dist/runtime/utils/cel-context.js +8 -0
- package/dist/runtime/utils/disabled-date.d.ts +8 -2
- package/dist/runtime/utils/disabled-date.js +2 -1
- package/package.json +1 -1
- package/dist/runtime/components/table/ai-generate.d.vue.ts +0 -16
- package/dist/runtime/components/table/ai-generate.system.md +0 -101
- package/dist/runtime/components/table/ai-generate.vue.d.ts +0 -16
- /package/dist/runtime/components/{table → config}/ai-generate.system.d.ts +0 -0
- /package/dist/runtime/components/{table → config}/ai-generate.system.js +0 -0
|
@@ -28,8 +28,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
28
28
|
"onUpdate:modelValue"?: ((args_0: Date | undefined) => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
30
|
size: "sm" | "md" | "lg";
|
|
31
|
-
clearable: boolean;
|
|
32
31
|
clearIcon: string;
|
|
32
|
+
clearable: boolean;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
|
@@ -28,8 +28,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
28
28
|
"onUpdate:modelValue"?: ((args_0: Date | undefined) => any) | undefined;
|
|
29
29
|
}>, {
|
|
30
30
|
size: "sm" | "md" | "lg";
|
|
31
|
-
clearable: boolean;
|
|
32
31
|
clearIcon: string;
|
|
32
|
+
clearable: boolean;
|
|
33
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
34
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
22
22
|
size: "sm" | "md" | "lg";
|
|
23
23
|
granularity: "hour" | "minute" | "second";
|
|
24
24
|
hourCycle: 12 | 24;
|
|
25
|
-
clearable: boolean;
|
|
26
25
|
clearIcon: string;
|
|
26
|
+
clearable: boolean;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
29
29
|
export default _default;
|
|
@@ -22,8 +22,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
22
22
|
size: "sm" | "md" | "lg";
|
|
23
23
|
granularity: "hour" | "minute" | "second";
|
|
24
24
|
hourCycle: 12 | 24;
|
|
25
|
-
clearable: boolean;
|
|
26
25
|
clearIcon: string;
|
|
26
|
+
clearable: boolean;
|
|
27
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const _default: typeof __VLS_export;
|
|
29
29
|
export default _default;
|
|
@@ -29,8 +29,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
29
29
|
"onUpdate:endValue"?: ((args_0: Date | undefined) => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
31
|
size: "sm" | "md" | "lg";
|
|
32
|
-
clearable: boolean;
|
|
33
32
|
clearIcon: string;
|
|
33
|
+
clearable: boolean;
|
|
34
34
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
|
36
36
|
export default _default;
|
|
@@ -29,8 +29,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
29
29
|
"onUpdate:endValue"?: ((args_0: Date | undefined) => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
31
|
size: "sm" | "md" | "lg";
|
|
32
|
-
clearable: boolean;
|
|
33
32
|
clearIcon: string;
|
|
33
|
+
clearable: boolean;
|
|
34
34
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
35
|
declare const _default: typeof __VLS_export;
|
|
36
36
|
export default _default;
|
|
@@ -26,9 +26,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
26
26
|
size: "sm" | "md" | "lg";
|
|
27
27
|
granularity: "hour" | "minute" | "second";
|
|
28
28
|
hourCycle: 12 | 24;
|
|
29
|
-
clearable: boolean;
|
|
30
|
-
clearIcon: string;
|
|
31
29
|
rangeSeparatorIcon: string;
|
|
30
|
+
clearIcon: string;
|
|
31
|
+
clearable: boolean;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
34
34
|
export default _default;
|
|
@@ -26,9 +26,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
26
26
|
size: "sm" | "md" | "lg";
|
|
27
27
|
granularity: "hour" | "minute" | "second";
|
|
28
28
|
hourCycle: 12 | 24;
|
|
29
|
-
clearable: boolean;
|
|
30
|
-
clearIcon: string;
|
|
31
29
|
rangeSeparatorIcon: string;
|
|
30
|
+
clearIcon: string;
|
|
31
|
+
clearable: boolean;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const _default: typeof __VLS_export;
|
|
34
34
|
export default _default;
|
|
@@ -1,4 +1,40 @@
|
|
|
1
1
|
import type { Component } from 'vue';
|
|
2
|
+
import type { Schema } from 'effect';
|
|
3
|
+
type AnySchema = Schema.Schema<any, any, any>;
|
|
4
|
+
/**
|
|
5
|
+
* A recursion edge: a schema field on this block/host that embeds ANOTHER
|
|
6
|
+
* host's config (a table's `TableConfig`, a container's `Slot`, an actions
|
|
7
|
+
* bar's `ActionsConfig`…). Declared next to the schema — NEVER in a central
|
|
8
|
+
* table (that switch would be the drift class CLAUDE.md bans) — and aggregated
|
|
9
|
+
* by the registry so the AI scope cursor can walk them (`config/utils/ai-cursor`).
|
|
10
|
+
*
|
|
11
|
+
* - `key` — the schema field holding the embedded config. Validated at registry
|
|
12
|
+
* load (see `buildSchemaForEdges`): the declared key MUST be a real top-level
|
|
13
|
+
* field on the block's schema, exactly like the type/date drift checks.
|
|
14
|
+
* - `host` — the host kind whose tool family configures that subtree
|
|
15
|
+
* (`table` / `form` / `actions` / `slot`). The cursor maps this to a family;
|
|
16
|
+
* hosts with no family yet stay declared-but-not-enterable (Phase C).
|
|
17
|
+
* - `label` — designer-facing crumb for the edge (breadcrumb / orientation).
|
|
18
|
+
* - `itemSlot` — set when `key` is an ARRAY of items and the embedded host
|
|
19
|
+
* config lives at `item[itemSlot]` on each element (tabs: `key: 'tabs'`,
|
|
20
|
+
* `itemSlot: 'slot'`). Absent → `key` holds the embedded config directly.
|
|
21
|
+
* - `self` — set when the embedded host config is NOT under a sub-field but the
|
|
22
|
+
* record ITSELF (its fields spread the embedded host's fields, as `field.actions`
|
|
23
|
+
* / `column.actions` spread `ActionSchemaFields` at the top level). `key` still
|
|
24
|
+
* names a real field (for the load-time existence check), but the cursor bridges
|
|
25
|
+
* the whole record and the family merges its keys back (`config/utils/ai-cursor`).
|
|
26
|
+
* - `celScope` — names a per-edge CEL scope extension the cursor threads into the
|
|
27
|
+
* child frame's `configure` when entering (`loop-item` → `item`/`index`). Absent
|
|
28
|
+
* → the child inherits the parent scope unchanged. See design §5.
|
|
29
|
+
*/
|
|
30
|
+
export type RegistryEdge = Readonly<{
|
|
31
|
+
key: string;
|
|
32
|
+
host: string;
|
|
33
|
+
label: string;
|
|
34
|
+
itemSlot?: string;
|
|
35
|
+
self?: boolean;
|
|
36
|
+
celScope?: string;
|
|
37
|
+
}>;
|
|
2
38
|
/**
|
|
3
39
|
* Minimum shape every host's schema module must satisfy. Hosts extend this
|
|
4
40
|
* with their own metadata / capability fields via the generic.
|
|
@@ -6,6 +42,13 @@ import type { Component } from 'vue';
|
|
|
6
42
|
export type RegistryModuleBase = Readonly<{
|
|
7
43
|
type: string;
|
|
8
44
|
compatibilityDate: string;
|
|
45
|
+
/**
|
|
46
|
+
* Optional recursion-edge declarations — a block/host embedding another
|
|
47
|
+
* host's config lists them here (see `RegistryEdge`). Validated at load when
|
|
48
|
+
* the host supplies `buildSchemaForEdges`; otherwise carried through
|
|
49
|
+
* unvalidated. Absent for leaf and generator entries.
|
|
50
|
+
*/
|
|
51
|
+
edges?: ReadonlyArray<RegistryEdge>;
|
|
9
52
|
}>;
|
|
10
53
|
/**
|
|
11
54
|
* Per-entry shape produced by the factory before host-specific extras are
|
|
@@ -18,6 +61,8 @@ export type RegistryDraft<TModule extends RegistryModuleBase> = Readonly<{
|
|
|
18
61
|
config: Component;
|
|
19
62
|
runtime: Component;
|
|
20
63
|
module: TModule;
|
|
64
|
+
/** The sibling `prompt.md`'s raw text (L2 fragment), when one exists. */
|
|
65
|
+
prompt?: string;
|
|
21
66
|
}>;
|
|
22
67
|
export type RegistryOptions<TModule extends RegistryModuleBase, TEntryExtras extends object> = Readonly<{
|
|
23
68
|
/** Error-message prefix, e.g. `shwfed-form`. */
|
|
@@ -30,12 +75,30 @@ export type RegistryOptions<TModule extends RegistryModuleBase, TEntryExtras ext
|
|
|
30
75
|
configModules: Record<string, Component>;
|
|
31
76
|
/** Eager `import.meta.glob` over the host's runtime.vue files (default import). */
|
|
32
77
|
runtimeModules: Record<string, Component>;
|
|
78
|
+
/**
|
|
79
|
+
* Optional eager `import.meta.glob` over the host's sibling `prompt.md` files
|
|
80
|
+
* ({ query: '?raw', import: 'default', eager: true }), keyed by path exactly
|
|
81
|
+
* like `schemaModules`. Each entry's `prompt` is looked up from here by the
|
|
82
|
+
* same folder-suffix match. `prompt.md` is OPTIONAL per folder — an absent one
|
|
83
|
+
* leaves `entry.prompt` undefined. No dist extension tolerance is needed
|
|
84
|
+
* (unlike `schema.{ts,js}`): `@nuxt/module-builder` transpiles `.ts`→`.js` but
|
|
85
|
+
* copies `.md` verbatim, so the `.md` suffix is stable in source and `dist`.
|
|
86
|
+
*/
|
|
87
|
+
promptModules?: Record<string, string>;
|
|
33
88
|
/**
|
|
34
89
|
* Optional per-module validation beyond the type/date drift checks. Throw
|
|
35
90
|
* to fail at module load. Used by table to require `toColumnDef`
|
|
36
91
|
* to be a function.
|
|
37
92
|
*/
|
|
38
93
|
validateModule?: (mod: TModule, type: string, date: string) => void;
|
|
94
|
+
/**
|
|
95
|
+
* Optional builder that constructs a module's schema with INERT args (a
|
|
96
|
+
* no-op configure, a stand-in `blockRef`) purely so the registry can verify
|
|
97
|
+
* every declared `edges[].key` is a real top-level field on it — the
|
|
98
|
+
* edge-declaration analog of the type/date drift check. Only invoked for
|
|
99
|
+
* modules that declare `edges`. Omit → edges are carried through unvalidated.
|
|
100
|
+
*/
|
|
101
|
+
buildSchemaForEdges?: (mod: TModule) => AnySchema;
|
|
39
102
|
/**
|
|
40
103
|
* Optional predicate deciding whether a given module may ship WITHOUT a
|
|
41
104
|
* sibling `runtime.vue`. Returns true → the runtime lookup is tolerant and
|
|
@@ -60,9 +123,12 @@ export type RegistryEntry<TModule extends RegistryModuleBase, TEntryExtras exten
|
|
|
60
123
|
config: Component;
|
|
61
124
|
runtime: Component;
|
|
62
125
|
module: TModule;
|
|
126
|
+
/** The sibling `prompt.md`'s raw text (L2 fragment), when one exists. */
|
|
127
|
+
prompt?: string;
|
|
63
128
|
} & TEntryExtras>;
|
|
64
129
|
export type Registry<TModule extends RegistryModuleBase, TEntryExtras extends object> = Readonly<{
|
|
65
130
|
ENTRIES: ReadonlyArray<RegistryEntry<TModule, TEntryExtras>>;
|
|
66
131
|
find: (type: string, compatibilityDate: string) => RegistryEntry<TModule, TEntryExtras> | undefined;
|
|
67
132
|
}>;
|
|
68
133
|
export declare function defineRegistry<TModule extends RegistryModuleBase, TEntryExtras extends object = Record<never, never>>(options: RegistryOptions<TModule, TEntryExtras>): Registry<TModule, TEntryExtras>;
|
|
134
|
+
export {};
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
function topLevelFieldNames(schema) {
|
|
2
|
+
const unwrap = (ast) => {
|
|
3
|
+
switch (ast._tag) {
|
|
4
|
+
case "TypeLiteral":
|
|
5
|
+
return ast;
|
|
6
|
+
case "Transformation":
|
|
7
|
+
return unwrap(ast.to);
|
|
8
|
+
case "Refinement":
|
|
9
|
+
return unwrap(ast.from);
|
|
10
|
+
case "Suspend":
|
|
11
|
+
return unwrap(ast.f());
|
|
12
|
+
default:
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const tl = unwrap(schema.ast);
|
|
17
|
+
return tl ? tl.propertySignatures.map((p) => String(p.name)) : [];
|
|
18
|
+
}
|
|
1
19
|
export function defineRegistry(options) {
|
|
2
20
|
const {
|
|
3
21
|
hostName,
|
|
@@ -5,7 +23,9 @@ export function defineRegistry(options) {
|
|
|
5
23
|
schemaModules,
|
|
6
24
|
configModules,
|
|
7
25
|
runtimeModules,
|
|
26
|
+
promptModules,
|
|
8
27
|
validateModule,
|
|
28
|
+
buildSchemaForEdges,
|
|
9
29
|
runtimeOptional,
|
|
10
30
|
deriveEntryExtras
|
|
11
31
|
} = options;
|
|
@@ -27,6 +47,18 @@ export function defineRegistry(options) {
|
|
|
27
47
|
if (found === void 0) throw new Error(`[${hostName}] missing ${file} for ${type}@${date}`);
|
|
28
48
|
return found;
|
|
29
49
|
};
|
|
50
|
+
const validateEdges = (mod, type, date) => {
|
|
51
|
+
const edges = mod.edges;
|
|
52
|
+
if (!edges || edges.length === 0 || !buildSchemaForEdges) return;
|
|
53
|
+
const fields = new Set(topLevelFieldNames(buildSchemaForEdges(mod)));
|
|
54
|
+
for (const edge of edges) {
|
|
55
|
+
if (!fields.has(edge.key)) {
|
|
56
|
+
throw new Error(
|
|
57
|
+
`[${hostName}] edge key "${edge.key}" declared on "${type}@${date}" is not a field on its schema (has: ${[...fields].join(", ") || "<none>"})`
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
30
62
|
let cached = null;
|
|
31
63
|
const compute = () => {
|
|
32
64
|
if (cached) return cached;
|
|
@@ -40,13 +72,16 @@ export function defineRegistry(options) {
|
|
|
40
72
|
throw new Error(`[${hostName}] compatibilityDate "${mod.compatibilityDate}" does not match folder "${date}"`);
|
|
41
73
|
}
|
|
42
74
|
validateModule?.(mod, type, date);
|
|
75
|
+
validateEdges(mod, type, date);
|
|
43
76
|
const runtime = runtimeOptional?.(mod) ? findSiblingOptional(runtimeModules, date, type, "runtime.vue") : findSibling(runtimeModules, date, type, "runtime.vue");
|
|
44
77
|
drafts.push({
|
|
45
78
|
type: mod.type,
|
|
46
79
|
compatibilityDate: mod.compatibilityDate,
|
|
47
80
|
config: findSibling(configModules, date, type, "config.vue"),
|
|
48
81
|
runtime,
|
|
49
|
-
module: mod
|
|
82
|
+
module: mod,
|
|
83
|
+
// `prompt.md` is optional per folder; absent → undefined.
|
|
84
|
+
...promptModules ? { prompt: findSiblingOptional(promptModules, date, type, "prompt.md") } : {}
|
|
50
85
|
});
|
|
51
86
|
}
|
|
52
87
|
const mapExtras = deriveEntryExtras ? deriveEntryExtras(drafts) : () => ({});
|
|
@@ -56,6 +91,7 @@ export function defineRegistry(options) {
|
|
|
56
91
|
config: draft.config,
|
|
57
92
|
runtime: draft.runtime,
|
|
58
93
|
module: draft.module,
|
|
94
|
+
...draft.prompt !== void 0 ? { prompt: draft.prompt } : {},
|
|
59
95
|
...mapExtras(draft)
|
|
60
96
|
}));
|
|
61
97
|
return cached;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
2
|
import type { UIMessage } from '../utils/ai/parts.js';
|
|
3
3
|
/**
|
|
4
|
-
* Mirrors
|
|
5
|
-
*
|
|
6
|
-
* component unmounting — switching away from the
|
|
7
|
-
* unmounts
|
|
8
|
-
*
|
|
9
|
-
*
|
|
4
|
+
* Mirrors an AI-chat history into `sessionStorage`, keyed on a stable id (the
|
|
5
|
+
* top-level config panel uses `location.pathname`), so the conversation survives
|
|
6
|
+
* both the chat component unmounting — switching away from the AI view
|
|
7
|
+
* `v-if`-unmounts it, dropping its local `ref<UIMessage[]>` — and a page reload.
|
|
8
|
+
* It clears when the browser tab is closed (`sessionStorage` lifetime), giving a
|
|
9
|
+
* per-instance, session-scoped chat memory. (Originally built for the table AI
|
|
10
|
+
* panel, removed in Phase C; now serves the top-level `config/ai-generate.vue`.)
|
|
10
11
|
*
|
|
11
12
|
* Modeled on `usePersistedQuery`: every access is SSR-guarded and guarded
|
|
12
|
-
* against unavailable storage (privacy modes). With no `tableId()`
|
|
13
|
-
*
|
|
13
|
+
* against unavailable storage (privacy modes). With no `tableId()` (the key
|
|
14
|
+
* getter — a misnomer kept from its table origin) persistence is a no-op
|
|
15
|
+
* (in-memory only) so id-less drafts can't collide on a shared key.
|
|
14
16
|
*
|
|
15
17
|
* - `restore()` seeds `messages` from the stored snapshot. Call it in
|
|
16
18
|
* `onMounted`, after the fresh component's empty ref exists, so a remount
|
|
@@ -24,7 +26,7 @@ import type { UIMessage } from '../utils/ai/parts.js';
|
|
|
24
26
|
* replays history as prose only (`partsToText` in `utils/ai`), so a continued
|
|
25
27
|
* conversation never re-sends a dangling tool_use across the restore boundary.
|
|
26
28
|
*/
|
|
27
|
-
export declare function usePersistedChat(tableId: () => string | undefined, messages: Ref<UIMessage[]
|
|
29
|
+
export declare function usePersistedChat(tableId: () => string | undefined, messages: Ref<UIMessage[]>, keyPrefix?: string): {
|
|
28
30
|
restore: () => void;
|
|
29
31
|
clear: () => void;
|
|
30
32
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { watch } from "vue";
|
|
2
2
|
const STORAGE_PREFIX = "shwfed.table.ai-chat.";
|
|
3
|
-
export function usePersistedChat(tableId, messages) {
|
|
4
|
-
const key = () => `${
|
|
3
|
+
export function usePersistedChat(tableId, messages, keyPrefix = STORAGE_PREFIX) {
|
|
4
|
+
const key = () => `${keyPrefix}${tableId()}`;
|
|
5
5
|
const active = () => Boolean(tableId()) && typeof window !== "undefined";
|
|
6
6
|
function restore() {
|
|
7
7
|
if (!active()) return;
|
|
@@ -18,7 +18,7 @@ export function usePersistedChat(tableId, messages) {
|
|
|
18
18
|
const id = tableId();
|
|
19
19
|
if (!id) return;
|
|
20
20
|
try {
|
|
21
|
-
window.sessionStorage.removeItem(`${
|
|
21
|
+
window.sessionStorage.removeItem(`${keyPrefix}${id}`);
|
|
22
22
|
} catch {
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -31,7 +31,7 @@ export interface GenerateObjectInput<A, I extends Record<string, unknown>> {
|
|
|
31
31
|
export interface StreamChatInput {
|
|
32
32
|
readonly messages: ReadonlyArray<UIMessage>;
|
|
33
33
|
readonly system?: string;
|
|
34
|
-
readonly tools?: ReadonlyArray<AgenticTool
|
|
34
|
+
readonly tools?: ReadonlyArray<AgenticTool> | (() => ReadonlyArray<AgenticTool>);
|
|
35
35
|
readonly signal?: AbortSignal;
|
|
36
36
|
readonly maxTokens?: number;
|
|
37
37
|
readonly onMessageUpdate?: (assistant: UIMessage) => void;
|
|
@@ -257,25 +257,32 @@ function partsToText(parts) {
|
|
|
257
257
|
return parts.filter((p) => p.type === "text").map((p) => p.text).join("");
|
|
258
258
|
}
|
|
259
259
|
async function streamChat(input) {
|
|
260
|
-
const
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
})) : void 0;
|
|
260
|
+
const readTools = (() => {
|
|
261
|
+
const t = input.tools;
|
|
262
|
+
if (typeof t === "function") return t;
|
|
263
|
+
const arr = t ?? [];
|
|
264
|
+
return () => arr;
|
|
265
|
+
})();
|
|
267
266
|
const messages = input.messages.map(
|
|
268
267
|
(m) => ({ role: m.role, content: partsToText(m.parts) })
|
|
269
268
|
);
|
|
270
|
-
const
|
|
271
|
-
...tools !== void 0 ? { tools } : {},
|
|
272
|
-
...input.maxTokens !== void 0 ? { maxTokens: input.maxTokens } : {}
|
|
273
|
-
};
|
|
269
|
+
const maxTokensOpt = input.maxTokens !== void 0 ? { maxTokens: input.maxTokens } : {};
|
|
274
270
|
const assistant = { id: createMessageId(), role: "assistant", parts: [] };
|
|
275
271
|
const publish = () => input.onMessageUpdate?.(assistant);
|
|
276
272
|
const MAX_TRUNCATION_STREAK = 3;
|
|
277
273
|
let truncationStreak = 0;
|
|
278
274
|
for (; ; ) {
|
|
275
|
+
const helperTools = readTools();
|
|
276
|
+
const helperByName = new Map(helperTools.map((t) => [t.name, t]));
|
|
277
|
+
const anthropicTools = helperTools.length > 0 ? helperTools.map((t) => ({
|
|
278
|
+
name: t.name,
|
|
279
|
+
description: t.description,
|
|
280
|
+
input_schema: t.inputJsonSchema
|
|
281
|
+
})) : void 0;
|
|
282
|
+
const opts = {
|
|
283
|
+
...anthropicTools !== void 0 ? { tools: anthropicTools } : {},
|
|
284
|
+
...maxTokensOpt
|
|
285
|
+
};
|
|
279
286
|
const partByIndex = /* @__PURE__ */ new Map();
|
|
280
287
|
const response = await callStream(messages, input.system, opts, input.signal, () => {
|
|
281
288
|
}, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getCelCatalog(): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import rawCatalog from "./cel-catalog.md?raw";
|
|
2
|
+
let catalog = rawCatalog;
|
|
3
|
+
if (import.meta.hot) {
|
|
4
|
+
import.meta.hot.accept("./cel-catalog.md?raw", (mod) => {
|
|
5
|
+
if (typeof mod?.default === "string") catalog = mod.default;
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
export function getCelCatalog() {
|
|
9
|
+
return catalog;
|
|
10
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
CEL(Common Expression Language)是一门小而安全的**单表达式**语言:没有语句、赋值、循环或函数定义,整段表达式求值为一个值。以下是本项目可用的操作符与函数速查(完整语义见字段级注解与实际类型检查报错)。
|
|
2
|
+
|
|
3
|
+
## 类型
|
|
4
|
+
|
|
5
|
+
`number`(任意精度小数,无 int/float 之分)、`string`(单双引号,`'''多行'''`,`r'原始'`)、`bool`、`bytes`、`null`、`list`、`map`、`Date`(`date('2023-01-15')` 或 `date(unixSeconds)`)。
|
|
6
|
+
|
|
7
|
+
## 操作符
|
|
8
|
+
|
|
9
|
+
- 算术:`+ - * / %`、一元 `-`(仅 `number`;`/` 保留 20 位有效数字,勿用 `==` 直接比较除法结果)。
|
|
10
|
+
- 比较:`== != < <= > >=`(对 list/map 深比较)。
|
|
11
|
+
- 逻辑:`&& || !`(短路)。
|
|
12
|
+
- 三元:`cond ? a : b`。
|
|
13
|
+
- 成员:`x in [列表]`、`key in {映射}`。
|
|
14
|
+
- 拼接:字符串 / 列表用 `+`;`[...a, x]` / `{...a, "k": v}` 展开(后写覆盖先写)。
|
|
15
|
+
- 字段访问:`obj.field`、`obj["field"]`;**可选访问** `obj.?field`、`obj[?0]`(返回 `optional`,字段可能缺失时优先用)。
|
|
16
|
+
|
|
17
|
+
## Optional(可选值,`.?` 会产生)
|
|
18
|
+
|
|
19
|
+
`optional.of(x)` / `optional.ofNullable(x)`(null→None)/ `optional.none()`;`o.orValue(默认值)`(取值或默认)、`o.or(其他optional)`、`o.hasValue()`、`o.value()`;`o.map(v, 表达式)`、`o.flatMap(v, optional)`、`o.filter(v, 布尔)`、`o.exists(v, 布尔)`。典型:`row.?amount.orValue(0)`。
|
|
20
|
+
|
|
21
|
+
## 常用函数
|
|
22
|
+
|
|
23
|
+
- 类型转换:`number(x)`、`string(x)`、`bool(x)`、`type(x)`、`dyn(x)`。无 `int()`,取整用 `math.trunc/floor/ceil/round`。
|
|
24
|
+
- 数学:`math.trunc/floor/ceil/round/abs(n)`、`math.min/max(a, b)` 或 `math.min/max(list)`。
|
|
25
|
+
- 字符串(方法):`s.size()`、`s.contains(x)`、`s.startsWith/endsWith(x)`、`s.matches(正则)`、`s.substring(i[, j])`、`s.split(sep)`、`s.trim()`、`s.replace(from, to[, limit])`、`s.lowerAscii()/upperAscii()`。
|
|
26
|
+
- 列表(宏 / 方法):`l.size()`、`l.map(x, 表达式)`、`l.filter(x, 布尔)`、`l.all(x, 布尔)`、`l.exists(x, 布尔)`、`l.exists_one(x, 布尔)`、`l.enumerate()`(→ `{index, value}` 列表)、`l.slice(i[, j])`(支持负索引)。
|
|
27
|
+
- 映射:`Map.fromList(pairs)` / `Map.toList(m)`(pair 为 `{key, value}`,是从数据构建 map 的唯一方式)。
|
|
28
|
+
- JSON:`JSON.parse(s)`、`JSON.stringify(x)`。
|
|
29
|
+
- 日期:`date(...)`、`d.get('year'|'month'(1基)|'day'|'hour'|...)`、`d.diff(other, unit)`(有符号,受者为被减数)、`d.offset(n, unit)`、`d.startOf/endOf(unit)`、`d.format(...)`、`Date.tz(...)`。
|
|
30
|
+
- 区间:`range(a, b[, step])`、`range(startDate, endDate, unit)`(右开)。
|
|
31
|
+
|
|
32
|
+
## HTTP(构建请求,不发起)
|
|
33
|
+
|
|
34
|
+
CEL 只**构建** `HttpRequest`,由宿主发起。链式:
|
|
35
|
+
```cel
|
|
36
|
+
http.get(hostname + '/path') // 或 .post / .put / .delete;端点须为绝对 URL,用 hostname 变量,勿写 {{env}}
|
|
37
|
+
.header('Content-Type', 'application/json')
|
|
38
|
+
.query(query) // query = 全部搜索条件;放在最前
|
|
39
|
+
.query('key', value) // 值可为 string | number | optional<...>(None 则不追加该参数)
|
|
40
|
+
.body({ ... }) // POST/PUT 请求体
|
|
41
|
+
```
|
|
42
|
+
`form({...})` 构建 `FormData`(文件上传:`.body(form({"file": f, "name": "a"}))`)。
|
|
@@ -6,6 +6,21 @@ export type CELVar = {
|
|
|
6
6
|
value: unknown;
|
|
7
7
|
};
|
|
8
8
|
export type CELContext = Record<string, CELVar>;
|
|
9
|
+
/**
|
|
10
|
+
* A compact CEL scope entry for AI tool output — `name` + `type`, plus the
|
|
11
|
+
* designer-facing `label` / `description` when they add anything. Flattens a
|
|
12
|
+
* `CELContext` (whose `value` thunks are irrelevant to the model) into the
|
|
13
|
+
* variable table `describe_*_settings` hands the agent alongside the function
|
|
14
|
+
* catalog. Same probed source the ExpressionEditor advertises, so the two can't
|
|
15
|
+
* drift.
|
|
16
|
+
*/
|
|
17
|
+
export type CELScopeEntry = {
|
|
18
|
+
name: string;
|
|
19
|
+
type: string;
|
|
20
|
+
label?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
};
|
|
23
|
+
export declare function renderCelScope(context: CELContext): CELScopeEntry[];
|
|
9
24
|
export declare const SCOPE_ADDRESS_VAR = "__scopes__";
|
|
10
25
|
export declare const SELECTIONS_VAR = "selections";
|
|
11
26
|
export declare const OPTIONS_VAR = "options";
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { computed, inject, provide, shallowRef } from "vue";
|
|
2
2
|
import { injectLocal, provideLocal } from "@vueuse/core";
|
|
3
|
+
export function renderCelScope(context) {
|
|
4
|
+
return Object.entries(context).map(([name, v]) => ({
|
|
5
|
+
name,
|
|
6
|
+
type: v.type,
|
|
7
|
+
...v.label && v.label !== name ? { label: v.label } : {},
|
|
8
|
+
...v.description ? { description: v.description } : {}
|
|
9
|
+
}));
|
|
10
|
+
}
|
|
3
11
|
export const SCOPE_ADDRESS_VAR = "__scopes__";
|
|
4
12
|
export const SELECTIONS_VAR = "selections";
|
|
5
13
|
export const OPTIONS_VAR = "options";
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import type { DateValue } from 'reka-ui';
|
|
2
2
|
/**
|
|
3
3
|
* Convert an `@internationalized/date` `DateValue` (what the picker's
|
|
4
|
-
* `disabledDate` callback receives) to
|
|
5
|
-
* see
|
|
4
|
+
* `disabledDate` callback receives) to the CEL `Date` type, so user expressions
|
|
5
|
+
* see `input: Date`. Mirrors `pickerValueToNative` in
|
|
6
6
|
* `ui/date-picker/DatePicker.vue` (minus the `Time` branch — the per-date
|
|
7
7
|
* predicate never receives a `Time`). For a `CalendarDate` (date/month/year
|
|
8
8
|
* panels) the time fields are absent and default to `0`; for `month` panels the
|
|
9
9
|
* candidate is the first of the month (`day` is `1`).
|
|
10
|
+
*
|
|
11
|
+
* MUST be a `TZDate`, not a plain `new Date()`: CEL's registry maps its `Date`
|
|
12
|
+
* type to the `TZDate` constructor exactly (`registerType('Date', TZDate)`), so
|
|
13
|
+
* a plain `Date`'s constructor lookup misses and the evaluator throws
|
|
14
|
+
* `Unsupported type: Date`. Same requirement as the `now` variable in
|
|
15
|
+
* `form/index.vue`.
|
|
10
16
|
*/
|
|
11
17
|
export declare function dateValueToNative(d: DateValue): Date;
|
|
12
18
|
/**
|
package/package.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Environment } from '../../vendor/cel-js/lib/index.js';
|
|
2
|
-
type AnyRecord = Record<string, any>;
|
|
3
|
-
type __VLS_Props = {
|
|
4
|
-
configure?: (env: Environment) => void;
|
|
5
|
-
};
|
|
6
|
-
type __VLS_ModelProps = {
|
|
7
|
-
modelValue: AnyRecord;
|
|
8
|
-
};
|
|
9
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
-
"update:modelValue": (value: AnyRecord) => any;
|
|
12
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
-
"onUpdate:modelValue"?: ((value: AnyRecord) => any) | undefined;
|
|
14
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
-
declare const _default: typeof __VLS_export;
|
|
16
|
-
export default _default;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
帮助用户进行配置表格。你的回复可以使用 CommonMark。你应该按照:确认既存配置、变更新增配置、验证配置结果的循环进行。
|
|
2
|
-
|
|
3
|
-
## 处理 API 接口
|
|
4
|
-
|
|
5
|
-
用户可能发送给你 API 接口信息。根据 API 接口可以配置如下内容
|
|
6
|
-
|
|
7
|
-
- 通用配置
|
|
8
|
-
- 列
|
|
9
|
-
- 搜索条件
|
|
10
|
-
|
|
11
|
-
### 配置通用配置
|
|
12
|
-
|
|
13
|
-
利用 API 接口名字等相关信息,配置表格 `displayName`。
|
|
14
|
-
|
|
15
|
-
根据 API 接口,构造 `dataSource` 相关字段。对于 `request` 应当形如
|
|
16
|
-
|
|
17
|
-
```cel
|
|
18
|
-
http
|
|
19
|
-
.post('<construct full URL>') // use .get if request is in GET method
|
|
20
|
-
|
|
21
|
-
// API doc might use env var surrounded by double brackets, these are NOT AVAILABLE in CEL, you should use the `hostname` var instead, e.g., `.get(hostname + '/foo/bar')`
|
|
22
|
-
|
|
23
|
-
.header('<key>', '<value>') // use this to set request header
|
|
24
|
-
|
|
25
|
-
.query(query) // `query` represents all the table search conditions, put it as the first query
|
|
26
|
-
.query('<key>', '<value>') // .query method signature: .query(string, string | number | optional<string> | optional<number> | dyn)
|
|
27
|
-
|
|
28
|
-
// API doc might contain demonstration purpose query, DO NOT hardcode
|
|
29
|
-
// same name query will NOT overwrite, but form URL like `&foo=bar&foo=zoo`
|
|
30
|
-
|
|
31
|
-
// if the API supports pagination, you might need to use `pageIndex` and `pageSize` to pass pagination info to the backend, like `.query('page_index', pageIndex + 1).query('page_size', pageSize)`, be aware the `pageIndex` var starts from 0
|
|
32
|
-
|
|
33
|
-
// if the request is POST, you can set `.body`, it's signature is `.body(dyn)`
|
|
34
|
-
// if you're gonna sent JSON request, remember to set `.header('Content-Type', 'application/json')` where header name is case-insensitive following RFC.
|
|
35
|
-
.body({
|
|
36
|
-
// ...
|
|
37
|
-
})
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
对于 `data` 应当指向 Response 的列表,比如对于下面的这个响应,`data` 应当设置为 `json.?data.?list`
|
|
41
|
-
|
|
42
|
-
```json
|
|
43
|
-
{
|
|
44
|
-
"code": 0,
|
|
45
|
-
"data": {
|
|
46
|
-
"list": [
|
|
47
|
-
{
|
|
48
|
-
"foo": "bar",
|
|
49
|
-
"buz": {
|
|
50
|
-
"bao": "zoo"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
"total": 100,
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
对于 `total`,应当指向 Response 中服务器查询到的**总数**,对于上述例子是 `json.?data.?total` 如果你没有找到对应的字段,这个字段可以不填写,并且调用工具将分页功能关闭。
|
|
60
|
-
|
|
61
|
-
### 配置列
|
|
62
|
-
|
|
63
|
-
你应该寻找到最外侧的列表。这个列表的每一个元素,通常代表了一行。而其中的每个字段,通常代表了一列。
|
|
64
|
-
|
|
65
|
-
调用工具,选取合适的类型。你应该首要考虑文本、数值、日期类型。
|
|
66
|
-
|
|
67
|
-
对于只读的字段,你需要配置 `accessor`,可以使用 `row` 变量,`row` 特指当前行。`accessor` 应该**相对于列表元素**来写,不需要再重复访问列表字段本身。使用 CEL 的 optional 语法,如 `row.?foo.?bar`。
|
|
68
|
-
|
|
69
|
-
```json
|
|
70
|
-
{
|
|
71
|
-
"code": 0,
|
|
72
|
-
"data": {
|
|
73
|
-
"list": [
|
|
74
|
-
{
|
|
75
|
-
"foo": "bar",
|
|
76
|
-
"buz": {
|
|
77
|
-
"bao": "zoo"
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
对于上述例子,如果需要展示 `bar` 这个值作为一列,其 `accessor` 应为 `row.?foo`;如果需要展示 `zoo` 这个值作为一列,其 `accessor` 应为 `row.?buz.?bao`。
|
|
86
|
-
|
|
87
|
-
你应当选取至少一列,并且设置它的 `grow` 为 `true`。
|
|
88
|
-
|
|
89
|
-
对于金额类型的字段:使用数字类型的列;将其 `align` 设置为 `right`;将其 `displayMode` 设置为 `monoThousand`;设置一个合理的宽度,如 200 或 `grow` 为 `true`。
|
|
90
|
-
|
|
91
|
-
对于普通的数字:使用数字类型的列;将其 `align` 设置为 `center`。
|
|
92
|
-
|
|
93
|
-
对于日期、时间类型的字段:使用日期类型的列;对于时间,设置列宽为 140;对于日期,设置列宽为 120;将其 `align` 设置为 `center`。
|
|
94
|
-
|
|
95
|
-
对于用户名、ID、各种类型等较短字段,酌情将其 `align` 设置为 `center`。
|
|
96
|
-
|
|
97
|
-
### 配置搜索条件
|
|
98
|
-
|
|
99
|
-
你应该根据 API 文档配置其支持的搜索条件。搜索条件应该排除分页、排序相关信息,仅包含业务逻辑。
|
|
100
|
-
|
|
101
|
-
你应该首要考虑文本输入、数字输入、数字范围输入、日期范围输入、日期时间范围输入。如果你遇到了从多个值中选取一个或多个,考虑单选或者多选。如果你不能确定单选和多选的选项,向用户提问。当你不确定选项时,向用户所要配置选项的相关信息。
|