@swiss-ai-hub/web 0.317.1 → 0.319.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.
@@ -409,6 +409,9 @@ export const AgentClassDTOSchema = {
409
409
  {
410
410
  $ref: "#/components/schemas/ColorPicker",
411
411
  },
412
+ {
413
+ $ref: "#/components/schemas/CronInput",
414
+ },
412
415
  {
413
416
  $ref: "#/components/schemas/DatePicker",
414
417
  },
@@ -543,6 +546,13 @@ export const AgentClassDTOSchema = {
543
546
  description:
544
547
  "Whether the agent class can participate in a chat-based conversation",
545
548
  },
549
+ is_schedulable: {
550
+ type: "boolean",
551
+ title: "Is Schedulable",
552
+ description:
553
+ "Whether the agent class can be run automatically on a cron schedule",
554
+ default: false,
555
+ },
546
556
  is_online: {
547
557
  anyOf: [
548
558
  {
@@ -630,6 +640,9 @@ export const AgentConfigDTOSchema = {
630
640
  {
631
641
  $ref: "#/components/schemas/ColorPicker",
632
642
  },
643
+ {
644
+ $ref: "#/components/schemas/CronInput",
645
+ },
633
646
  {
634
647
  $ref: "#/components/schemas/DatePicker",
635
648
  },
@@ -5634,6 +5647,9 @@ export const ContextualizedAgentEventSchema = {
5634
5647
  {
5635
5648
  $ref: "#/components/schemas/RAGStartEvent",
5636
5649
  },
5650
+ {
5651
+ $ref: "#/components/schemas/ScheduledStartEvent",
5652
+ },
5637
5653
  {
5638
5654
  $ref: "#/components/schemas/ExceptionEvent",
5639
5655
  },
@@ -6048,6 +6064,192 @@ export const CreateTokenResponseSchema = {
6048
6064
  title: "CreateTokenResponse",
6049
6065
  } as const;
6050
6066
 
6067
+ export const CronInputSchema = {
6068
+ properties: {
6069
+ is_formkit_element: {
6070
+ type: "boolean",
6071
+ const: true,
6072
+ title: "Is Formkit Element",
6073
+ description: "Indicates that this element is a FormKit element",
6074
+ default: true,
6075
+ },
6076
+ if: {
6077
+ anyOf: [
6078
+ {
6079
+ type: "string",
6080
+ pattern: "^\\$.+",
6081
+ },
6082
+ {
6083
+ type: "null",
6084
+ },
6085
+ ],
6086
+ title: "If",
6087
+ description: "Conditional expression to show this element",
6088
+ },
6089
+ id: {
6090
+ anyOf: [
6091
+ {
6092
+ type: "string",
6093
+ },
6094
+ {
6095
+ type: "null",
6096
+ },
6097
+ ],
6098
+ title: "Id",
6099
+ description: "Unique identifier for this element",
6100
+ },
6101
+ nullable: {
6102
+ type: "boolean",
6103
+ title: "Nullable",
6104
+ description:
6105
+ "Render with a sibling toggle that sets this field to null when off",
6106
+ default: false,
6107
+ },
6108
+ defaultEnabled: {
6109
+ anyOf: [
6110
+ {
6111
+ type: "boolean",
6112
+ },
6113
+ {
6114
+ type: "null",
6115
+ },
6116
+ ],
6117
+ title: "Defaultenabled",
6118
+ description:
6119
+ "For a nullable element, whether its toggle should start enabled on a fresh form (i.e. the field's data default is non-null). Ignored for non-nullable elements.",
6120
+ },
6121
+ formkit: {
6122
+ type: "string",
6123
+ const: "cronInput",
6124
+ title: "Formkit",
6125
+ description: "Cron schedule input element.",
6126
+ default: "cronInput",
6127
+ },
6128
+ name: {
6129
+ anyOf: [
6130
+ {
6131
+ type: "string",
6132
+ },
6133
+ {
6134
+ type: "null",
6135
+ },
6136
+ ],
6137
+ title: "Name",
6138
+ description: "Name of this field",
6139
+ },
6140
+ label: {
6141
+ anyOf: [
6142
+ {
6143
+ $ref: "#/components/schemas/LocaleString",
6144
+ },
6145
+ {
6146
+ type: "string",
6147
+ },
6148
+ ],
6149
+ title: "Label",
6150
+ description: "Label of this field",
6151
+ },
6152
+ help: {
6153
+ anyOf: [
6154
+ {
6155
+ $ref: "#/components/schemas/LocaleString",
6156
+ },
6157
+ {
6158
+ type: "string",
6159
+ },
6160
+ {
6161
+ type: "null",
6162
+ },
6163
+ ],
6164
+ title: "Help",
6165
+ description: "Help text of this field",
6166
+ },
6167
+ value: {
6168
+ anyOf: [
6169
+ {
6170
+ type: "string",
6171
+ },
6172
+ {
6173
+ type: "integer",
6174
+ },
6175
+ {
6176
+ type: "number",
6177
+ },
6178
+ {
6179
+ type: "boolean",
6180
+ },
6181
+ {
6182
+ items: {
6183
+ type: "string",
6184
+ },
6185
+ type: "array",
6186
+ },
6187
+ {
6188
+ additionalProperties: {
6189
+ type: "string",
6190
+ },
6191
+ type: "object",
6192
+ },
6193
+ {
6194
+ type: "null",
6195
+ },
6196
+ ],
6197
+ title: "Value",
6198
+ description: "Default value for this field",
6199
+ },
6200
+ required: {
6201
+ type: "boolean",
6202
+ title: "Required",
6203
+ description: "Whether this field is required",
6204
+ default: false,
6205
+ },
6206
+ additional_validation_rules: {
6207
+ anyOf: [
6208
+ {
6209
+ type: "string",
6210
+ },
6211
+ {
6212
+ type: "null",
6213
+ },
6214
+ ],
6215
+ title: "Additional Validation Rules",
6216
+ description: "Validation expression",
6217
+ },
6218
+ timezonePlaceholder: {
6219
+ anyOf: [
6220
+ {
6221
+ $ref: "#/components/schemas/LocaleString",
6222
+ },
6223
+ {
6224
+ type: "string",
6225
+ },
6226
+ {
6227
+ type: "null",
6228
+ },
6229
+ ],
6230
+ title: "Timezoneplaceholder",
6231
+ description: "Placeholder for the timezone select",
6232
+ },
6233
+ filter: {
6234
+ type: "boolean",
6235
+ title: "Filter",
6236
+ description: "Whether to enable filtering/search on the timezone select",
6237
+ default: true,
6238
+ },
6239
+ validation: {
6240
+ type: "string",
6241
+ title: "Validation",
6242
+ readOnly: true,
6243
+ },
6244
+ },
6245
+ additionalProperties: true,
6246
+ type: "object",
6247
+ required: ["label", "validation"],
6248
+ title: "CronInput",
6249
+ description:
6250
+ 'A FormKit element for editing the cron schedule of a schedulable agent profile.\n\nThe element renders the five cron positions plus a timezone selector, and the submitted value\nmatches the fields of `AgentSchedule`:\n{\n "minute": str,\n "hour": str,\n "day_of_month": str,\n "month": str,\n "day_of_week": str,\n "timezone": str,\n}\n\nPresets and the plain-language summary of the current schedule are delivered by the Admin UI\n(see the cron schedule configuration UI issue); this element only declares the contract.\n\n### Form Duality\n```python\nfrom swiss_ai_hub.core.form.elements.cron_input import CronInput\nfrom swiss_ai_hub.core.scheduling.agent_schedule import AgentSchedule\n\nclass MyAgentConfig(AgentConfig):\n schedule: Annotated[\n AgentSchedule | CronInput | None,\n Field(description="When this profile runs automatically"),\n ] = None\n\n# Form mode - for rendering:\nconfig = MyAgentConfig(schedule=CronInput(label=LocaleString(en="Schedule")))\n\n# Data mode - from submission (Pydantic validates into AgentSchedule):\nconfig = MyAgentConfig(schedule=AgentSchedule(hour="12", timezone="Europe/Zurich"))\n```',
6251
+ } as const;
6252
+
6051
6253
  export const Custom_OutputSchema = {
6052
6254
  properties: {
6053
6255
  input: {
@@ -8057,6 +8259,13 @@ export const FullAgentInstanceDTOSchema = {
8057
8259
  description:
8058
8260
  "Whether the agent can participate in a chat-based conversation",
8059
8261
  },
8262
+ is_schedulable: {
8263
+ type: "boolean",
8264
+ title: "Is Schedulable",
8265
+ description:
8266
+ "Whether the agent can be run automatically on a cron schedule",
8267
+ default: false,
8268
+ },
8060
8269
  start_events: {
8061
8270
  items: {
8062
8271
  $ref: "#/components/schemas/EventSpecs",
@@ -8218,6 +8427,9 @@ export const FullProcessInstanceDTOSchema = {
8218
8427
  {
8219
8428
  $ref: "#/components/schemas/ColorPicker",
8220
8429
  },
8430
+ {
8431
+ $ref: "#/components/schemas/CronInput",
8432
+ },
8221
8433
  {
8222
8434
  $ref: "#/components/schemas/DatePicker",
8223
8435
  },
@@ -8476,6 +8688,22 @@ export const GroupSchema = {
8476
8688
  title: "Label",
8477
8689
  description: "Optional label displayed above the group",
8478
8690
  },
8691
+ help: {
8692
+ anyOf: [
8693
+ {
8694
+ $ref: "#/components/schemas/LocaleString",
8695
+ },
8696
+ {
8697
+ type: "string",
8698
+ },
8699
+ {
8700
+ type: "null",
8701
+ },
8702
+ ],
8703
+ title: "Help",
8704
+ description:
8705
+ "Optional explanatory text rendered on the group's enable toggle",
8706
+ },
8479
8707
  children: {
8480
8708
  items: {
8481
8709
  oneOf: [
@@ -8497,6 +8725,9 @@ export const GroupSchema = {
8497
8725
  {
8498
8726
  $ref: "#/components/schemas/ColorPicker",
8499
8727
  },
8728
+ {
8729
+ $ref: "#/components/schemas/CronInput",
8730
+ },
8500
8731
  {
8501
8732
  $ref: "#/components/schemas/DatePicker",
8502
8733
  },
@@ -9013,6 +9244,9 @@ export const HumanInDTOSchema = {
9013
9244
  {
9014
9245
  $ref: "#/components/schemas/ColorPicker",
9015
9246
  },
9247
+ {
9248
+ $ref: "#/components/schemas/CronInput",
9249
+ },
9016
9250
  {
9017
9251
  $ref: "#/components/schemas/DatePicker",
9018
9252
  },
@@ -9159,6 +9393,9 @@ export const HumanInSpecsSchema = {
9159
9393
  {
9160
9394
  $ref: "#/components/schemas/ColorPicker",
9161
9395
  },
9396
+ {
9397
+ $ref: "#/components/schemas/CronInput",
9398
+ },
9162
9399
  {
9163
9400
  $ref: "#/components/schemas/DatePicker",
9164
9401
  },
@@ -13673,6 +13910,8 @@ export const LocaleInputSchema = {
13673
13910
  validation: {
13674
13911
  type: "string",
13675
13912
  title: "Validation",
13913
+ description:
13914
+ "Emits `localeRequired` where other elements emit FormKit's `required`.\n\nFormKit's `required` rule only asks whether a value is present, and this element's\nvalue is always a `{de, en, fr, it}` object — non-empty, therefore passing, even when\nevery locale inside it is blank. `localeRequired` (registered in the frontend FormKit\nconfig) looks at the locale values themselves.",
13676
13915
  readOnly: true,
13677
13916
  },
13678
13917
  },
@@ -14040,6 +14279,18 @@ export const MailFetchedEventSchema = {
14040
14279
  title: "Attachments",
14041
14280
  description: "References to the message's attachments stored in S3.",
14042
14281
  },
14282
+ original_message: {
14283
+ anyOf: [
14284
+ {
14285
+ $ref: "#/components/schemas/MailMessageRef",
14286
+ },
14287
+ {
14288
+ type: "null",
14289
+ },
14290
+ ],
14291
+ description:
14292
+ "Reference to the original RFC822 message stored in S3, or null when it was not stored.",
14293
+ },
14043
14294
  _event_name: {
14044
14295
  type: "string",
14045
14296
  title: "Event Name",
@@ -14072,6 +14323,43 @@ export const MailFetchedEventSchema = {
14072
14323
  "Carries a single fetched message — headers, body, and references to its stored attachments.",
14073
14324
  } as const;
14074
14325
 
14326
+ export const MailMessageRefSchema = {
14327
+ properties: {
14328
+ filename: {
14329
+ type: "string",
14330
+ pattern: "^[^/\\\\]+$",
14331
+ title: "Filename",
14332
+ description:
14333
+ "Filename the message is stored under, e.g. '1234.eml'. Must not contain path separators.",
14334
+ },
14335
+ content_type: {
14336
+ type: "string",
14337
+ title: "Content Type",
14338
+ description: "MIME type of the stored message.",
14339
+ default: "message/rfc822",
14340
+ },
14341
+ file_id: {
14342
+ type: "string",
14343
+ pattern:
14344
+ "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
14345
+ title: "File Id",
14346
+ description:
14347
+ "UUID4 file identifier; the S3 object key is derived from the agent identity at runtime.",
14348
+ },
14349
+ size_bytes: {
14350
+ type: "integer",
14351
+ minimum: 0,
14352
+ title: "Size Bytes",
14353
+ description: "Size of the stored message in bytes.",
14354
+ },
14355
+ },
14356
+ type: "object",
14357
+ required: ["filename", "file_id", "size_bytes"],
14358
+ title: "MailMessageRef",
14359
+ description:
14360
+ "Reference to a fetched message's original RFC822 bytes, stored in S3 rather than carried in the event.\n\nMirrors ``MailAttachmentRef``: the message is referenced by ``file_id`` so the raw mail — which may be\norders of magnitude larger than the summary the event carries — never enters the audit trail or the\nWebSocket stream. The stored object is the message **verbatim**, so it also preserves what the event\ndeliberately omits: the recipients and the untrusted HTML body.",
14361
+ } as const;
14362
+
14075
14363
  export const MailMovedEventSchema = {
14076
14364
  properties: {
14077
14365
  event_id: {
@@ -14821,6 +15109,13 @@ export const MinimalAgentInstanceDTOSchema = {
14821
15109
  description:
14822
15110
  "Whether the agent can participate in a chat-based conversation",
14823
15111
  },
15112
+ is_schedulable: {
15113
+ type: "boolean",
15114
+ title: "Is Schedulable",
15115
+ description:
15116
+ "Whether the agent can be run automatically on a cron schedule",
15117
+ default: false,
15118
+ },
14824
15119
  },
14825
15120
  type: "object",
14826
15121
  required: ["agent_class", "agent_id", "agent_config", "is_conversational"],
@@ -16969,6 +17264,9 @@ export const ProcessClassDTOSchema = {
16969
17264
  {
16970
17265
  $ref: "#/components/schemas/ColorPicker",
16971
17266
  },
17267
+ {
17268
+ $ref: "#/components/schemas/CronInput",
17269
+ },
16972
17270
  {
16973
17271
  $ref: "#/components/schemas/DatePicker",
16974
17272
  },
@@ -18520,6 +18818,9 @@ export const RepeaterSchema = {
18520
18818
  {
18521
18819
  $ref: "#/components/schemas/ColorPicker",
18522
18820
  },
18821
+ {
18822
+ $ref: "#/components/schemas/CronInput",
18823
+ },
18523
18824
  {
18524
18825
  $ref: "#/components/schemas/DatePicker",
18525
18826
  },
@@ -19366,6 +19667,92 @@ export const RunStatisticsSchema = {
19366
19667
  description: "Statistics for a single run, intended for API response.",
19367
19668
  } as const;
19368
19669
 
19670
+ export const ScheduledStartEventSchema = {
19671
+ properties: {
19672
+ event_id: {
19673
+ type: "string",
19674
+ title: "Event Id",
19675
+ },
19676
+ created_at: {
19677
+ type: "integer",
19678
+ title: "Created At",
19679
+ description:
19680
+ "The time (in ns since epoch) the event was stored in the event store",
19681
+ },
19682
+ display_name: {
19683
+ anyOf: [
19684
+ {
19685
+ $ref: "#/components/schemas/LocaleString",
19686
+ },
19687
+ {
19688
+ type: "null",
19689
+ },
19690
+ ],
19691
+ description: "Display name for the event",
19692
+ },
19693
+ display_description: {
19694
+ anyOf: [
19695
+ {
19696
+ $ref: "#/components/schemas/LocaleString",
19697
+ },
19698
+ {
19699
+ type: "null",
19700
+ },
19701
+ ],
19702
+ description: "Display description for the event",
19703
+ },
19704
+ locale: {
19705
+ type: "string",
19706
+ title: "Locale",
19707
+ description:
19708
+ "The locale the scheduled run reports its display output in.",
19709
+ default: "de",
19710
+ },
19711
+ user: {
19712
+ anyOf: [
19713
+ {
19714
+ $ref: "#/components/schemas/UserIdentity",
19715
+ },
19716
+ {
19717
+ type: "null",
19718
+ },
19719
+ ],
19720
+ description:
19721
+ "Always None — scheduled runs are system-initiated and carry no execution identity.",
19722
+ },
19723
+ scheduled_for: {
19724
+ type: "string",
19725
+ format: "date-time",
19726
+ title: "Scheduled For",
19727
+ description:
19728
+ "The cron occurrence this run fires for, in UTC. Distinct from `created_at`, which records when the scheduler published the event — the two differ by the scheduler's tick latency.",
19729
+ },
19730
+ _event_name: {
19731
+ type: "string",
19732
+ title: "Event Name",
19733
+ description:
19734
+ "The event type name, usually the class name. If unknown, uses _unknown_event_name.\nUsed during deserialization to decide which subclass to instantiate.",
19735
+ readOnly: true,
19736
+ },
19737
+ _parent_event_names: {
19738
+ items: {
19739
+ type: "string",
19740
+ },
19741
+ type: "array",
19742
+ title: "Parent Event Names",
19743
+ description:
19744
+ "Contains the names of all parent classes up until BaseEvent, ordered from deepest to least deep inheritance.",
19745
+ readOnly: true,
19746
+ },
19747
+ },
19748
+ additionalProperties: true,
19749
+ type: "object",
19750
+ required: ["scheduled_for", "_event_name", "_parent_event_names"],
19751
+ title: "ScheduledStartEvent",
19752
+ description:
19753
+ "Start event fired by the cron scheduler — handling it is what makes an agent schedulable.\n\nMirrors how accepting a `UserMessageEvent` makes an agent conversational: `AgentRunner` derives\n`is_schedulable` from the start events an agent declares, so a blueprint opts in by adding a step\nthat consumes this event, with no separate registration.\n\nScheduled runs are system runs, so `user` is always None and the agent must not depend on an\ninitiating identity. Whatever tenant context the agent needs comes from its own profile\nconfiguration (as `OrgMemoryWriteConfig.tenant_id` already does), never from the run.",
19754
+ } as const;
19755
+
19369
19756
  export const SearchContextCostPerQueryDTOSchema = {
19370
19757
  properties: {
19371
19758
  search_context_size_low: {
@@ -21211,10 +21598,9 @@ export const TextToSpeechRequestSchema = {
21211
21598
  properties: {
21212
21599
  model: {
21213
21600
  type: "string",
21214
- enum: ["tts-1", "tts-1-hd"],
21601
+ minLength: 1,
21215
21602
  title: "Model",
21216
- description:
21217
- "The TTS model to use. Available options: 'tts-1' or 'tts-1-hd'.",
21603
+ description: "The TTS model to use, e.g. 'speech/<model-name>'.",
21218
21604
  },
21219
21605
  input: {
21220
21606
  type: "string",
@@ -24337,6 +24723,9 @@ export const AgentClassDTOWritableSchema = {
24337
24723
  {
24338
24724
  $ref: "#/components/schemas/ColorPickerWritable",
24339
24725
  },
24726
+ {
24727
+ $ref: "#/components/schemas/CronInputWritable",
24728
+ },
24340
24729
  {
24341
24730
  $ref: "#/components/schemas/DatePickerWritable",
24342
24731
  },
@@ -24471,6 +24860,13 @@ export const AgentClassDTOWritableSchema = {
24471
24860
  description:
24472
24861
  "Whether the agent class can participate in a chat-based conversation",
24473
24862
  },
24863
+ is_schedulable: {
24864
+ type: "boolean",
24865
+ title: "Is Schedulable",
24866
+ description:
24867
+ "Whether the agent class can be run automatically on a cron schedule",
24868
+ default: false,
24869
+ },
24474
24870
  is_online: {
24475
24871
  anyOf: [
24476
24872
  {
@@ -24558,6 +24954,9 @@ export const AgentConfigDTOWritableSchema = {
24558
24954
  {
24559
24955
  $ref: "#/components/schemas/ColorPickerWritable",
24560
24956
  },
24957
+ {
24958
+ $ref: "#/components/schemas/CronInputWritable",
24959
+ },
24561
24960
  {
24562
24961
  $ref: "#/components/schemas/DatePickerWritable",
24563
24962
  },
@@ -26851,6 +27250,9 @@ export const ContextualizedAgentEventWritableSchema = {
26851
27250
  {
26852
27251
  $ref: "#/components/schemas/RAGStartEventWritable",
26853
27252
  },
27253
+ {
27254
+ $ref: "#/components/schemas/ScheduledStartEventWritable",
27255
+ },
26854
27256
  {
26855
27257
  $ref: "#/components/schemas/ExceptionEventWritable",
26856
27258
  },
@@ -27015,6 +27417,187 @@ export const ConversationTitleEventWritableSchema = {
27015
27417
  "Carries a generated title for the whole conversation (thread), produced by the agent once a\ntopic becomes identifiable. The agent has the richest context about the conversation, so it\nowns this metadata instead of leaving it to the chat UI's task model.\n\nA thread receives a single, stable title: the agent emits this event only on the turn where a\ntitle is first determined and never again for that thread.",
27016
27418
  } as const;
27017
27419
 
27420
+ export const CronInputWritableSchema = {
27421
+ properties: {
27422
+ is_formkit_element: {
27423
+ type: "boolean",
27424
+ const: true,
27425
+ title: "Is Formkit Element",
27426
+ description: "Indicates that this element is a FormKit element",
27427
+ default: true,
27428
+ },
27429
+ if: {
27430
+ anyOf: [
27431
+ {
27432
+ type: "string",
27433
+ pattern: "^\\$.+",
27434
+ },
27435
+ {
27436
+ type: "null",
27437
+ },
27438
+ ],
27439
+ title: "If",
27440
+ description: "Conditional expression to show this element",
27441
+ },
27442
+ id: {
27443
+ anyOf: [
27444
+ {
27445
+ type: "string",
27446
+ },
27447
+ {
27448
+ type: "null",
27449
+ },
27450
+ ],
27451
+ title: "Id",
27452
+ description: "Unique identifier for this element",
27453
+ },
27454
+ nullable: {
27455
+ type: "boolean",
27456
+ title: "Nullable",
27457
+ description:
27458
+ "Render with a sibling toggle that sets this field to null when off",
27459
+ default: false,
27460
+ },
27461
+ defaultEnabled: {
27462
+ anyOf: [
27463
+ {
27464
+ type: "boolean",
27465
+ },
27466
+ {
27467
+ type: "null",
27468
+ },
27469
+ ],
27470
+ title: "Defaultenabled",
27471
+ description:
27472
+ "For a nullable element, whether its toggle should start enabled on a fresh form (i.e. the field's data default is non-null). Ignored for non-nullable elements.",
27473
+ },
27474
+ formkit: {
27475
+ type: "string",
27476
+ const: "cronInput",
27477
+ title: "Formkit",
27478
+ description: "Cron schedule input element.",
27479
+ default: "cronInput",
27480
+ },
27481
+ name: {
27482
+ anyOf: [
27483
+ {
27484
+ type: "string",
27485
+ },
27486
+ {
27487
+ type: "null",
27488
+ },
27489
+ ],
27490
+ title: "Name",
27491
+ description: "Name of this field",
27492
+ },
27493
+ label: {
27494
+ anyOf: [
27495
+ {
27496
+ $ref: "#/components/schemas/LocaleString",
27497
+ },
27498
+ {
27499
+ type: "string",
27500
+ },
27501
+ ],
27502
+ title: "Label",
27503
+ description: "Label of this field",
27504
+ },
27505
+ help: {
27506
+ anyOf: [
27507
+ {
27508
+ $ref: "#/components/schemas/LocaleString",
27509
+ },
27510
+ {
27511
+ type: "string",
27512
+ },
27513
+ {
27514
+ type: "null",
27515
+ },
27516
+ ],
27517
+ title: "Help",
27518
+ description: "Help text of this field",
27519
+ },
27520
+ value: {
27521
+ anyOf: [
27522
+ {
27523
+ type: "string",
27524
+ },
27525
+ {
27526
+ type: "integer",
27527
+ },
27528
+ {
27529
+ type: "number",
27530
+ },
27531
+ {
27532
+ type: "boolean",
27533
+ },
27534
+ {
27535
+ items: {
27536
+ type: "string",
27537
+ },
27538
+ type: "array",
27539
+ },
27540
+ {
27541
+ additionalProperties: {
27542
+ type: "string",
27543
+ },
27544
+ type: "object",
27545
+ },
27546
+ {
27547
+ type: "null",
27548
+ },
27549
+ ],
27550
+ title: "Value",
27551
+ description: "Default value for this field",
27552
+ },
27553
+ required: {
27554
+ type: "boolean",
27555
+ title: "Required",
27556
+ description: "Whether this field is required",
27557
+ default: false,
27558
+ },
27559
+ additional_validation_rules: {
27560
+ anyOf: [
27561
+ {
27562
+ type: "string",
27563
+ },
27564
+ {
27565
+ type: "null",
27566
+ },
27567
+ ],
27568
+ title: "Additional Validation Rules",
27569
+ description: "Validation expression",
27570
+ },
27571
+ timezonePlaceholder: {
27572
+ anyOf: [
27573
+ {
27574
+ $ref: "#/components/schemas/LocaleString",
27575
+ },
27576
+ {
27577
+ type: "string",
27578
+ },
27579
+ {
27580
+ type: "null",
27581
+ },
27582
+ ],
27583
+ title: "Timezoneplaceholder",
27584
+ description: "Placeholder for the timezone select",
27585
+ },
27586
+ filter: {
27587
+ type: "boolean",
27588
+ title: "Filter",
27589
+ description: "Whether to enable filtering/search on the timezone select",
27590
+ default: true,
27591
+ },
27592
+ },
27593
+ additionalProperties: true,
27594
+ type: "object",
27595
+ required: ["label"],
27596
+ title: "CronInput",
27597
+ description:
27598
+ 'A FormKit element for editing the cron schedule of a schedulable agent profile.\n\nThe element renders the five cron positions plus a timezone selector, and the submitted value\nmatches the fields of `AgentSchedule`:\n{\n "minute": str,\n "hour": str,\n "day_of_month": str,\n "month": str,\n "day_of_week": str,\n "timezone": str,\n}\n\nPresets and the plain-language summary of the current schedule are delivered by the Admin UI\n(see the cron schedule configuration UI issue); this element only declares the contract.\n\n### Form Duality\n```python\nfrom swiss_ai_hub.core.form.elements.cron_input import CronInput\nfrom swiss_ai_hub.core.scheduling.agent_schedule import AgentSchedule\n\nclass MyAgentConfig(AgentConfig):\n schedule: Annotated[\n AgentSchedule | CronInput | None,\n Field(description="When this profile runs automatically"),\n ] = None\n\n# Form mode - for rendering:\nconfig = MyAgentConfig(schedule=CronInput(label=LocaleString(en="Schedule")))\n\n# Data mode - from submission (Pydantic validates into AgentSchedule):\nconfig = MyAgentConfig(schedule=AgentSchedule(hour="12", timezone="Europe/Zurich"))\n```',
27599
+ } as const;
27600
+
27018
27601
  export const DatePickerWritableSchema = {
27019
27602
  properties: {
27020
27603
  is_formkit_element: {
@@ -27709,6 +28292,13 @@ export const FullAgentInstanceDTOWritableSchema = {
27709
28292
  description:
27710
28293
  "Whether the agent can participate in a chat-based conversation",
27711
28294
  },
28295
+ is_schedulable: {
28296
+ type: "boolean",
28297
+ title: "Is Schedulable",
28298
+ description:
28299
+ "Whether the agent can be run automatically on a cron schedule",
28300
+ default: false,
28301
+ },
27712
28302
  start_events: {
27713
28303
  items: {
27714
28304
  $ref: "#/components/schemas/EventSpecs",
@@ -27870,6 +28460,9 @@ export const FullProcessInstanceDTOWritableSchema = {
27870
28460
  {
27871
28461
  $ref: "#/components/schemas/ColorPickerWritable",
27872
28462
  },
28463
+ {
28464
+ $ref: "#/components/schemas/CronInputWritable",
28465
+ },
27873
28466
  {
27874
28467
  $ref: "#/components/schemas/DatePickerWritable",
27875
28468
  },
@@ -28058,6 +28651,22 @@ export const GroupWritableSchema = {
28058
28651
  title: "Label",
28059
28652
  description: "Optional label displayed above the group",
28060
28653
  },
28654
+ help: {
28655
+ anyOf: [
28656
+ {
28657
+ $ref: "#/components/schemas/LocaleString",
28658
+ },
28659
+ {
28660
+ type: "string",
28661
+ },
28662
+ {
28663
+ type: "null",
28664
+ },
28665
+ ],
28666
+ title: "Help",
28667
+ description:
28668
+ "Optional explanatory text rendered on the group's enable toggle",
28669
+ },
28061
28670
  children: {
28062
28671
  items: {
28063
28672
  oneOf: [
@@ -28079,6 +28688,9 @@ export const GroupWritableSchema = {
28079
28688
  {
28080
28689
  $ref: "#/components/schemas/ColorPickerWritable",
28081
28690
  },
28691
+ {
28692
+ $ref: "#/components/schemas/CronInputWritable",
28693
+ },
28082
28694
  {
28083
28695
  $ref: "#/components/schemas/DatePickerWritable",
28084
28696
  },
@@ -28378,6 +28990,9 @@ export const HumanInDTOWritableSchema = {
28378
28990
  {
28379
28991
  $ref: "#/components/schemas/ColorPickerWritable",
28380
28992
  },
28993
+ {
28994
+ $ref: "#/components/schemas/CronInputWritable",
28995
+ },
28381
28996
  {
28382
28997
  $ref: "#/components/schemas/DatePickerWritable",
28383
28998
  },
@@ -28524,6 +29139,9 @@ export const HumanInSpecsWritableSchema = {
28524
29139
  {
28525
29140
  $ref: "#/components/schemas/ColorPickerWritable",
28526
29141
  },
29142
+ {
29143
+ $ref: "#/components/schemas/CronInputWritable",
29144
+ },
28527
29145
  {
28528
29146
  $ref: "#/components/schemas/DatePickerWritable",
28529
29147
  },
@@ -31985,6 +32603,18 @@ export const MailFetchedEventWritableSchema = {
31985
32603
  title: "Attachments",
31986
32604
  description: "References to the message's attachments stored in S3.",
31987
32605
  },
32606
+ original_message: {
32607
+ anyOf: [
32608
+ {
32609
+ $ref: "#/components/schemas/MailMessageRef",
32610
+ },
32611
+ {
32612
+ type: "null",
32613
+ },
32614
+ ],
32615
+ description:
32616
+ "Reference to the original RFC822 message stored in S3, or null when it was not stored.",
32617
+ },
31988
32618
  },
31989
32619
  additionalProperties: true,
31990
32620
  type: "object",
@@ -32240,6 +32870,13 @@ export const MinimalAgentInstanceDTOWritableSchema = {
32240
32870
  description:
32241
32871
  "Whether the agent can participate in a chat-based conversation",
32242
32872
  },
32873
+ is_schedulable: {
32874
+ type: "boolean",
32875
+ title: "Is Schedulable",
32876
+ description:
32877
+ "Whether the agent can be run automatically on a cron schedule",
32878
+ default: false,
32879
+ },
32243
32880
  },
32244
32881
  type: "object",
32245
32882
  required: ["agent_class", "agent_id", "agent_config", "is_conversational"],
@@ -33138,6 +33775,9 @@ export const ProcessClassDTOWritableSchema = {
33138
33775
  {
33139
33776
  $ref: "#/components/schemas/ColorPickerWritable",
33140
33777
  },
33778
+ {
33779
+ $ref: "#/components/schemas/CronInputWritable",
33780
+ },
33141
33781
  {
33142
33782
  $ref: "#/components/schemas/DatePickerWritable",
33143
33783
  },
@@ -34243,6 +34883,9 @@ export const RepeaterWritableSchema = {
34243
34883
  {
34244
34884
  $ref: "#/components/schemas/ColorPickerWritable",
34245
34885
  },
34886
+ {
34887
+ $ref: "#/components/schemas/CronInputWritable",
34888
+ },
34246
34889
  {
34247
34890
  $ref: "#/components/schemas/DatePickerWritable",
34248
34891
  },
@@ -34856,6 +35499,75 @@ export const RunStatisticsWritableSchema = {
34856
35499
  description: "Statistics for a single run, intended for API response.",
34857
35500
  } as const;
34858
35501
 
35502
+ export const ScheduledStartEventWritableSchema = {
35503
+ properties: {
35504
+ event_id: {
35505
+ type: "string",
35506
+ title: "Event Id",
35507
+ },
35508
+ created_at: {
35509
+ type: "integer",
35510
+ title: "Created At",
35511
+ description:
35512
+ "The time (in ns since epoch) the event was stored in the event store",
35513
+ },
35514
+ display_name: {
35515
+ anyOf: [
35516
+ {
35517
+ $ref: "#/components/schemas/LocaleString",
35518
+ },
35519
+ {
35520
+ type: "null",
35521
+ },
35522
+ ],
35523
+ description: "Display name for the event",
35524
+ },
35525
+ display_description: {
35526
+ anyOf: [
35527
+ {
35528
+ $ref: "#/components/schemas/LocaleString",
35529
+ },
35530
+ {
35531
+ type: "null",
35532
+ },
35533
+ ],
35534
+ description: "Display description for the event",
35535
+ },
35536
+ locale: {
35537
+ type: "string",
35538
+ title: "Locale",
35539
+ description:
35540
+ "The locale the scheduled run reports its display output in.",
35541
+ default: "de",
35542
+ },
35543
+ user: {
35544
+ anyOf: [
35545
+ {
35546
+ $ref: "#/components/schemas/UserIdentity",
35547
+ },
35548
+ {
35549
+ type: "null",
35550
+ },
35551
+ ],
35552
+ description:
35553
+ "Always None — scheduled runs are system-initiated and carry no execution identity.",
35554
+ },
35555
+ scheduled_for: {
35556
+ type: "string",
35557
+ format: "date-time",
35558
+ title: "Scheduled For",
35559
+ description:
35560
+ "The cron occurrence this run fires for, in UTC. Distinct from `created_at`, which records when the scheduler published the event — the two differ by the scheduler's tick latency.",
35561
+ },
35562
+ },
35563
+ additionalProperties: true,
35564
+ type: "object",
35565
+ required: ["scheduled_for"],
35566
+ title: "ScheduledStartEvent",
35567
+ description:
35568
+ "Start event fired by the cron scheduler — handling it is what makes an agent schedulable.\n\nMirrors how accepting a `UserMessageEvent` makes an agent conversational: `AgentRunner` derives\n`is_schedulable` from the start events an agent declares, so a blueprint opts in by adding a step\nthat consumes this event, with no separate registration.\n\nScheduled runs are system runs, so `user` is always None and the agent must not depend on an\ninitiating identity. Whatever tenant context the agent needs comes from its own profile\nconfiguration (as `OrgMemoryWriteConfig.tenant_id` already does), never from the run.",
35569
+ } as const;
35570
+
34859
35571
  export const SelectWritableSchema = {
34860
35572
  properties: {
34861
35573
  is_formkit_element: {