@praxisui/cron-builder 8.0.0-beta.0 → 8.0.0-beta.100

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 CHANGED
@@ -79,6 +79,7 @@ Template-only example:
79
79
  Exports:
80
80
  - `PdxCronBuilderComponent`
81
81
  - Types: `CronBuilderMetadata`, `SimpleCronFormValue`, `AdvancedCronFormValue`, `CronPresetType`
82
+ - Scheduler authoring foundation: `ScheduleAuthoringConfig`, `CronDialect`, `CRON_DIALECTS`, `normalizeScheduleValue`, `compileScheduleExpression`, `validateScheduleAuthoringConfig`, `createSchedulePreview`
82
83
 
83
84
  Inputs/Outputs:
84
85
  - `metadata: CronBuilderMetadata` – configure fields, timezone, locale, presets, preview.
@@ -93,6 +94,66 @@ Inputs/Outputs:
93
94
  - `previewOccurrences?: number` – number of preview dates to show.
94
95
  - `validators?: { invalidCronMessage?: string }` – customize error messages.
95
96
 
97
+ ## Scheduler Authoring Foundation
98
+
99
+ `@praxisui/cron-builder` also exposes the canonical foundation for evolving CRON editing into schedule authoring.
100
+ This keeps enterprise scheduling semantics in the library instead of pushing cron parsing, dialect checks or preview policy into host applications.
101
+
102
+ The initial contract is `ScheduleAuthoringConfig`. It models:
103
+ - schedule kind: `once`, `interval`, `daily`, `weekly`, `monthly` or `customCron`;
104
+ - timezone and locale;
105
+ - CRON expression plus explicit dialect;
106
+ - recurrence intent;
107
+ - start/end window;
108
+ - execution policy such as enabled state, missed-run policy, concurrency and jitter;
109
+ - preview configuration;
110
+ - governance metadata such as name, owner and tags.
111
+
112
+ The exported `CRON_DIALECTS` matrix describes the supported dialect families:
113
+ - Unix cron
114
+ - Quartz cron
115
+ - AWS EventBridge cron
116
+ - Kubernetes CronJob
117
+ - GitHub Actions schedule
118
+ - Google Cloud Scheduler
119
+
120
+ Use `normalizeScheduleValue(value)` to convert legacy string values into `ScheduleAuthoringConfig` while preserving current `ControlValueAccessor` compatibility.
121
+ The current component still emits the existing CRON string; the schedule authoring contract is the platform foundation for the next visual authoring iteration.
122
+
123
+ Runtime helpers:
124
+ - `compileScheduleExpression(config)` compiles supported schedule intents (`interval`, `daily`, `weekly`, `monthly`, `customCron`) into CRON when the intent has a portable representation.
125
+ - `validateScheduleAuthoringConfig(config)` returns structured diagnostics for invalid or non-portable schedules.
126
+ - `createSchedulePreview(value, preview)` returns the compiled expression, humanized text, structured occurrences and diagnostics.
127
+
128
+ The AI adapter exposes both the legacy `value` and the structured scheduler state:
129
+ - `schedule` is the canonical authoring config snapshot.
130
+ - `diagnostics` contains read-only validation results.
131
+ - `preview` contains read-only structured next occurrences.
132
+
133
+ AI patches should prefer `schedule.kind` plus `schedule.recurrence` for business scheduling intent, and reserve `schedule.expression.cron` for explicit custom CRON requests.
134
+
135
+ ## Agentic Authoring
136
+
137
+ The executable authoring contract is exported as `PRAXIS_CRON_BUILDER_AUTHORING_MANIFEST`.
138
+ It models typed operations over the same schedule runtime used by the component:
139
+
140
+ - `cron.expression.set`
141
+ - `cron.frequency.set`
142
+ - `cron.timezone.set`
143
+ - `cron.preset.apply`
144
+ - `cron.validate`
145
+ - `cron.preview.generate`
146
+
147
+ Expression, frequency, timezone and preset operations may patch canonical
148
+ `schedule` or compatibility `value` paths only after validation succeeds.
149
+ `cron.validate` and `cron.preview.generate` are read-only operations: invalid
150
+ schedules return structured `diagnostics` and do not mutate the current schedule.
151
+
152
+ Each operation declares `target.resolver`, `preconditions`, `validators`,
153
+ `affectedPaths`, `effects` and typed `submissionImpact`. Expression, frequency,
154
+ timezone and preset changes affect the submitted schedule value; validation and
155
+ preview generation are diagnostics-only operations with no submission mutation.
156
+
96
157
  ## Build Notes
97
158
 
98
159
  The builder resolves validation, humanized descriptions and occurrence preview inside the library runtime.