Feat v0.3.0 workflow schema (#14)
All checks were successful
All checks were successful
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #14.
This commit is contained in:
37
CHANGELOG.md
37
CHANGELOG.md
@@ -2,6 +2,43 @@
|
||||
|
||||
All notable changes to Switchboard Core are documented here.
|
||||
|
||||
## v0.3.0 — Workflow Schema Redesign
|
||||
|
||||
### Changed
|
||||
|
||||
- **`workflow_stages` schema modernized**: Dropped chat-era columns (`persona_id`,
|
||||
`history_mode`). Renamed `transition_rules` → `stage_config`. Updated
|
||||
`stage_mode` CHECK from `(form_only, form_chat, review, custom)` to
|
||||
`(form, review, delegated, automated)`.
|
||||
- **New stage fields**: Added `audience` (team | public | system), `stage_type`
|
||||
(simple | dynamic | automated), `starlark_hook` (package_id:entry_point),
|
||||
and `branch_rules` (JSONB array of routing conditions).
|
||||
- **Routing engine**: `ResolveNextStage` now reads `branch_rules` (flat array)
|
||||
instead of `transition_rules.conditions` (nested object). Cleaner separation
|
||||
between routing rules and stage config.
|
||||
- **Hook handler**: `FireOnAdvanceHook` reads from `stage_config` instead of
|
||||
`transition_rules`. Renamed `channelID` parameter to `instanceID`.
|
||||
- **Stage CRUD validation**: New fields validated on create/update. `delegated`
|
||||
mode requires `surface_pkg_id`. `dynamic`/`automated` stage_type requires
|
||||
`starlark_hook`.
|
||||
- **Package export/import**: Updated to use new field names. Workflow packages
|
||||
now include `audience`, `stage_type`, `starlark_hook`, `branch_rules`,
|
||||
`stage_config`.
|
||||
- **Starlark workflow module**: Stage dicts now include `audience` and
|
||||
`stage_type` keys. Removed `history_mode` and `persona_id`.
|
||||
- **Frontend stage editor**: Both admin and team-admin surfaces updated with
|
||||
new mode values, audience selector, stage type selector, and conditional
|
||||
Starlark hook input. Fixed pre-existing bug in admin workflows.js where
|
||||
`STAGE_MODES` still contained `chat_only`.
|
||||
|
||||
### Removed
|
||||
|
||||
- `persona_id` column from `workflow_stages` (personas are extension concerns)
|
||||
- `history_mode` column from `workflow_stages` (chat-era context management)
|
||||
- `StageModeCustom`, `StageModeFormOnly`, `StageModeFormChat` Go constants
|
||||
|
||||
---
|
||||
|
||||
## v0.2.9 — Builtin Extension Retirement
|
||||
|
||||
### Changed
|
||||
|
||||
Reference in New Issue
Block a user