@widgetic/api-contracts 1.11.130 → 1.11.134

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/metadata.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "package": "@widgetic/api-contracts",
3
- "version": "1.11.130",
3
+ "version": "1.11.134",
4
4
  "publishTag": "latest",
5
5
  "source": {
6
- "commit": "12aac56da03bfdb34ed4472a9a71c6435f801b0c",
6
+ "commit": "e4aeed638ed832100855e0d6aca98a27fd0b09a9",
7
7
  "branch": null,
8
8
  "dirty": false,
9
9
  "atOriginMain": true
10
10
  },
11
11
  "openApi": {
12
12
  "file": "openapi-public.json",
13
- "sha256": "e4bd261cec132fe097a4bc85b9248d4e26346fa08d084ea13434a998284c3251",
13
+ "sha256": "1cdc03eeea38139717d9303a1cc8fc3dd424f9c13a98875da8d7582cc824e5fd",
14
14
  "paths": 124,
15
15
  "operations": 169,
16
16
  "servers": [
@@ -19,9 +19,9 @@
19
19
  },
20
20
  "mcp": {
21
21
  "file": "mcp-tools.json",
22
- "sha256": "d568aa72b4471d5b10e727d6534bf72d72a8288bcc9db9ed4c48eee2d9c68a93",
23
- "contractVersion": "1.21.0",
22
+ "sha256": "c6bc8691ad89d8e9836c94c2b6b68befc2c9aa39e5796809aa7088a77b051374",
23
+ "contractVersion": "1.23.0",
24
24
  "serverName": "widgetic",
25
- "tools": 48
25
+ "tools": 56
26
26
  }
27
27
  }
@@ -6109,6 +6109,7 @@
6109
6109
  ],
6110
6110
  "operationId": "validateToken",
6111
6111
  "summary": "Validate current authentication token",
6112
+ "description": "Describes the credential the request was made with: how it signs in (`tokenType`), what it may do (`scopes`) and the\naccount it belongs to (`userId`). A credential that belongs to the platform itself, and not to a customer's account, is\nheld to no scope: it is answered with `tokenType` `service_key`, `scopes` `[\"*:*\"]` and no `userId`.\n",
6112
6113
  "x-access-level": "user",
6113
6114
  "x-visibility": "public",
6114
6115
  "security": [
@@ -16451,7 +16452,7 @@
16451
16452
  "put": {
16452
16453
  "operationId": "putBrandKit",
16453
16454
  "summary": "Save Brand Kit tokens",
16454
- "description": "Replaces the colors, fonts, spacing and notes of the kit with the ones sent. To change one thing, use PATCH.",
16455
+ "description": "Replaces the colors, fonts, text styles, spacing and notes of the kit with the ones sent, so text styles left out of the body are removed. To change one thing, use PATCH.",
16455
16456
  "tags": [
16456
16457
  "Brand Kit"
16457
16458
  ],
@@ -16548,7 +16549,7 @@
16548
16549
  "patch": {
16549
16550
  "operationId": "patchBrandKit",
16550
16551
  "summary": "Change part of the Brand Kit",
16551
- "description": "Changes only what is sent: the colors, a font role, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit. An account that never saved a kit starts from Widgetic's default one. The response lists what is worth fixing in `warnings`.",
16552
+ "description": "Changes only what is sent: the colors, a font role, the text styles, a spacing step, one corner radius (0 for square corners) or the style notes, and keeps the rest of the saved kit, text styles included. An account that never saved a kit starts from Widgetic's default one. The response lists what is worth fixing in `warnings`.",
16552
16553
  "tags": [
16553
16554
  "Brand Kit"
16554
16555
  ],
@@ -25492,6 +25493,46 @@
25492
25493
  "sizeMax": 42
25493
25494
  }
25494
25495
  },
25496
+ "BrandTextStyle": {
25497
+ "type": "object",
25498
+ "required": [
25499
+ "family",
25500
+ "weight",
25501
+ "size"
25502
+ ],
25503
+ "description": "One text style of the kit: a font family, a weight and a size in pixels, for example Inter 400 at 12px or Inter 500 at 18px. A family with a font file in the kit is an uploaded font; any other family is loaded from Google Fonts. The size is the size of the widget at full size.",
25504
+ "properties": {
25505
+ "family": {
25506
+ "type": "string",
25507
+ "minLength": 1,
25508
+ "maxLength": 80
25509
+ },
25510
+ "weight": {
25511
+ "type": "integer",
25512
+ "enum": [
25513
+ 100,
25514
+ 200,
25515
+ 300,
25516
+ 400,
25517
+ 500,
25518
+ 600,
25519
+ 700,
25520
+ 800,
25521
+ 900
25522
+ ]
25523
+ },
25524
+ "size": {
25525
+ "type": "integer",
25526
+ "minimum": 8,
25527
+ "maximum": 200
25528
+ }
25529
+ },
25530
+ "example": {
25531
+ "family": "Example family",
25532
+ "weight": 42,
25533
+ "size": 42
25534
+ }
25535
+ },
25495
25536
  "BrandSpacing": {
25496
25537
  "type": "object",
25497
25538
  "required": [
@@ -25564,7 +25605,7 @@
25564
25605
  "fonts",
25565
25606
  "spacing"
25566
25607
  ],
25567
- "description": "Colors, fonts by role, spacing and corner radii of a Brand Kit.",
25608
+ "description": "Colors, fonts by role, text styles, spacing and corner radii of a Brand Kit.",
25568
25609
  "properties": {
25569
25610
  "colors": {
25570
25611
  "type": "array",
@@ -25590,6 +25631,14 @@
25590
25631
  }
25591
25632
  }
25592
25633
  },
25634
+ "textStyles": {
25635
+ "type": "array",
25636
+ "maxItems": 12,
25637
+ "description": "The owner's text styles (family, weight and size). When there are some, they are what every widget made with the kit is told about type and the fonts by role are not used; with none, the fonts by role apply. A font file that is deleted takes the text styles made from it with it. Left out when the kit has none.",
25638
+ "items": {
25639
+ "$ref": "#/components/schemas/BrandTextStyle"
25640
+ }
25641
+ },
25593
25642
  "spacing": {
25594
25643
  "$ref": "#/components/schemas/BrandSpacing"
25595
25644
  },
@@ -25604,6 +25653,9 @@
25604
25653
  "Example BrandColor"
25605
25654
  ],
25606
25655
  "fonts": {},
25656
+ "textStyles": [
25657
+ "Example BrandTextStyle"
25658
+ ],
25607
25659
  "spacing": null,
25608
25660
  "instructions": "Example instructions"
25609
25661
  }
@@ -25793,7 +25845,7 @@
25793
25845
  },
25794
25846
  "warnings": {
25795
25847
  "type": "array",
25796
- "description": "Things worth fixing in the saved colors, such as a text color that is hard to read on the background. The kit is saved either way.",
25848
+ "description": "Things worth fixing in the saved kit, such as a text color that is hard to read on the background, or fonts by role that are not used because the kit has text styles. The kit is saved either way.",
25797
25849
  "items": {
25798
25850
  "type": "string"
25799
25851
  }
@@ -25868,6 +25920,14 @@
25868
25920
  }
25869
25921
  }
25870
25922
  },
25923
+ "textStyles": {
25924
+ "type": "array",
25925
+ "maxItems": 12,
25926
+ "description": "The whole list of text styles (it replaces the saved list). An empty list removes them, and the fonts by role apply again. Left out, the saved text styles stay as they are.",
25927
+ "items": {
25928
+ "$ref": "#/components/schemas/BrandTextStyle"
25929
+ }
25930
+ },
25871
25931
  "spacing": {
25872
25932
  "type": "object",
25873
25933
  "description": "The spacing and radius steps to change; the steps that are left out keep their value.",
@@ -25995,6 +26055,365 @@
25995
26055
  "svg": "Example svg"
25996
26056
  }
25997
26057
  },
26058
+ "WidgetPlanTask": {
26059
+ "type": "object",
26060
+ "required": [
26061
+ "id",
26062
+ "label",
26063
+ "kind",
26064
+ "status"
26065
+ ],
26066
+ "description": "One step of the plan the person is shown.",
26067
+ "properties": {
26068
+ "id": {
26069
+ "type": "string",
26070
+ "description": "`t1`, `t2`, ... Stable for the life of the plan."
26071
+ },
26072
+ "label": {
26073
+ "type": "string",
26074
+ "description": "The step, in the language the person wrote in. At most 90 characters."
26075
+ },
26076
+ "kind": {
26077
+ "type": "string",
26078
+ "enum": [
26079
+ "read",
26080
+ "layout",
26081
+ "content",
26082
+ "style",
26083
+ "library",
26084
+ "adapter",
26085
+ "motion",
26086
+ "behavior",
26087
+ "polish",
26088
+ "check",
26089
+ "other"
26090
+ ],
26091
+ "description": "What the step is about, so a client can pick an icon."
26092
+ },
26093
+ "status": {
26094
+ "type": "string",
26095
+ "enum": [
26096
+ "pending",
26097
+ "in_progress",
26098
+ "done",
26099
+ "failed"
26100
+ ],
26101
+ "description": "Where the step stands. At most one step is `in_progress`."
26102
+ }
26103
+ },
26104
+ "example": {
26105
+ "id": "Example id",
26106
+ "label": "Example label",
26107
+ "kind": "Example kind",
26108
+ "status": "Example status"
26109
+ }
26110
+ },
26111
+ "WidgetPlan": {
26112
+ "type": "object",
26113
+ "required": [
26114
+ "title",
26115
+ "tasks",
26116
+ "decisions",
26117
+ "completed",
26118
+ "activeIndex"
26119
+ ],
26120
+ "description": "The plan shown before and during a build, in `metadata.plan` of the generation's operation. It is published when it is made and again each time what a client would draw changes (a handful of updates per build). `metadata.plan` becomes `null` when the build is called off (the request was declined), and a client then hides the plan it showed.",
26121
+ "properties": {
26122
+ "title": {
26123
+ "type": "string",
26124
+ "description": "One line for the whole plan (\"Building a countdown with confetti\")."
26125
+ },
26126
+ "tasks": {
26127
+ "type": "array",
26128
+ "maxItems": 7,
26129
+ "items": {
26130
+ "$ref": "#/components/schemas/WidgetPlanTask"
26131
+ }
26132
+ },
26133
+ "decisions": {
26134
+ "type": "object",
26135
+ "required": [
26136
+ "libraries",
26137
+ "adapters",
26138
+ "look",
26139
+ "motion",
26140
+ "improvements",
26141
+ "notes",
26142
+ "elements"
26143
+ ],
26144
+ "description": "What the plan decided, for the client to show as it likes (chips, a list, a summary).",
26145
+ "properties": {
26146
+ "libraries": {
26147
+ "type": "array",
26148
+ "items": {
26149
+ "type": "object",
26150
+ "required": [
26151
+ "id",
26152
+ "label",
26153
+ "reason"
26154
+ ],
26155
+ "properties": {
26156
+ "id": {
26157
+ "type": "string",
26158
+ "description": "A stable id of the library (`gsap`, `three`, `chart`, ...)."
26159
+ },
26160
+ "label": {
26161
+ "type": "string"
26162
+ },
26163
+ "reason": {
26164
+ "type": "string",
26165
+ "description": "Why the widget needs it, or an empty string."
26166
+ }
26167
+ }
26168
+ }
26169
+ },
26170
+ "adapters": {
26171
+ "type": "array",
26172
+ "description": "The adapters the adapter stage attached on this turn. Empty while that stage is not applied.",
26173
+ "items": {
26174
+ "type": "object",
26175
+ "required": [
26176
+ "id",
26177
+ "label"
26178
+ ],
26179
+ "properties": {
26180
+ "id": {
26181
+ "type": "string"
26182
+ },
26183
+ "label": {
26184
+ "type": "string"
26185
+ }
26186
+ }
26187
+ }
26188
+ },
26189
+ "look": {
26190
+ "type": "string",
26191
+ "description": "What the widget should look like, from what the person provided (words, pictures, a copied page, a Figma frame). May be empty."
26192
+ },
26193
+ "motion": {
26194
+ "type": "array",
26195
+ "items": {
26196
+ "type": "string"
26197
+ },
26198
+ "description": "The animations to apply. At most 3."
26199
+ },
26200
+ "improvements": {
26201
+ "type": "array",
26202
+ "items": {
26203
+ "type": "string"
26204
+ },
26205
+ "description": "Improvements that do not change what was asked. At most 3."
26206
+ },
26207
+ "notes": {
26208
+ "type": "array",
26209
+ "items": {
26210
+ "type": "string"
26211
+ },
26212
+ "description": "Anything else particular to this widget. At most 3."
26213
+ },
26214
+ "responsive": {
26215
+ "type": "object",
26216
+ "nullable": true,
26217
+ "description": "How the widget behaves on mobile, tablet and desktop (layout reflow, stacking, sizing). Always present on a first build; null on edits unless the model supplies it.",
26218
+ "required": [
26219
+ "mobile",
26220
+ "tablet",
26221
+ "desktop"
26222
+ ],
26223
+ "properties": {
26224
+ "mobile": {
26225
+ "type": "string",
26226
+ "maxLength": 120
26227
+ },
26228
+ "tablet": {
26229
+ "type": "string",
26230
+ "maxLength": 120
26231
+ },
26232
+ "desktop": {
26233
+ "type": "string",
26234
+ "maxLength": 120
26235
+ }
26236
+ }
26237
+ },
26238
+ "elements": {
26239
+ "type": "array",
26240
+ "items": {
26241
+ "type": "string"
26242
+ },
26243
+ "description": "What a Convert-to-Widget sketch shows: one short phrase per drawn element, in layout order. Empty when the request has no sketch. At most 12."
26244
+ }
26245
+ }
26246
+ },
26247
+ "completed": {
26248
+ "type": "integer",
26249
+ "description": "How many steps are `done`."
26250
+ },
26251
+ "activeIndex": {
26252
+ "type": "integer",
26253
+ "nullable": true,
26254
+ "description": "The index in `tasks` of the step in progress, or null when none is."
26255
+ }
26256
+ },
26257
+ "example": {
26258
+ "title": "Example title",
26259
+ "tasks": [
26260
+ "Example WidgetPlanTask"
26261
+ ],
26262
+ "decisions": {},
26263
+ "completed": 42,
26264
+ "activeIndex": 42
26265
+ }
26266
+ },
26267
+ "WidgetClarificationOption": {
26268
+ "type": "object",
26269
+ "required": [
26270
+ "id",
26271
+ "label",
26272
+ "recommended"
26273
+ ],
26274
+ "properties": {
26275
+ "id": {
26276
+ "type": "string",
26277
+ "description": "`q1o1`, `q1o2`, ... Stable within the card."
26278
+ },
26279
+ "label": {
26280
+ "type": "string",
26281
+ "description": "The option text, at most 60 characters, including the parenthesised recommendation word on the recommended option (for example `Three plans (Recommended)`)."
26282
+ },
26283
+ "recommended": {
26284
+ "type": "boolean",
26285
+ "description": "True for the one option the assistant recommends. It is always the first option when set. The server composes the recommendation word into `label`; clients may still draw a badge."
26286
+ }
26287
+ },
26288
+ "example": {
26289
+ "id": "Example id",
26290
+ "label": "Example label",
26291
+ "recommended": true
26292
+ }
26293
+ },
26294
+ "WidgetClarificationQuestion": {
26295
+ "type": "object",
26296
+ "required": [
26297
+ "id",
26298
+ "question",
26299
+ "options",
26300
+ "recommendedWord",
26301
+ "allowOther"
26302
+ ],
26303
+ "properties": {
26304
+ "id": {
26305
+ "type": "string",
26306
+ "description": "`q1`, `q2`, ..."
26307
+ },
26308
+ "question": {
26309
+ "type": "string"
26310
+ },
26311
+ "recommendedWord": {
26312
+ "type": "string",
26313
+ "maxLength": 24,
26314
+ "description": "The localized word placed in parentheses on the recommended option's label (default `Recommended`)."
26315
+ },
26316
+ "options": {
26317
+ "type": "array",
26318
+ "maxItems": 5,
26319
+ "description": "Two to five options with the recommended one first; empty for a question answered in words only.",
26320
+ "items": {
26321
+ "$ref": "#/components/schemas/WidgetClarificationOption"
26322
+ }
26323
+ },
26324
+ "allowOther": {
26325
+ "type": "boolean",
26326
+ "description": "Whether the person may answer in their own words (the \"Other...\" row). Always true when there are no options."
26327
+ }
26328
+ },
26329
+ "example": {
26330
+ "id": "Example id",
26331
+ "question": "Example question",
26332
+ "recommendedWord": "Example recommendedWord",
26333
+ "options": [
26334
+ "Example WidgetClarificationOption"
26335
+ ],
26336
+ "allowOther": true
26337
+ }
26338
+ },
26339
+ "WidgetClarification": {
26340
+ "type": "object",
26341
+ "required": [
26342
+ "message",
26343
+ "questions",
26344
+ "filesRead"
26345
+ ],
26346
+ "description": "The card of questions the assistant puts to the person before building, in `metadata.clarification` of an operation that completed with `metadata.outcome` `needs_answers`. Nothing was built and the credit was returned. The same words are saved in the chat as a plain-text assistant message.",
26347
+ "properties": {
26348
+ "message": {
26349
+ "type": "string",
26350
+ "description": "The sentence that introduces the card."
26351
+ },
26352
+ "questions": {
26353
+ "type": "array",
26354
+ "maxItems": 4,
26355
+ "items": {
26356
+ "$ref": "#/components/schemas/WidgetClarificationQuestion"
26357
+ }
26358
+ },
26359
+ "filesRead": {
26360
+ "type": "array",
26361
+ "items": {
26362
+ "type": "string"
26363
+ },
26364
+ "description": "The paths of the widget's files the questions were judged against, for a \"Read N files\" row."
26365
+ }
26366
+ },
26367
+ "example": {
26368
+ "message": "Example message",
26369
+ "questions": [
26370
+ "Example WidgetClarificationQuestion"
26371
+ ],
26372
+ "filesRead": []
26373
+ }
26374
+ },
26375
+ "WidgetNextStep": {
26376
+ "type": "object",
26377
+ "required": [
26378
+ "id",
26379
+ "label",
26380
+ "kind",
26381
+ "recommended"
26382
+ ],
26383
+ "description": "One suggested next improvement, in `metadata.nextSteps` of a completed generation. The label is a complete request: sending it as the next message is the whole action. The first suggestion is always the recommended one; the chips saved under the reply carry no flag, so a client applies the same rule after a reload.",
26384
+ "properties": {
26385
+ "id": {
26386
+ "type": "string",
26387
+ "description": "`n1`, `n2`, ..."
26388
+ },
26389
+ "label": {
26390
+ "type": "string",
26391
+ "description": "The request, at most 80 characters."
26392
+ },
26393
+ "kind": {
26394
+ "type": "string",
26395
+ "enum": [
26396
+ "content",
26397
+ "style",
26398
+ "layout",
26399
+ "behavior",
26400
+ "animation",
26401
+ "data",
26402
+ "other"
26403
+ ]
26404
+ },
26405
+ "recommended": {
26406
+ "type": "boolean",
26407
+ "description": "True for the first suggestion and false for the others."
26408
+ }
26409
+ },
26410
+ "example": {
26411
+ "id": "Example id",
26412
+ "label": "Example label",
26413
+ "kind": "Example kind",
26414
+ "recommended": true
26415
+ }
26416
+ },
25998
26417
  "ErrorResponse": {
25999
26418
  "type": "object",
26000
26419
  "required": [
@@ -27697,7 +28116,40 @@
27697
28116
  "metadata": {
27698
28117
  "type": "object",
27699
28118
  "additionalProperties": true,
27700
- "description": "What the operation tells about its work. A finished composition duplication names the new composition in `newCompositionId`, and lists any problem with its database in `warnings` (absent when there is none).\n"
28119
+ "description": "What the operation tells about its work. A finished composition duplication names the new composition in `newCompositionId`, and lists any problem with its database in `warnings` (absent when there is none). A code generation whose request declared `clientCapabilities` also tells what that client asked to show: `plan` while it builds, `outcome` `needs_answers` with the card in `clarification` when it asked before building, and `nextSteps` once it is done. A key whose part the client did not declare is never present. During code generation, `stage` is a short status line. While the model streams code, `streamTail` holds the last portion of generated source (replaced periodically, cleared when streaming ends). While the model streams reasoning before code, `thinkingTail` holds the last portion of reasoning text (same cadence; cleared when code streaming starts or the run ends). Clients may read `thinkingTail` or `thinking_tail`.\n",
28120
+ "properties": {
28121
+ "plan": {
28122
+ "nullable": true,
28123
+ "allOf": [
28124
+ {
28125
+ "$ref": "#/components/schemas/WidgetPlan"
28126
+ }
28127
+ ],
28128
+ "description": "The plan of a code generation, published when it is made and again each time a step changes (`pending`, `in_progress`, `done`, `failed`). `null` when the build was called off, so the client hides the plan it showed.\n"
28129
+ },
28130
+ "outcome": {
28131
+ "type": "string",
28132
+ "enum": [
28133
+ "needs_answers"
28134
+ ],
28135
+ "description": "`needs_answers` on a code generation that completed by asking questions: nothing was built, the credit was returned, and the card is in `clarification`. Absent on every other outcome.\n"
28136
+ },
28137
+ "clarification": {
28138
+ "allOf": [
28139
+ {
28140
+ "$ref": "#/components/schemas/WidgetClarification"
28141
+ }
28142
+ ],
28143
+ "description": "The card of questions, present with `outcome` `needs_answers`."
28144
+ },
28145
+ "nextSteps": {
28146
+ "type": "array",
28147
+ "description": "Suggested next improvements of a completed code generation, the recommended one first. Absent when none were made in time or the build was not kept.\n",
28148
+ "items": {
28149
+ "$ref": "#/components/schemas/WidgetNextStep"
28150
+ }
28151
+ }
28152
+ }
27701
28153
  },
27702
28154
  "error": {
27703
28155
  "type": "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widgetic/api-contracts",
3
- "version": "1.11.130",
3
+ "version": "1.11.134",
4
4
  "description": "What the Widgetic API and the Widgetic MCP server accept, as data: the public OpenAPI description and the MCP tool contract. Written by the Widgetic API gateway; the Widgetic CLI is generated from it.",
5
5
  "author": "Widgetic",
6
6
  "license": "SEE LICENSE IN LICENSE",